Bug 157282

Summary: Looking glass and sharpen cause GL_INVALID_OPERATION errors
Product: [Plasma] kwin Reporter: Morgan Cox <morgancoxuk>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: s.de.bie, stijn+kdebugs
Priority: NOR    
Version: 4.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: valgrind

Description Morgan Cox 2008-02-06 20:19:12 UTC
Version:            (using KDE 4.0.0)
Installed from:    SuSE RPMs
Compiler:          gcc version 4.2.1 (SUSE Linux) 
OS:                Linux

Hi.

I am having issues with certain opengl accessibility desktop effects.

Some of the 'desktop effects' either do nothing when activated or prevent me being able to click on anything / sometime even lock the machine so I have to restart X.

Most 3D effects work fine - I can use the normal Magnifier, zoom, explosion fine (they work pretty fast on my nvidia card too!).

However when I select the looking glass magnifier and press windows key and + it either crashes or does nothing - I have tried it both with the normal magnifier enabled and disabled - same result. Same thing happens with the sharpen desktop effect..

The strange thing the looking glass magnifer did work with one of the KDE4 release candidates.(think it was RC2.)

I am having similar issues on the following systems (so doesn't seem hardware / distro related.)

[my desktop]
opensuse 10.3 64bit (xorg 7.3) - nvidia geforce 8500 - kde 4.0.1
gentoo 64bit - nvidia geforce 8500 - kde 4 (from masked portage)

[my work desktop (they give us crap onboard video cards...)]
opensuse 10.3 32bit (xorg 7.3) - intel 915G - kde 4.0.1


On both machines most 3d effects work (it is definitely in opengl mode not xrender) so I am sure all xcomposite settings are enabled.) 

Is there anything I can do to provide more info on this ?

Thanks

P.S - loving how KDE4 is coming on (as mentioned already using it at work...)
Comment 1 Lubos Lunak 2008-02-07 15:02:08 UTC
Please provide the backtrace from the crash and any possible error output.
Comment 2 Morgan Cox 2008-02-08 15:22:20 UTC
Please can you guide me on how to provide a backtrace ?

As the screen locks up I am unable to kde until I restart X

I believe that you use gdb , can someone please point me in the right direction.

Comment 3 Mike 2008-02-08 15:44:20 UTC
I also used to get this problem sometimes.  I can confirm it is not crashing, it is outputting a GLError and not updating the screen.

The GL Error is 0x502.

Looking glass does work sometimes (normally the first time after starting kwin) but after that it produces this error.

I am using nvidia 169.09 now and am finding it difficult to reproduce.
Comment 4 Lubos Lunak 2008-02-11 12:04:51 UTC
See http://techbase.kde.org/index.php?title=Development/Tutorials/Debugging and related pages for debugging howto. You can switch to text console and attach gdb to kwin to get a backtrace. You can also redirect kwin output to a file to get it.
Comment 5 Morgan Cox 2008-02-12 13:43:23 UTC
Hi.

I have tried to use gdb but I must be doing something incorrect.

I am able to use it with opengl desktop effects disabled, however when I use gdb with opengl effects enabled it locks the system and I am unable to get to the konsole window, I have to go to a console window out of X and kill the gdb process.

i.e :
--------------------------------

kde4user@mrsuseamd64:~> ps aux | grep kwin

kde4user 22668  1.7  4.0 262672 41248 pts/2    SL   12:13   0:27 kwin --replace
kde4user 23180  0.0  0.0   5120   796 pts/3    R+   12:39   0:00 grep kwin

kde4user@mrsuseamd64:~> gdb kwin 22668


- the screen then locks until I kill gdb.

Can someone please let me know what i'm doing wrong.

Also if someone could explain how to make it write to a file then could be useful.

Cheers.
Comment 6 Morgan Cox 2008-02-22 00:58:21 UTC
I really would like to help give a backtrace.

Can someone please give my the commands that they would do in order to do so.

Once I learn I am sure to give further backtraces in future.
Comment 7 Lubos Lunak 2008-03-07 20:29:47 UTC
Obviously the X screen stops updating when you use gdb to stop KWin and the compositing it does. You need to run gdb from text mode.
Comment 8 Morgan Cox 2008-04-03 16:27:42 UTC
This is still effecting - kde 4.0.3

I have tried (unsuccessfully) many times to get a backtrace.

I have now got gdb to continue however no output ever appears.

Please will somebody provide example lines so I can provide a backtrace and hopefully start solving this very serious bug  (i have tried asking at various forums with no response..)

This is what i am doing

From console in kde (as root)

# ps aux | grep kwin (to find kwin pid)

# gdb kwin (pid)

I turn logging on by

# set logging on

I then try to debug by using

# continue

- after using continue I can start to use kde (kwin) again, however no more output is created.

