Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 234672

Summary: X Window System error: BadAlloc, use --sync
Product: [Eclipse Project] Platform Reporter: Stuart Fullmer <sfullmer>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, snorthov, tjwatson
Version: 4.7Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard: stalebug
Attachments:
Description Flags
Plugin demo that replicates crashing problems. none

Description Stuart Fullmer CLA 2008-05-29 13:05:05 EDT
Created attachment 102692 [details]
Plugin demo that replicates crashing problems.

Build ID: M20071023-1652

Steps To Reproduce:
This happens during the usage of the Section component within SWT during execution of the plugin code. I've traced the problem back to a form of stack corruption, but that is just the problem once the bug has manifested. How the corruption actually takes place is unknown, but I'm positive it is a corruption because the debugger will no longer be able to unwind the stack once the corruption has taken place.

1. Open the attachment into Eclipse PDK.
2. Build and Debug the Eclipse application.
3. Switch to the Demo perspective created by the Plugin.
4. Expand the Section and Table in the viewer.

Result at this point should be a crash with the message below printed at the console.

More information:
At the console:

The program '' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 115050 error_code 11 request_code 53 minor_code 0)
  (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.)
Comment 1 Steve Northover CLA 2008-05-29 15:42:07 EDT
Can you confirm that this still happens in 3.4 RC2?
Comment 2 Bogdan Gheorghe CLA 2008-05-29 18:10:53 EDT
Able to reproduce on RC2. 

The problem happens when Table.computeSize calls Control.computeNativeSize for a large table.

Note that you can get around this for now by setting a heightHint in the GridData set for the table layout. ex:

  gd = new GridData(GridData.FILL_BOTH);
  gd.heightHint = 500;
  table.setLayoutData(gd);

Comment 3 Steve Northover CLA 2008-05-29 18:36:07 EDT
It's a bug in GTK (we think).  Bogdan to make a C example, prove it and submit a bug report to GTK.
Comment 4 Eric Williams CLA 2016-08-22 11:16:23 EDT
This bug is still reproducible.
Comment 5 Eclipse Genie CLA 2020-08-21 13:05:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.