Linux graphics bugs


#1

I get some graphics bugs in my application. I’m using older JUCE code (145), but I exchanged the Linux messaging and windowing code with the latest code from the SVN.

Here’s the kind of problems that appear:

http://img168.imageshack.us/img168/7391/screenshotoo1.png

The graphic bugs appear mostly when I resize something. Please also note that the application uses Timers that update the wave displays on the top, so there’s graphical updates going on all the time.

Another graphical bug is that the component snapshot of the table component on the bottom is not done properly on Linux. On OS X and Windows, there’s no problem.


#2

Tricky to tell what it’s supposed to look like, but does it seem like it’s just losing forgetting some of the invalidated regions? You’re not repainting on a non-UI thread are you?


#3

No, I ain’t repainting in a non-UI Thread (if you do that, OS X crashes instantly, and it’s the same code as on OS X) - but use JUCE Timers where repaint() is called in (which is ok, since they’re on the message thread).

In the JUCE Demo, the component snapshot of the ListBox ain’t correct either, I see the row(s) that I selected in a big white opaque block that is as big as the ListBox, whereas on Windows I only see the selected row(s) in a transparent fashion.


#4

Ok, well I’ll take a look at the problem in the demo next time I’ve got my linux build running, and see if I can figure it out…


#5

same problem here.
although i realized it seems to happen much more often when the desktop composite mode in ubuntu is activated.
i get redraw errors like in the picture above (i.e. VU-meters appearing on wrong positions, repaint on mouse down action causes components to be drawn across the juce window title etc.). I’m calling repaint from a timer thread for vu meters. so its inside the UI thread i suppose. error also happens on resizing, window opening and rearranging of components… so nearly whenever a redraw happens but only from time to time.

i’m using the latest kubuntu with kde4

edit:
i just tested it with the juce demo and there the bug can be reproduced.
using the audio demo the black waveform input viewer is sometimes drawn across the window titlebar in the upper left corner when resizing the window.

originally the black box was over the menubar and title as well, but when my mouse left the window a repaint refreshed the area :wink:

cheers,
comboy


#6

Is this using the latest tip? If not, please try that and see if it makes a difference.


#7

tip?
do you mean the latest juce version?
i just realized there is a new 1.5 version
i was still using 1.46
so i will try the new version the next days and see if it works then.
a spontaneous build try before bed time resultet in compiler errors. so i’ll have to take some more time trying out the new version :wink:

best regards,
julian


#8

I actually mean the very latest tip version from GIT, not the 1.50 release.

Please don’t report bugs in anything older than the very latest revision, because I won’t be interested!


#9

Probably it is related to this bug as jpo says:

http://www.rawmaterialsoftware.com/viewtopic.php?p=22414#p22414

this still needs to be fixed properly.


#10

I finally ported my project to the actual tip
and it seems the redraw glitches are gone
just did a little testing today and so far all seems good :slight_smile:

but something with the resize code still seems wrong.
when i resize my window and move the mouse a little bit faster, i get assertion errors
JUCE Assertion failure in …/…/src/native/linux/juce_linux_Windowing.cpp, line 915

when using the native_title_bars it’s even worse, then the resize response is terribly slow.
the windows size is following the mousecursor in slow motion (especially when using timer repainted content)

comboy


#11

after some more testing i’m afraid i have to say the bug isn’t gone in the tip…
it happens very seldom compared to the old version. but i just hat my VU meters painted at the wrong place when i used a resize bar :frowning:

good night :wink:
comboy


#12

using the git version from 21.1.2010

although it states in the comments from 20.1.2010 "fix for the linux repaint bug"
it doesn’t seem to be fixed propperly.


notice how the treeviewItems are all drawn twice.

this is on kubuntu 9.10/kde4 using the debug version of juce.
in the release version it seems to happen less.

cheers,
comboy


#13

I’ve done other linux graphics work since then - try it again today.


#14

just updated to the tip (Mo 25 Jan 2010 20:49:08 CET).
the repaint bug, once again, got much better, but isn’t gone.
i had to jiggle the resize bars quite a lot to get it to happen this time.
before the update it was easy to get a screenshot. this time it was hard work catching the buggy state

so long,
comboy