Bug 288271 - KSnapshot generates empty images
Summary: KSnapshot generates empty images
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Unclassified
Component: effects-various (show other bugs)
Version: unspecified
Platform: Chakra Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 15:46 UTC by Manuel Tortosa
Modified: 2011-12-10 23:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Tortosa 2011-12-05 15:46:42 UTC
Version:           0.8.2 (using Devel) 
OS:                Linux

Sometimes (is easy to reproduce tryng 3/4 times), the generated snapshot is an empty image.

Happens easy in the "Window over cursor" mode (or whatsorver, i have my system in catalan xD).

Reproducible: Sometimes

Steps to Reproduce:
Open KSnapshot, 4.8 beta 2 or a git snapshot, select the window under cursor mode and take a screenshot. If the screenshot is correct, try 3,4 times is easy to reproduce

Actual Results:  
An empty image or completelly black is generated.

Expected Results:  
A snapshot xD

OS: Linux (x86_64) release 3.1-CHAKRA
Compiler: gcc
Comment 1 Christoph Feck 2011-12-06 23:41:33 UTC
Are you using Desktop Effects? If yes, is the screen snapshot helper effect enabled or does changing compositing mode or effects help?
Comment 2 Manuel Tortosa 2011-12-06 23:54:34 UTC
Indeed disabling the compositing helps and also switching to xrender, only affects with OpenGL compositing enabled.

I'm using the latest nVidia propietary driver.
Comment 3 Christoph Feck 2011-12-07 09:10:28 UTC
Thanks, sounds like the problem is in the OpenGL implementation of the screen snapshot effect, or in the OpenGL drivers. Which video/GL drivers are you using?
Comment 4 Christoph Feck 2011-12-07 09:10:59 UTC
Oh, comment #2 already mentions them ...
Comment 5 Thomas Lübking 2011-12-07 13:26:10 UTC
nope, but i was able to crash the screenshot effect (no dealy, clicking where ksnapshot used to be - maybe some close effect)

For the records:
-----------------

Application: KWin (kwin), signal: Aborted
[Current thread is 1 (Thread 0xb05d1720 (LWP 2177))]

Thread 2 (Thread 0xad311b70 (LWP 2187)):
#0  0xb77d4424 in __kernel_vsyscall ()
#1  0xb60428fb in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb6c97fe9 in ?? () from /usr/lib/libQtScript.so.4
#3  0xb6c9802f in ?? () from /usr/lib/libQtScript.so.4
#4  0xb5503a9c in ?? () from /usr/lib/libGL.so.1
#5  0x00000000 in ?? ()

Thread 1 (Thread 0xb05d1720 (LWP 2177)):
[KCrash Handler]
#7  0xb77d4424 in __kernel_vsyscall ()
#8  0xb51eeb9f in raise () from /lib/libc.so.6
#9  0xb51f0525 in abort () from /lib/libc.so.6
#10 0xb543b38d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#11 0xb5439123 in ?? () from /usr/lib/libstdc++.so.6
#12 0xb543915f in std::terminate() () from /usr/lib/libstdc++.so.6
#13 0xb5439dd2 in __cxa_pure_virtual () from /usr/lib/libstdc++.so.6
#14 0xb6ab7ce1 in KWin::WindowPaintData::WindowPaintData (this=0xbfb4e4e0, w=0x8c65020) at /home/src/KDE4/kde-workspace/kwin/libkwineffects/kwineffects.cpp:63
#15 0xad3e19fe in KWin::ScreenShotEffect::postPaintScreen (this=0x8c62ad0) at /home/src/KDE4/kde-workspace/kwin/effects/screenshot/screenshot.cpp:70
#16 0xb77568de in KWin::EffectsHandlerImpl::postPaintScreen (this=0x8a39e90) at /home/src/KDE4/kde-workspace/kwin/effects.cpp:228
#17 0xb773137f in KWin::Scene::paintScreen (this=0x890e4b0, mask=0xbfb4e744, region=0xbfb4e7d0) at /home/src/KDE4/kde-workspace/kwin/scene.cpp:159
#18 0xb7749d4d in KWin::SceneOpenGL::paint (this=0x890e4b0, damage=..., toplevels=...) at /home/src/KDE4/kde-workspace/kwin/scene_opengl_glx.cpp:459
#19 0xb772a96b in KWin::Workspace::performCompositing (this=0x895f698) at /home/src/KDE4/kde-workspace/kwin/composite.cpp:396
#20 0xb61c6d04 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#21 0xb56d9a24 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0xb56dedd3 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb684d231 in KApplication::notify (this=0xbfb4eeb0, receiver=0x895f698, event=0xbfb4ebac) at /home/src/KDE4/kdelibs/kdeui/kernel/kapplication.cpp:311
#24 0xb76d4a7f in notify (e=0xbfb4ebac, o=0x895f698, this=0xbfb4eeb0) at /home/src/KDE4/kde-workspace/kwin/main.cpp:368
#25 KWin::Application::notify (this=0xbfb4eeb0, o=0x895f698, e=0xbfb4ebac) at /home/src/KDE4/kde-workspace/kwin/main.cpp:364
#26 0xb61aeb2e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#27 0xb61def70 in ?? () from /usr/lib/libQtCore.so.4
#28 0xb61df7c7 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0xb578e06e in ?? () from /usr/lib/libQtGui.so.4
#30 0xb61adb6d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0xb61addb1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0xb61b250d in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#33 0xb56d7894 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#34 0xb76d766d in kdemain (argc=2, argv=0xbfb4f114) at /home/src/KDE4/kde-workspace/kwin/main.cpp:525
#35 0x0804877b in main (argc=2, argv=0xbfb4f114) at /home/src/KDE4/BUILD_trunk/workspace/kwin/kwin_dummy.cpp:3
Comment 6 Thomas Lübking 2011-12-10 20:27:48 UTC
Git commit 57bd753c0f2f980b41d4ef5df812866f26c56e74 by Thomas Lübking.
Committed on 07/12/2011 at 15:04.
Pushed by luebking into branch 'master'.

sanitize closed screenshot windows, ignore deleted

CCBUG: 288271
REVIEW: 103350

M  +18   -4    kwin/effects/screenshot/screenshot.cpp
M  +3    -0    kwin/effects/screenshot/screenshot.h

http://commits.kde.org/kde-workspace/57bd753c0f2f980b41d4ef5df812866f26c56e74
Comment 7 Thomas Lübking 2011-12-10 20:39:45 UTC
The patch might indded also fix this bug, since i couldn't reproduce please have a try and update information on the bug.
Thanks.
Comment 8 Manuel Tortosa 2011-12-10 22:59:50 UTC
Ok, will backport the commit and report if works asap.
Comment 9 Manuel Tortosa 2011-12-10 23:52:39 UTC
After applying this commit, the issue reported here cannot be reproduced anymore, so you can close the bug.
Comment 10 Thomas Lübking 2011-12-10 23:58:34 UTC
=D

Many thanks for testing.