GNOME Bugzilla – Bug 598348
eclipse crashes - bug in swt but could be downgraded to a critical message in pango
Last modified: 2009-10-15 19:11:10 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.
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.