Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 415203 - Breakpoint inside SWT Combo SelectionListener hangs entire window manager (KDE Plasma on KUbuntu)
Summary: Breakpoint inside SWT Combo SelectionListener hangs entire window manager (KD...
Status: CLOSED DUPLICATE of bug 20006
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.3   Edit
Hardware: PC Linux Qt
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-16 03:46 EDT by Vladimir Baranov CLA
Modified: 2013-08-19 10:39 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Baranov CLA 2013-08-16 03:46:30 EDT
Use code below with Eclipse 4.3 (3.8 also has been tested).
Put a breakpoint at line

System.out.println( "Breakpoint inside widgetSelected()" );

and let a debugger to trigger the breakpoint. That causes entire KDE Plasma desktop to be frozen. After that be ready to kill java process from external shell or reset the PC.

package bugtest;

import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.GridData;

public class Application extends ApplicationWindow
{

  public Application()
  {
    super( null );
  }

  @Override
  protected Control createContents( Composite parent )
  {
    Composite container = new Composite( parent, SWT.NONE );
    container.setLayout(new GridLayout(1, false));
    
    Combo combo = new Combo(container, SWT.NONE);
    combo.setItems(new String[] {"One", "Two", "Three"});
    combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    combo.addSelectionListener( new SelectionAdapter()
    {
      public void widgetSelected( SelectionEvent e )
      {
        System.out.println( "widgetSelected()" );
        System.out.println( "Breakpoint inside widgetSelected()" );
      }
    } );
    return container;
  }

  @Override
  protected StatusLineManager createStatusLineManager()
  {
    StatusLineManager statusLineManager = new StatusLineManager();
    return statusLineManager;
  }
  
  @Override
  protected void configureShell( Shell newShell )
  {
    super.configureShell( newShell );
    newShell.setText( "Eclipse debugger freezing test" );
  }

  @Override
  protected Point getInitialSize()
  {
    return new Point( 450, 300 );
  }
  
  public static void main( String args[] )
  {
    try
    {
      Application window = new Application();
      window.setBlockOnOpen( true );
      window.open();
      Display.getCurrent().dispose();
    }
    catch ( Exception e )
    {
      e.printStackTrace();
    }
  }
}
Reproducibility: ALWAYS.

OS: Linix
Distribution: Ubuntu 12.04.2 LTS
Kernel: Linux 3.2.0-51 generic
Kernel version: #77-Ubuntu SMP Wed Jul 24 20:18:19 UTC 2013
X-Server version: 11 103 000
KDE version: 4.8.5
Processor: Pentium Dual-Core CPU E5300 #2.60 GHz

JDK(s):
OracleJDK 1,7.0.25, 1.7.0.05
OpenJDK 1.6.0_33

The bug 20006 seems to be similar, but I'm not sure.
Note that idea given at http://bugs.sun.com/view_bug.do?bug_id=6714678 (
setting sun.awt.disablegrab=true VM option) won't work.
Comment 1 Michael Rennie CLA 2013-08-19 10:39:16 EDT

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