Bug 325815 - xulrunner crashes with pencil application
Summary: xulrunner crashes with pencil application
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 329767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-09 13:53 UTC by nucleo
Modified: 2014-01-09 16:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
debug log (102.49 KB, text/plain)
2013-10-28 00:59 UTC, nucleo
Details
patch (569 bytes, patch)
2014-01-09 15:59 UTC, Hugo Pereira Da Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nucleo 2013-10-09 13:53:53 UTC
Description of problem:
I've just started the Pencil application, after install.

Version-Release number of selected component:
xulrunner-23.0.1-4.fc19
oxygen-gtk2-1.4.0

Reproducible: Always

Steps to Reproduce:
This happens every time I try to click in the menu bar.
Actual Results:  
Additional info:
reporter:       libreport-2.1.7
backtrace_rating: 4
cmdline:        /usr/lib64/xulrunner/xulrunner --app /usr/share/pencil/application.ini
crash_function: nsProfileLock::FatalSignalHandler
executable:     /usr/lib64/xulrunner/xulrunner
kernel:         3.10.11-200.fc19.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000
var_log_messages: Sep 16 11:27:31 localhost abrt[9445]: Saved core dump of pid 9412 (/usr/lib64/xulrunner/xulrunner) to /var/tmp/abrt/ccpp-2013-09-16-11:27:29-9412 (290811904 bytes)

Truncated backtrace:
Thread no. 1 (10 frames)
 #1 nsProfileLock::FatalSignalHandler at /usr/src/debug/xulrunner-23.0.1/mozilla-release/objdir/toolkit/profile/nsProfileLock.cpp:180
 #3 mozalloc_abort at /usr/src/debug/xulrunner-23.0.1/mozilla-release/memory/mozalloc/mozalloc_abort.cpp:30
 #4 Abort at /usr/src/debug/xulrunner-23.0.1/mozilla-release/xpcom/base/nsDebugImpl.cpp:430
 #5 NS_DebugBreak at /usr/src/debug/xulrunner-23.0.1/mozilla-release/xpcom/base/nsDebugImpl.cpp:417
 #6 X11Error at /usr/src/debug/xulrunner-23.0.1/mozilla-release/toolkit/xre/nsX11ErrorHandler.cpp:157
 #8 handle_error at xcb_io.c:213
 #9 handle_response at xcb_io.c:325
 #11 XShapeGetRectangles at XShape.c:457
 #12 _xwindow_get_shape at gdkwindow-x11.c:4687
 #13 _gdk_windowing_get_shape_for_mask at gdkwindow-x11.c:4739


Changing theme to Adwaita theme it works normally.
See https://bugzilla.redhat.com/show_bug.cgi?id=1008431
Comment 1 Ruslan Kabatsayev 2013-10-09 13:58:16 UTC
What Pencil do you use? I've tried Ubuntu-provided pencil package, it gives me some graphics editor which is apparently Qt-based, so it doesn't crash.
Comment 2 nucleo 2013-10-09 14:00:07 UTC
Name        : pencil
Arch        : noarch
Version     : 2.0.4
Release     : 3.fc20
Size        : 4.3 M
Repo        : fedora/20/i386
Summary     : A sketching and GUI prototyping tool
URL         : http://code.google.com/p/evoluspencil/
License     : GPLv2
Description : Pencil is an open source GUI prototyping and sketching tools released under GPL.
Comment 3 Hugo Pereira Da Costa 2013-10-09 15:04:13 UTC
another case of undetected xul it seems.
investigating ...
Comment 4 Hugo Pereira Da Costa 2013-10-09 15:11:42 UTC
Can't reproduce here.
The application is recognized as xul:

ApplicationName::initialize - from pid: xulrunner-bin from gtk: xulrunner-bin
ApplicationName::initialize - from pid: xulrunner-bin from gtk: xulrunner-bin internal: XUL (Mozilla) version: 0x0

And I can't see it crash.

What's the output at the beginning of the log (corresponding to ApplicationName) when you run with oxygen-gtk compiled in debug mode ?
Comment 5 Christoph Feck 2013-10-23 20:50:36 UTC
If you can provide the information requested in comment #4, please add it.
Comment 6 nucleo 2013-10-28 00:59:28 UTC
Created attachment 83170 [details]
debug log
Comment 7 Hugo Pereira Da Costa 2014-01-09 15:50:12 UTC
*** Bug 329767 has been marked as a duplicate of this bug. ***
Comment 8 Hugo Pereira Da Costa 2014-01-09 15:57:36 UTC
Sorry for the late answer

Issue here in your case that the pidapplication name is indeed tagged as xulrunner but not the gtk app name:
ApplicationName::initialize - from pid: xulrunner from gtk: pencil

as opposed to mine: 

ApplicationName::initialize - from pid: xulrunner-bin from gtk: xulrunner-bin 

I guess that this varies (damn) depending on the pencil version.
Anyway easy fix is to test both app names.
Will provide a patch in next comment, in case someone (nucleo ? Maxim ?) can test

Hugo
Comment 9 Hugo Pereira Da Costa 2014-01-09 15:59:06 UTC
Created attachment 84535 [details]
patch

would be nice if someone could compile oxygen-gtk (either master or 1.4 branch) with this patch added and check, since I cannot reproduce the crash myself

once done, I'll commit so that it gets included in the next release (next week).
Comment 10 Hugo Pereira Da Costa 2014-01-09 15:59:59 UTC
@maxim
if you're willing to test and need help to get the sources, apply the patch, compile and/or install, don't hesitate to ask
Comment 11 Maxim Egorushkin 2014-01-09 16:06:46 UTC
@hugo, I don't mind compiling and testing, as long as it does not destroy my existing Fedora 20 KDE install ) Point me to the docs, what and how to build, I can apply the patch and compile.
Comment 12 Hugo Pereira Da Costa 2014-01-09 16:14:14 UTC
well, this will erase your old install of oxygen-gtk2 (but that should not be a big deal)
The instructions

get the sources from http://kde-look.org/content/show.php/?content=136216
(take the gtk2-1.4.1 version)

you need to have dev packages for gtk+-2.0, cairo. You also need cmake and gcc-c++
Then: 

gtar -xvf oxygen-gtk2-1.4.1.tar.bz2
cd oxygen-gtk2-1.4.1
patch -p1 < pencil.patch
mkdir build
cd build
cmake ..
make
sudo make install

... should work
Until sudo make install, all is safe, you don't break anything.
After install this should erase your old version. But you can always roll back don't worry (its a quite tiny library with little dependencies.
Comment 13 Maxim Egorushkin 2014-01-09 16:38:37 UTC
I applied the patch, compiled and installed. Pencil does not crash on menu open any more.

Thanks a lot Hugo.
Comment 14 Hugo Pereira Da Costa 2014-01-09 16:39:25 UTC
Git commit ae0336220e7d9d10eeba6277ed01764710862624 by Hugo Pereira Da Costa.
Committed on 09/01/2014 at 16:00.
Pushed by hpereiradacosta into branch '1.4'.

Check both pid and gtk app name to identify XUL applications

M  +1    -1    src/oxygenapplicationname.cpp

http://commits.kde.org/oxygen-gtk/ae0336220e7d9d10eeba6277ed01764710862624
Comment 15 Hugo Pereira Da Costa 2014-01-09 16:39:58 UTC
@Maxim
thanks a lot for testing.
Closing the bug.

best

Hugo