Can someone please point me in the right direction I must be doing something wrong............


Cheers

i.e - here is (one of many) attempts

-------------------------------------------------------------

suse64:/home/morgan # cat /home/kde4user/gdb-kwin.txt
GNU gdb 6.6.50.20070726-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
(gdb) attach 13394
Attaching to process 13394
Reading symbols from /usr/bin/kwin...Reading symbols from /usr/lib/debug/usr/bin/kwin.debug...done.
Using host libthread_db library "/lib64/libthread_db.so.1".
done.
Reading symbols from /usr/lib64/libkdeinit4_kwin.so...Reading symbols from /usr/lib/debug/usr/lib64/libkdeinit4_kwin.so.debug...done.
done.
Loaded symbols for /usr/lib64/libkdeinit4_kwin.so
Reading symbols from /usr/lib64/libSM.so.6...done.
Loaded symbols for /usr/lib64/libSM.so.6
Reading symbols from /usr/lib64/libICE.so.6...done.
Loaded symbols for /usr/lib64/libICE.so.6
Reading symbols from /usr/lib64/libX11.so.6...done.
Loaded symbols for /usr/lib64/libX11.so.6
Reading symbols from /usr/lib64/libXext.so.6...done.
Loaded symbols for /usr/lib64/libXext.so.6
Reading symbols from /usr/lib64/libXft.so.2...done.
Loaded symbols for /usr/lib64/libXft.so.2
Reading symbols from /usr/lib64/libXau.so.6...done.
Loaded symbols for /usr/lib64/libXau.so.6
Reading symbols from /usr/lib64/libXdmcp.so.6...done.
Loaded symbols for /usr/lib64/libXdmcp.so.6
Reading symbols from /usr/lib64/libXpm.so.4...done.
Loaded symbols for /usr/lib64/libXpm.so.4
Reading symbols from /usr/lib64/libXfixes.so.3...done.
Loaded symbols for /usr/lib64/libXfixes.so.3
Reading symbols from /usr/lib64/libXrender.so.1...done.
Loaded symbols for /usr/lib64/libXrender.so.1
Reading symbols from /usr/lib64/libkdecorations.so.4...Reading symbols from /usr/lib/debug/usr/lib64/libkdecorations.so.4.0.0.debug...done.
done.
Loaded symbols for /usr/lib64/libkdecorations.so.4
Reading symbols from /usr/lib64/libkwineffects.so.1...Reading symbols from /usr/lib/debug/usr/lib64/libkwineffects.so.1.0.0.debug...done.
done.
Loaded symbols for /usr/lib64/libkwineffects.so.1
Reading symbols from /usr/lib64/libQtSvg.so.4...done.
Loaded symbols for /usr/lib64/libQtSvg.so.4
Reading symbols from /usr/lib64/libkdecore.so.5...Reading symbols from /usr/lib/debug/usr/lib64/libkdecore.so.5.0.0.debug...done.
done.
Loaded symbols for /usr/lib64/libkdecore.so.5
Reading symbols from /usr/lib64/libQtCore.so.4...done.
Loaded symbols for /usr/lib64/libQtCore.so.4
Reading symbols from /lib64/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0x2b7009a99ec0 (LWP 13394)]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /usr/lib64/libQtNetwork.so.4...done.
Loaded symbols for /usr/lib64/libQtNetwork.so.4
Reading symbols from /usr/lib64/libQtDBus.so.4...done.
Loaded symbols for /usr/lib64/libQtDBus.so.4
Reading symbols from /lib64/libz.so.1...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libbz2.so.1...done.
Loaded symbols for /lib64/libbz2.so.1
Reading symbols from /lib64/libresolv.so.2...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /usr/lib64/libQtGui.so.4...done.
Loaded symbols for /usr/lib64/libQtGui.so.4
Reading symbols from /usr/lib64/libQtXml.so.4...done.
Loaded symbols for /usr/lib64/libQtXml.so.4
Reading symbols from /usr/lib64/libXtst.so.6...done.
Loaded symbols for /usr/lib64/libXtst.so.6
Reading symbols from /usr/lib64/libXcursor.so.1...done.
Loaded symbols for /usr/lib64/libXcursor.so.1
Reading symbols from /usr/lib64/libkdeui.so.5...Reading symbols from /usr/lib/debug/usr/lib64/libkdeui.so.5.0.0.debug...done.
done.
Loaded symbols for /usr/lib64/libkdeui.so.5
Reading symbols from /usr/lib64/libGL.so.1...done.
Loaded symbols for /usr/lib64/libGL.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /usr/lib64/libkwinnvidiahack.so.4...Reading symbols from /usr/lib/debug/usr/lib64/libkwinnvidiahack.so.4.0.0.debug...done.
done.
Loaded symbols for /usr/lib64/libkwinnvidiahack.so.4
Reading symbols from /usr/lib64/libXrandr.so.2...done.
Loaded symbols for /usr/lib64/libXrandr.so.2
Reading symbols from /usr/lib64/libXcomposite.so.1...done.
Loaded symbols for /usr/lib64/libXcomposite.so.1
Reading symbols from /usr/lib64/libXdamage.so.1...done.
Loaded symbols for /usr/lib64/libXdamage.so.1
Reading symbols from /usr/lib64/libstdc++.so.6...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libgcc_s.so.1...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /usr/lib64/libxcb-xlib.so.0...done.
Loaded symbols for /usr/lib64/libxcb-xlib.so.0
Reading symbols from /usr/lib64/libxcb.so.1...done.
Loaded symbols for /usr/lib64/libxcb.so.1
Reading symbols from /usr/lib64/libfontconfig.so.1...done.
Loaded symbols for /usr/lib64/libfontconfig.so.1
Reading symbols from /usr/lib64/libfreetype.so.6...done.
Loaded symbols for /usr/lib64/libfreetype.so.6
Reading symbols from /usr/lib64/libpng12.so.0...done.
Loaded symbols for /usr/lib64/libpng12.so.0
Reading symbols from /usr/lib64/libXi.so.6...done.
Loaded symbols for /usr/lib64/libXi.so.6
Reading symbols from /usr/lib64/libXinerama.so.1...done.
Loaded symbols for /usr/lib64/libXinerama.so.1
Reading symbols from /usr/lib64/libgthread-2.0.so.0...done.
Loaded symbols for /usr/lib64/libgthread-2.0.so.0
Reading symbols from /lib64/librt.so.1...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /usr/lib64/libglib-2.0.so.0...done.
Loaded symbols for /usr/lib64/libglib-2.0.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libdbus-1.so.3...done.
Loaded symbols for /lib64/libdbus-1.so.3
Reading symbols from /usr/lib64/libGLcore.so.1...done.
Loaded symbols for /usr/lib64/libGLcore.so.1
Reading symbols from /usr/lib64/tls/libnvidia-tls.so.1...done.
Loaded symbols for /usr/lib64/tls/libnvidia-tls.so.1
Reading symbols from /lib64/libexpat.so.1...done.
Loaded symbols for /lib64/libexpat.so.1
Reading symbols from /usr/lib64/libpcre.so.0...done.
Loaded symbols for /usr/lib64/libpcre.so.0
Reading symbols from /usr/lib64/gconv/UTF-16.so...done.
Loaded symbols for /usr/lib64/gconv/UTF-16.so
Reading symbols from /usr/lib64/kde4/plugins/styles/oxygen.so...done.
Loaded symbols for /usr/lib64/kde4/plugins/styles/oxygen.so
Reading symbols from /usr/lib64/kde4/kwin3_oxygen.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/kwin3_oxygen.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/kwin3_oxygen.so
Reading symbols from /usr/lib64/kde4/kwin4_effect_builtins.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/kwin4_effect_builtins.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/kwin4_effect_builtins.so
Reading symbols from /usr/lib64/qt4/plugins/imageformats/libqgif.so...done.
Loaded symbols for /usr/lib64/qt4/plugins/imageformats/libqgif.so
Reading symbols from /usr/lib64/qt4/plugins/imageformats/libqjpeg.so...done.
Loaded symbols for /usr/lib64/qt4/plugins/imageformats/libqjpeg.so
Reading symbols from /usr/lib64/libjpeg.so.62...done.
Loaded symbols for /usr/lib64/libjpeg.so.62
Reading symbols from /usr/lib64/qt4/plugins/imageformats/libqmng.so...done.
Loaded symbols for /usr/lib64/qt4/plugins/imageformats/libqmng.so
Reading symbols from /usr/lib64/libmng.so.1...done.
Loaded symbols for /usr/lib64/libmng.so.1
Reading symbols from /usr/lib64/liblcms.so.1...done.
Loaded symbols for /usr/lib64/liblcms.so.1
Reading symbols from /usr/lib64/qt4/plugins/imageformats/libqsvg.so...done.
Loaded symbols for /usr/lib64/qt4/plugins/imageformats/libqsvg.so
Reading symbols from /usr/lib64/qt4/plugins/imageformats/libqtiff.so...done.
Loaded symbols for /usr/lib64/qt4/plugins/imageformats/libqtiff.so
Reading symbols from /usr/lib64/libtiff.so.3...done.
Loaded symbols for /usr/lib64/libtiff.so.3
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_dds.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_dds.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_dds.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_eps.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_eps.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_eps.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_exr.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_exr.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_exr.so
Reading symbols from /usr/lib64/libImath.so.4...done.
Loaded symbols for /usr/lib64/libImath.so.4
Reading symbols from /usr/lib64/libIlmImf.so.4...done.
Loaded symbols for /usr/lib64/libIlmImf.so.4
Reading symbols from /usr/lib64/libIex.so.4...done.
Loaded symbols for /usr/lib64/libIex.so.4
Reading symbols from /usr/lib64/libHalf.so.4...done.
Loaded symbols for /usr/lib64/libHalf.so.4
Reading symbols from /usr/lib64/libIlmThread.so.4...done.
Loaded symbols for /usr/lib64/libIlmThread.so.4
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_ico.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_ico.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_ico.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_jp2.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_jp2.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_jp2.so
Reading symbols from /usr/lib64/libjasper.so.1...done.
Loaded symbols for /usr/lib64/libjasper.so.1
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_pcx.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_pcx.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_pcx.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_psd.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_psd.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_psd.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_rgb.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_rgb.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_rgb.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_tga.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_tga.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_tga.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_xcf.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_xcf.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_xcf.so
Reading symbols from /usr/lib64/kde4/plugins/imageformats/kimg_xview.so...Reading symbols from /usr/lib/debug/usr/lib64/kde4/plugins/imageformats/kimg_xview.so.debug...done.
done.
Loaded symbols for /usr/lib64/kde4/plugins/imageformats/kimg_xview.so
0x00002b7006f0d9af in poll () from /lib64/libc.so.6
(gdb) continue
Continuing.

