Bug 295803 - edit gradient in inkscape let inkscape crash
Summary: edit gradient in inkscape let inkscape crash
Status: CLOSED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-11 21:41 UTC by FabiB
Modified: 2013-05-12 19:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: v1.2.2-1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FabiB 2012-03-11 21:41:51 UTC
1. open inkscape
2. draw a box
3. set background type gradient
4. click edit gradient 
5. switch to the secound color -> crash

Happens every time 

Version: 1.2.1

Terminal output:
Gtk-CRITICAL **: IA__gtk_paint_layout: assertion `style->depth == gdk_drawable_get_depth (window)' failed
The program 'inkscape' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 59544 error_code 8 request_code 140 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

when I switch to gtk theme raleigh inkscape will not crash so i reported it here.
Comment 1 Ruslan Kabatsayev 2012-03-12 04:18:02 UTC
Can't reproduce with Inkscape 0.47pre4. What's your version?
Comment 2 Hugo Pereira Da Costa 2012-03-12 07:36:44 UTC
Can't reproduce with inkscape 0.48.1 either.
Please specify version
(and version of oxygen-gtk)
Comment 3 FabiB 2012-03-12 12:21:31 UTC
inkscape --version
Inkscape 0.48.3.1 r9886 (Mar  6 2012)

on Launchpad I found something similar: https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/948178
Comment 4 Hugo Pereira Da Costa 2012-03-12 12:25:46 UTC
So ... it seems like a "regression" in inkscape. I'd recommend to file a bug directly to them. possibly adding a pointer to this page. Doesn't mean that we can't fix it, but it might be easier on their side. Besides, I will only be able to try fix once my inkscape version is updated ...

Hugo
Comment 5 Hugo Pereira Da Costa 2012-03-12 12:27:15 UTC
PS: also, version 0.48.3 is apparently still tagged "unstable" by inkscape devs. Stable would be 0.48.2. Can you try downgrade inkscape and tell me if the crash still happens ?
Comment 6 FabiB 2012-03-12 12:41:51 UTC
inkscape --version
Inkscape 0.48.2 r9819 (Jul 11 2011)

same
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 49281 error_code 8 request_code 140 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

will report that to the inkscape project too
Comment 7 Hugo Pereira Da Costa 2012-03-12 14:07:05 UTC
... interestingly, I just compiled and installed version 0.48.3.1, and still can't reproduce.
Just to make sure that we are talking about the same thing: 

http://wstaw.org/m/2012/03/12/plasma-desktopzP3275.png

That's the dialog that crashes for you (when you click on the drop down list) . Correct ? 

Also: what oxygen-gtk version are you using ?
Comment 8 FabiB 2012-03-12 14:43:26 UTC
(In reply to comment #7)
> That's the dialog that crashes for you (when you click on the drop down
> list) . Correct ? 
Yep: for better understanding here a video: 
http://www.youtube.com/watch?v=LXbEOu6wn1E
> Also: what oxygen-gtk version are you using ?
Oxygen-gtk is V1.2.1
Comment 9 Hugo Pereira Da Costa 2012-03-12 14:52:41 UTC
Thanks for the video.
Sadly enough, that's exactly what I did, and with no crash.
Can you also provide your gtk+ version
(running out of ideas here I must say)
Comment 10 FabiB 2012-03-12 14:57:36 UTC
I really dont know how to get the gtk version. my packagemanager calls them
"2.24.10-0ubuntu5"
Comment 11 Hugo Pereira Da Costa 2012-03-12 15:07:20 UTC
ok ! 
I have 2.24.9
I guess I should update that too :)
Comment 12 Hugo Pereira Da Costa 2012-03-12 15:51:16 UTC
... still no luck with gtk+-2.24.10 (compiled manually) ....
seems inkscape is rock solid here ...
Comment 13 Hugo Pereira Da Costa 2012-03-16 20:05:03 UTC
ok. On my "other" computer, I am able to reproduce. Investigating.
Comment 14 Hugo Pereira Da Costa 2012-03-19 09:31:29 UTC
ok. I 'think' I was able to track it down to an issue with latest glib.
Using glib-2.31.20 -> crash
Using glib-2.31.18 -> no Crash

@Ruslan:
The crash here is actually related to the issue you have in gimp when (image->scale_canvas), change unit.
using glib-2.31.20 -> new unit does not appear
glib-2.31.18 -> unit does appear.

So, with you seing the gimp bug you should also be able to reproduce the inkscape crash (can you ?)
In both cases they are due to depth mismatch.

In which case. Can you reproduce my observation when downgrading glib ? 
If yes 
1/ that would be good news
2/ I might even be able to track the guilty change in glib
Comment 15 Hugo Pereira Da Costa 2012-03-19 10:31:47 UTC
ok. I have 
1/ a dirty fix: trigger on size-request event rather than parent-set event to re-attach style (that fixes the depth mismatch), cause the later is apparently not working any more, but the former does. This is very innefficient
2/ a possible clean (and even cleaner than before) fix, to use a Signal rather that a Hook, on parent-set event, attached to all GtkMenuItem's children.

Still working on 2/, and I'll push it to master as soon as done, for testing.
Comment 16 Hugo Pereira Da Costa 2012-03-19 10:38:46 UTC
Git commit 8710e03009c987db65b27a877b8e682bfc3101fd by Hugo Pereira Da Costa.
Committed on 19/03/2012 at 11:37.
Pushed by hpereiradacosta into branch 'master'.

moved style re-attachement from oxygenargbhelper to dedicated menuItem engine.

M  +1    -0    src/CMakeLists.txt
M  +1    -0    src/animations/oxygenanimations.cpp
M  +8    -0    src/animations/oxygenanimations.h
A  +93   -0    src/animations/oxygenmenuitemdata.cpp     [License: LGPL (v2)]
C  +20   -24   src/animations/oxygenmenuitemdata.h [from: src/oxygenargbhelper.h - 059% similarity]
A  +58   -0    src/animations/oxygenmenuitemengine.h     [License: LGPL (v2)]
M  +2    -66   src/oxygenargbhelper.cpp
M  +0    -9    src/oxygenargbhelper.h
M  +6    -0    src/oxygenstylewrapper.cpp

http://commits.kde.org/oxygen-gtk/8710e03009c987db65b27a877b8e682bfc3101fd
Comment 17 Hugo Pereira Da Costa 2012-03-19 10:40:12 UTC
... crap. This fixes inkscape, but not gimp.
Committed too soon.
Comment 18 Hugo Pereira Da Costa 2012-03-19 11:01:52 UTC
my bad. Wrong compilation.
It actually does fix both inkscape and gimp. 
So closing.
Ruslan: please double check (at least for gimp)

I'll merge to 1.2 and gtk3 in a couple of days.
Comment 19 Hugo Pereira Da Costa 2012-03-19 11:02:02 UTC
PS: thanks for reporting !
Comment 20 Ruslan Kabatsayev 2012-03-19 14:13:17 UTC
Yes, fixed for both inkscape and gimp (I was able to reproduce this bug with glib-2.31.20).