Strange behavior with FileChooser on Linux

Hi,

I have a small juce program with a button, which opens a FileChooser. after selecting some files and closing the FileChooser my program starts using 100% CPU. I am using the latest juce tip.
I reverted back to the commit before “Fix for Linux repaint bug” and with this my program stopped using all CPU after choosing some files.

Is it just my program or did someone experienced the same behavior.

Thanks,
peter

Try generating it on Juce Demo. If you can do it there it would most probably be an issue with juce.

I tried the FileChooser in the Juce demo. Same behavior. After choosing a file CPU usage goes up.

I just tried this but can’t reproduce it… Very odd…

Hi Peter,
Can you post the code, or indicate the place where you added the code for filechooser in juce demo.

running kubuntu 9.10 / kde4
everything is fine here.
filechooser and directory chooser as well as the fileBrowser are working like a charm

did you have a look with a debugger what juce is doing when the cpu goes up?
is the whole program freezing or still responding?

comboy

even here i get the jucedemo to show 0% cpu when opening the filechooser.
with xshm enabled or not doesn’t change !

Hi all,

thank you for your answers. It is really strange. I tested my application and the juce demo on a clean ubuntu/gnome install in the virtual machine. they acted normal, without the huge cpu usage.
I think it has something to do with my machine. But the strange thing is, tha it happens only with the lastest few revisions of juce. As i wrote in my first post with an older juce revision my application does act normal. Very strange…

I use the FIleChoosers like in the example in the juce doxygen documentation.

Peter

I couldn’t generate it either. Are you doing something with the file?

I did make some changes to the way the linux message queue works, so that must be involved. If you look in juce_linux_Messaging at a function called juce_sleepUntilEvent, I guess it must be returning immediately on your machine, rather than sleeping like it’s supposed to - but I don’t know why that’d be the case… Since I can’t reproduce it, you might want to have a poke around in there and look for any clues about what it’s doing?