Bug 329112 - SIGSEGV crash when mouse moved over toolbar
Summary: SIGSEGV crash when mouse moved over toolbar
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: 4.11.3
Platform: Kubuntu Linux
: NOR grave (vote)
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 331927 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-22 10:01 UTC by Peter Hewett
Modified: 2014-03-11 16:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
details for bug report, version info, debug output (19.19 KB, text/plain)
2013-12-22 10:03 UTC, Peter Hewett
Details
sample data file for Gramps (415.97 KB, application/octet-stream)
2014-01-03 21:23 UTC, Peter Hewett
Details
patch corresponding to commit at comment #9 (11.95 KB, patch)
2014-01-04 10:17 UTC, Hugo Pereira Da Costa
Details
details of test with patch (8.24 KB, text/plain)
2014-01-04 19:59 UTC, Peter Hewett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hewett 2013-12-22 10:01:14 UTC
Using Kubuntu 3.10 64 bit
Software application gramps crashes SIGSEGV when mouse pointer is moved over the main toolbar.  The window just disappears, and this behaviour is repeatable. This behaviour appears to be similar to KDE bug 324438 (except that is with eclipse).
This crash doesn't happen if the GTK2 theme is changed from oxygen to Raleigh.  This is changed in System Settings > Application Appearance > GTK.
This crash does happen if GTK2 theme is set to oxygen, and "menu highlight" is unchecked in oxygen-settings.


Reproducible: Always

Steps to Reproduce:
1. start gramps
2. load tree
3. select people view and then person tree view from tool bar
4. select a person from the person tree list
5. click on relationship view
6. move mouse over toolbar (Gramps window disappears instantly).
Actual Results:  
Gramps window disappears instantly

Expected Results:  
Gramps should respond to icon clicked on toolbar

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff46cf92a in gtk_widget_queue_draw () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0

#0  0x00007ffff46cf92a in gtk_widget_queue_draw () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#1  0x00007fffed46b16e in Oxygen::ToolBarStateData::delayedUpdate(void*) () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
#2  0x00007fffed46b845 in Oxygen::ToolBarStateData::updateState(_GtkWidget*, bool, bool) () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
#3  0x00007fffed46bfc8 in Oxygen::ToolBarStateData::registerChild(_GtkWidget*, bool) () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
#4  0x00007fffed4fb3ed in ?? () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
Comment 1 Peter Hewett 2013-12-22 10:03:37 UTC
Created attachment 84227 [details]
details for bug report, version info, debug output
Comment 2 Hugo Pereira Da Costa 2013-12-26 19:27:07 UTC
Thanks for reporting.
Sadly I cannot reproduce, (as is the case with neither ecclipse etc.)
Does this one happens all the time ?
Since I have no "gramps" file, my toolbar has only one icon (for loading one). Is that enough to make the application crash ? 

Also, my versions are a bit more recent than yours. Could you try compile oxygen-gtk2 version 1.4.1 from source and see if crash still happens ?
Comment 3 Hugo Pereira Da Costa 2013-12-26 19:30:41 UTC
ok. On my side in fact, I have gramps 4.0, which uses gtk3 so the test is not relevant.
I'll try downgrade to an older version
Comment 4 Peter Hewett 2014-01-03 08:56:50 UTC
Thank you for your reply.
(Sorry for delay on my part, I have been travelling for the last week or so.)

Yes, the crash happens every time I follow the steps described above.  Using Gramps differently can go for some time before the crash happens.  
Also, I have tried this on two computers running Kubuntu 13.10 64bit and one running Kubuntu 13.10 32 bit, all with Gramps 3.4.6-1, and all exhibit the same symptoms.