--------------------------------

No more output is produced - even when it does crash X/kwin....
Comment 9 Morgan Cox 2008-06-26 16:53:49 UTC
Can any one help - still effecting opensuse 11.0 - 4.0.4 and 4.1 beta.........
Comment 10 Morgan Cox 2008-06-26 16:54:44 UTC
I mean aany working examples of how to give a backtrace for kwin..
Comment 12 siegfried 2008-10-26 12:19:46 UTC
Created attachment 28154 [details]
valgrind
Comment 13 siegfried 2008-10-26 12:25:03 UTC
Comment on attachment 28154 [details]
valgrind

I'm using ubuntu intripid, with a nvidia quadro 140M. 
Everytime I try to use sharpen desktop or looking glass zoom kwin seems to lock up.  

gdb doesn't gave any usefull information at the time off the lock up.
You find the valgrind log in the attachment.
Comment 14 siegfried 2008-12-01 13:01:20 UTC
looking glass and sharpen desktop is working in the nightly build off kde 4.2. 
Comment 15 lucas 2008-12-14 12:15:26 UTC
Morgan, can you reproduce with the latest KDE 4.2 betas and latest graphics drivers? Also maybe try with `KWIN_DIRECT_GL=1 kwin --replace &` if it doesn't work straight away.
Comment 16 lucas 2008-12-14 12:15:48 UTC
Whoops, didn't need to close it.
Comment 17 Morgan Cox 2008-12-15 12:39:10 UTC
I shall try shortly and post back results.
Comment 18 Stijn Van Nieuwenhuyse 2009-01-13 19:20:47 UTC
When using sharpen desktop I see the same behavior as siegfried: kwin locks up. I can move my mouse, but cannot do anything usefull anymore with my desktop.

