Summary: | Gwenview presentation with video: freeze and crash | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | Francesco Frassinelli <fraph24> |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | agateau, benni, fraph24 |
Priority: | NOR | ||
Version: | 2.10.0 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/gwenview/6bd0a3f79fd06447e5db4dadadedc5882947f4ca | Version Fixed In: | 4.10.0 |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
check if mActivityResources contains a NULL pointer for view New crash information added by DrKonqi Don't set current view if mActivityResources doesn't contain it Another approach to fix the crash |
Description
Francesco Frassinelli
2013-01-01 12:23:47 UTC
I tried to reproduce it. I didn't crashed, but it freeze everytime the video ends: if I press space to jump to the next item, I have no problem (only a little delay switching from the next item to the after one). When blocked, I can move the mouse on the top and click on the bar and I can go on, after a bit delay. This happens with every video. I tried to play one of those with Dragon Player, and it works without any problem. Hi, I also own a N9 but I couldn't reproduce your issue. But perhaps you could test this patch I wrote to avoid a memory leak with videos from my Panasonic G3 camera (which also freezes the system): https://git.reviewboard.kde.org/r/108070/ Created attachment 76137 [details]
New crash information added by DrKonqi
gwenview (2.10.0) on KDE Platform 4.9.95 using Qt 4.8.4
I reproduced the situation of freeze and crash without using the presentation (F11) mode. I looked at memory usage with KDE System Monitor: when the video starts it uses ~115 MB, no strange consumption, but just before it crashed it jumped to ~280 MB.
I'll try to reproduce it with a longer video and to recompile Gwenview with your patch.
-- Backtrace (Reduced):
#6 KActivities::ResourceInstance::notifyFocusedIn (this=0x0) at /usr/src/debug/kactivities-4.9.95/src/lib/core/resourceinstance.cpp:125
#7 0x00000000004322ab in setCurrentView (view=0x15b2880, this=0x128eed0) at /usr/src/debug/gwenview-4.9.95/app/viewmainpage.cpp:364
#8 Gwenview::ViewMainPage::slotViewFocused (this=<optimized out>, view=<optimized out>) at /usr/src/debug/gwenview-4.9.95/app/viewmainpage.cpp:728
[...]
#10 0x0000003027a88452 in Gwenview::DocumentView::focused (this=<optimized out>, _t1=0x15b2880) at /usr/src/debug/gwenview-4.9.95/x86_64-redhat-linux-gnu/lib/documentview.moc:291
#11 0x0000003027a8abb8 in Gwenview::DocumentView::emitFocused (this=<optimized out>) at /usr/src/debug/gwenview-4.9.95/lib/documentview/documentview.cpp:679
I didn't test your patch, but it doesn't seem to be a memory leak. Gwenview memory jumps only when it crash and DrKonqi try to generate a backtrace for it. I have 4 GB of ram, and it never used more than 200 MB. Created attachment 76143 [details]
check if mActivityResources contains a NULL pointer for view
OK, I agree.
Could you test the attached patch. It checks that the KActivities::ResourceInstance pointer is not NULL (see the first line of your backtrace: this=0x0).
Created attachment 76146 [details]
New crash information added by DrKonqi
gwenview (2.10.0) on KDE Platform 4.9.95 using Qt 4.8.4
Patch "check if mActivityResources contains a NULL pointer for view" tested against revision ad716f19a6e659fbb16a6df0d326336c1fb372a3.
-- Backtrace (Reduced):
#6 0x0000003017035ba5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:63
#7 0x0000003017037358 in __GI_abort () at abort.c:90
[...]
#11 0x0000000000438d03 in Gwenview::ViewMainPagePrivate::setCurrentView (this=0x2955e70, view=0x50c2c90) at /home/frafra/Scaricati/gwenview/app/viewmainpage.cpp:363
#12 0x0000000000436a89 in Gwenview::ViewMainPage::slotViewFocused (this=0x2940ab0, view=0x50c2c90) at /home/frafra/Scaricati/gwenview/app/viewmainpage.cpp:731
#13 0x00000000004346ec in Gwenview::ViewMainPage::qt_static_metacall (_o=0x2940ab0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fffe92b4870) at /home/frafra/Scaricati/gwenview/build/app/viewmainpage.moc:76
Created attachment 76148 [details]
Don't set current view if mActivityResources doesn't contain it
Thanks. Could you apply this patch on top of the other one, please?
Sure! Some results: 1. I switched between some videos 10~15 times, without crash, but at the end I encountered the memory leak bug with some kernel warning, so I restarted my system and I applied the memory leak fix. 2. I get a partial freeze (from 5 to 30 seconds) if I use the right key to go to the next video, when the video ends. This doesn't happen if I use the toolbar button (>). 3. Sometimes the volume bar is not vertically centered (is higher). I think that the memory leak bug and the crash bug are fixed and point 2 and 3 are two different bugs (it doesn't seems that they were reported - should I open new two bug reports?). Great. I created a review request and will commit this when Aurélien gives his OK. https://git.reviewboard.kde.org/r/108095/ I can confirm the issue with the volume bar. Point 2 might be a shortcut conflict because the right key is also used to seek in the video. Created attachment 76168 [details]
Another approach to fix the crash
Sorry, but I don't like the proposed patch much: I feel like it workarounds the issue rather than fixing it.
I suspect the bug is caused by a view emitting signals while it is being deleted. Can you try attached patch instead?
It works well for me (second patch + memory leak fix). Just to be sure, did you revert the patch 1 before applying patch 2? I wouldn't want to commit patch 2 only if the fix is wrong. Git commit 6bd0a3f79fd06447e5db4dadadedc5882947f4ca by Aurélien Gâteau. Committed on 04/01/2013 at 13:00. Pushed by gateau into branch 'KDE/4.10'. Fix crash when a movie view is deleted When a view is being deleted we do not want to receive signals from it anymore, so disconnect it from us. FIXED-IN: 4.10.0 M +9 -0 app/viewmainpage.cpp http://commits.kde.org/gwenview/6bd0a3f79fd06447e5db4dadadedc5882947f4ca |