After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598348 - eclipse crashes - bug in swt but could be downgraded to a critical message in pango
eclipse crashes - bug in swt but could be downgraded to a critical message in...
Status: RESOLVED WONTFIX
Product: pango
Classification: Platform
Component: general
1.26.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-13 22:57 UTC by Alban Browaeys
Modified: 2009-10-15 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alban Browaeys 2009-10-13 22:57:00 UTC
pango/pango-layout.c pango_layout_new assume that the g_object_new assigned to layout will succeed. But this is not always true as in eclipse which has something broken in jni compiled in specific environment (RH gcc 3.4.6 and IBMJava2-141) under specific circumstances (when destroying a gtk widget with a scrollable in its children via gtk_widget_destroy . The child ends up calling pango_layout_new while setting its adjustements to 0 before destroying itself).
That is the java callback assigned as class->constructor for pango layout fails to return more than NULL due to error 11 resource temporarily unavailable).

Instead of dereferencing member of layout after the assignment to the g_object_new could you add a check for layout == NULL and return NULL in this use case (adding a critical message in the block) ?

The critical message will not appear in eclipse logs due to it also being overridden by a java callback (and as at this point the java callbacks fails ... so no message , no java stacktrace , except if one disable the java callbacks in swt Display.java ).
But still it would avoid crash, the message can be made to appear and I already reported the issue about broken build of swt with regards to java callbacks in those use cases.
Comment 1 Behdad Esfahbod 2009-10-15 19:11:10 UTC
This makes zero sense.  I still don't understand how can g_object_new() fail.  And regardless, we do't support that case.  It will crash later anyway, so I don't see the point.