graphics card: nvidia quadro 140M
graphics card driver: 180.22
KDE: 4.1.96
Distribution: Arch Linux
Comment 19 siegfried 2009-02-05 00:29:04 UTC
I was to optimistic. I'm working with kde 4.2 final in ubuntu jaunty at the moment. And I'm still experiencing the lock up. 

I'm almost starting to think that it has something to do with this specific nvidia card. 
Comment 20 Morgan Cox 2009-02-05 14:33:29 UTC
Still happens with kde 4.2 (ubuntu x86_64)

Kwin however is massively improved in speed (seems like about 1000% faster) and more stable.

If someone here provided a step by step instructions of how to provide a backtrace (i.e dont just point me to the kwin gdb page as that hasn't helped)I would happily provide one.

i.e if someone could provide example of how they get their's.....

kde 4 is now (with the exception of a few kwin issues) looking so good ! 

thanks
Comment 21 Martin Flöser 2009-04-27 22:03:12 UTC
can someone please try with rev 960039 ( http://websvn.kde.org/?view=rev&revision=960039 )?
Comment 22 Martin Flöser 2009-04-28 19:53:44 UTC
(In reply to comment #21)
> can someone please try with rev 960039 (
> http://websvn.kde.org/?view=rev&revision=960039 )?

or with KDE 4.2.3?
Comment 23 siegfried 2009-05-18 00:52:52 UTC
Thanks the bug is solved for me.
I'm running kde 4.2.3 at the moment.
Comment 24 Martin Flöser 2009-05-18 10:50:36 UTC
(In reply to comment #23)
> Thanks the bug is solved for me.
> I'm running kde 4.2.3 at the moment.
so fixed