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

Bug 320590

Summary: SWT segfaults on throwing exception from a KeyEvent handler
Product: [Eclipse Project] Platform Reporter: mik01aj <mik01aj>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: lshanmug, pinnamur, Silenio_Quarti
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
error dump none

Description mik01aj CLA 2010-07-22 03:10:12 EDT
Build Identifier:  M20090917-0800

public class A {

    public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);

        List list = new List(shell, SWT.BORDER);

        list.addKeyListener(new KeyListener() {

            @Override
            public void keyReleased(KeyEvent e) {
                System.out.println("released");
                throw new RuntimeException();
            }

            @Override
            public void keyPressed(KeyEvent e) {
                System.out.println("pressed");
                throw new RuntimeException();
            }

        });

        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch())
                display.sleep();
        }
        display.dispose();
    }
}


Reproducible: Always

Steps to Reproduce:
1. Run the above code
2. Press any key
Comment 1 Lakshmi P Shanmugam CLA 2010-07-22 03:42:27 EDT
Please attach the dump file.
Comment 2 mik01aj CLA 2010-07-22 05:47:03 EDT
Created attachment 174949 [details]
error dump
Comment 3 Praveen CLA 2010-07-28 06:21:36 EDT
This looks similar to bug#285749
Comment 4 Silenio Quarti CLA 2010-08-13 21:25:01 EDT
Crash in pango_layout_new() because pending exception in callin.

*** This bug has been marked as a duplicate of bug 322222 ***