I will see if I can figure out how to compile and install the 1.4.1 version of oxygen-gtk2.
Comment 5 Hugo Pereira Da Costa 2014-01-03 10:23:37 UTC
I have downgraded gramps to version 3.6.1, as well as oxygen-gtk2 but still can't reproduce the crash, unfortunately. 
Now, having no data to load, the amount of things I can do with gramps is rather limited, so I can't really investigate. Do you have a 'sample' family tree' somewhere that I could load to try test a bit further ? (does not have to be yours :))
Comment 6 Hugo Pereira Da Costa 2014-01-03 14:11:03 UTC
good news. I can reproduce the crash.
Will investigate. That will hopefully fix many other crashes (ecclipse etc.) with same backtrace.
Will keep you posted.
Comment 7 Hugo Pereira Da Costa 2014-01-03 17:30:52 UTC
ok. Sadly, I seem to be unable to get any stderr/stdout from oxygen-gtk when running inside gramps (likely due to the python logger it is using), and thus can't debug much 
(can't run gdb either). 

Any clue how can I enable stdout and stderr when starting gramps ?
Comment 8 Ruslan Kabatsayev 2014-01-03 18:36:39 UTC
> (can't run gdb either). 
Its "binary" is a shell script (at least here in Ubuntu). There it starts python. You could change its command from "exec /usr/bin/python OPTIONS" to "exec gdb /usr/bin/python -ex 'r OPTIONS'". I've started it successfully in gdb (didn't try to reproduce the crash though).
Comment 9 Hugo Pereira Da Costa 2014-01-03 18:38:34 UTC
Git commit c52b7367d99444ace2743c87364591cb0dd164a7 by Hugo Pereira Da Costa.
Committed on 03/01/2014 at 17:47.
Pushed by hpereiradacosta into branch '1.4'.

properly reset _previous and _current widget, if matching, in case of child destruction, for ToolbarStateData, MenuStateData, MenuBarStateData
Related: bug 324438, bug 328495, bug 325196

M  +91   -0    src/animations/oxygenmenubarstatedata.cpp
M  +15   -0    src/animations/oxygenmenubarstatedata.h
M  +90   -0    src/animations/oxygenmenustatedata.cpp
M  +15   -0    src/animations/oxygenmenustatedata.h
M  +13   -0    src/animations/oxygentoolbarstatedata.cpp

http://commits.kde.org/oxygen-gtk/c52b7367d99444ace2743c87364591cb0dd164a7
Comment 10 Hugo Pereira Da Costa 2014-01-03 18:40:02 UTC
@Peter
Can you try when compiling version 1.4 from source ? 
I "think" I have fixed the issue, although I did not check extensively
(the code change in ToolbarStateData makes sense though in terms on how the old code could indeed crash and the new one should not)
Comment 11 Hugo Pereira Da Costa 2014-01-03 18:58:02 UTC
Git commit a9fd101716d92623e410099d9b13f31cb3236fe8 by Hugo Pereira Da Costa.
Committed on 03/01/2014 at 17:47.
Pushed by hpereiradacosta into branch 'gtk3'.

properly reset _previous and _current widget, if matching, in case of child destruction, for ToolbarStateData, MenuStateData, MenuBarStateData
Related: bug 324438, bug 328495, bug 325196

M  +91   -0    src/animations/oxygenmenubarstatedata.cpp
M  +15   -0    src/animations/oxygenmenubarstatedata.h
M  +90   -0    src/animations/oxygenmenustatedata.cpp
M  +15   -0    src/animations/oxygenmenustatedata.h
M  +13   -0    src/animations/oxygentoolbarstatedata.cpp

http://commits.kde.org/oxygen-gtk/a9fd101716d92623e410099d9b13f31cb3236fe8
Comment 12 Hugo Pereira Da Costa 2014-01-03 18:58:05 UTC
Git commit bd052fe914c6cf9da70dd4ab931a4b563cb6e742 by Hugo Pereira Da Costa.
Committed on 03/01/2014 at 17:47.
Pushed by hpereiradacosta into branch 'gtk3-1.2'.

properly reset _previous and _current widget, if matching, in case of child destruction, for ToolbarStateData, MenuStateData, MenuBarStateData
Related: bug 324438, bug 328495, bug 325196

M  +91   -0    src/animations/oxygenmenubarstatedata.cpp
M  +15   -0    src/animations/oxygenmenubarstatedata.h
M  +90   -0    src/animations/oxygenmenustatedata.cpp
M  +15   -0    src/animations/oxygenmenustatedata.h
M  +13   -0    src/animations/oxygentoolbarstatedata.cpp

http://commits.kde.org/oxygen-gtk/bd052fe914c6cf9da70dd4ab931a4b563cb6e742
Comment 13 Peter Hewett 2014-01-03 21:18:15 UTC
I have created a virtual PC using virtualbox, installed Kubuntu 13.10 64bit, updates, gramps 3.4.0-1 from Ubuntu repo, install python-pygoocanvas and python-central, then gramps 3.4.6-1 from sourceforge.  This setup does the same crash behaviour.  I'll upload a sample data file.
Comment 14 Peter Hewett 2014-01-03 21:23:46 UTC
Created attachment 84435 [details]
sample data file for Gramps

To use this file, run gramps, create a new family tree, load this new tree, select file import to import this gpkg file.
Comment 15 Peter Hewett 2014-01-03 22:21:30 UTC
Test with oxygen 1.4.1 from kde-look.org;

Using Kubuntu 13.10 64bit in virtualbox
install gramps 3.4.0-1 from Ubuntu repo and dependencies
install python-pygoocanvas, python-central
install gramps 3.4.6-1 from gramps-project
test shows crash symptoms as reported earlier

install build-essential, libcairo2-dev, cmake, gtk+-2.0
download oxygen-gtk2 1.4.1 tarball, extract, follow instructions in INSTALL file, reboot

peter@gramps-VirtualBox:~$ oxygen-gtk-demo --version
1.4.1
peter@gramps-VirtualBox:~$ cd /usr/share/gramps/
peter@gramps-VirtualBox:/usr/share/gramps$ gdb python
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python2.7...(no debugging symbols found)...done.
(gdb) run gramps.py
Starting program: /usr/bin/python gramps.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2014-01-04 11:11:49.998: WARNING: Utils.py: line 319: PyICU not available: sorting may be incorrect
[New Thread 0x7fffeced8700 (LWP 1910)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff46cf92a in gtk_widget_queue_draw () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
(gdb) quit

This is similar crash behaviour as with teh version of oxygen that shipped with Kubuntu.
Comment 16 Hugo Pereira Da Costa 2014-01-04 10:17:17 UTC
Created attachment 84441 [details]
patch corresponding to commit at comment #9

@peter
Thanks for compiling the sources directly from the 1.4.1 tarball.
The crash is indeed expected to happen just the same with this code.
Now, since you have the source code, you might want to test the patch attached.
  cd oxygen-gtk-1.4.1
  patch -p1 < patch.diff
  make
  sudo make install

This will apply the code changes described in comment #9 and that are expected to fix the issue. Tell me if you still experience the crash after that. 

This code change will hopefully be included in the next release (1.4.2)
Comment 17 Peter Hewett 2014-01-04 19:59:26 UTC
Created attachment 84454 [details]
details of test with patch

@Hugo
thank you for your response and the patch

However, I haven't managed to get it to work here.  I tried the steps in comment #16, but the make step gave an error.  So I followed the steps on the oxygen-gtk page on kde-look.org.  Then ran gramps, but the crash still happens as before.  Also tried again after a reboot of the virtual machine.  The attached file has command line details.  (Sorry, I'm not familiar with coding and compiling, so there is probably something I've not got quite right here.)
Comment 18 Hugo Pereira Da Costa 2014-01-04 20:18:05 UTC
ok. What you did is correct (make should indeed be run from the "build" directory.
Bad news: seems like the patch does not fix the problem.
(though I was not able to make the application crash anymore here)
I'll investigate further.

Thanks for the help !
Comment 19 Ruslan Kabatsayev 2014-01-04 20:20:42 UTC
@Hugo he didn't succeed in installing. It installed in / instead of correct prefix.

@Peter
I'd suggest removing everything from build/ directory and redo compilation & installation starting from cmake invocation. Also, you'll need to remove erroneously installed /share and /gtk-2.0 directories (first checking that only the files you installed are there!) and /bin/oxygen-gtk-demo.
Comment 20 Ruslan Kabatsayev 2014-01-04 20:22:11 UTC
@Peter also before using sudo make install first try doing make install without sudo - and check that it tries to install not to /{share,gtk-2.0,bin}.
Comment 21 Peter Hewett 2014-01-04 20:27:32 UTC
Success!
Gramps now runs without the crash experienced earlier.

It appears I didn't have things set up properly, and the new compiled file didn't end up in the correct directory.  See below.

peter@gramps-VirtualBox:~$ locate liboxygen
/gtk-2.0/engines/liboxygen-gtk.so
/home/peter/Downloads/oxygen-gtk2-1.4.1/build/src/liboxygen-gtk.so
/usr/lib/liboxygenstyle.so.4
/usr/lib/liboxygenstyle.so.4.11.3
/usr/lib/liboxygenstyleconfig.so.4
/usr/lib/liboxygenstyleconfig.so.4.11.3
/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/theming-engines/liboxygen-gtk.so

peter@gramps-VirtualBox:~$ cd /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/
peter@gramps-VirtualBox:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines$ ls -l
total 1296
-rw-r--r-- 1 root root 1325032 Jun  4  2013 liboxygen-gtk.so
peter@gramps-VirtualBox:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines$ sudo mv liboxygen-gtk.so liboxygen-gtk.so.bak
peter@gramps-VirtualBox:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines$ sudo cp /gtk-2.0/engines/liboxygen-gtk.so liboxygen-gtk.so
peter@gramps-VirtualBox:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines$ ls -l
total 13536
-rw-r--r-- 1 root root 12530654 Jan  5 09:16 liboxygen-gtk.so
-rw-r--r-- 1 root root  1325032 Jun  4  2013 liboxygen-gtk.so.bak


After the above steps, gramps runs without crashing.

Thanks for your help!
Comment 22 Hugo Pereira Da Costa 2014-01-05 13:43:13 UTC
Great news
The fix will be included in the comming 1.4.2 release (within a week or two), as well as with next gtk3 release (that should be affected too).

Closing this bug report.
Will wait for feedback on the other (similar) bug reports, and will close too if none comes by the time we release.

Many thanks for the reporting and testing !

Hugo
Comment 23 Hugo Pereira Da Costa 2014-03-11 16:59:41 UTC
*** Bug 331927 has been marked as a duplicate of this bug. ***