Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Breakpoint debug SelectionListener freeze eclipse and Win10 OS
Breakpoint debug SelectionListener freeze eclipse and Win10 OS [message #1814947] Mon, 23 September 2019 10:06 Go to next message
Beck Ye is currently offline Beck YeFriend
Messages: 2
Registered: October 2014
Junior Member
As show with below picture, when I debug SelectionListener with a breakpoint, the Shell, eclipse and OS got ANR,I have to use the windows task manager to stop the shell to get windows focus.

index.php/fa/36366/0/

code as:
public class SWTExample {

Display d;

Shell s;

SWTExample() {
d = new Display();
s = new Shell(d,SWT.SHELL_TRIM);
s.setText("testing");

s.setSize(390, 200);

s.setText("A Table Shell Example");
s.setLayout(new FillLayout());

Button t = new Button(s, SWT.BORDER);
t.setText("debug");

t.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
System.out.println("sss");
}
});

s.open();

while (!s.isDisposed()) {
if (!d.readAndDispatch())
d.sleep();
}
d.dispose();
}

public static void main(String[] argv) {
new SWTExample();
}

}

I try photon, kepler, neon with java 8 and java11 is the same problem. so I guss the proplem is relative to my OS win10 since I use win7 is OK before.



  • Attachment: ddd.jpg
    (Size: 411.45KB, Downloaded 300 times)
Re: Breakpoint debug SelectionListener freeze eclipse and Win10 OS [message #1814967 is a reply to message #1814947] Mon, 23 September 2019 14:23 Go to previous message
Eclipse UserFriend
Breakpoints in SWT can result in deadlocks due to how events are handled. The safest approach is to resort to printfs OR remote debugging from another machine.

Brian.
Previous Topic:ToolTip on Table cells, Linux
Next Topic:SWT tab title text may not be ClearType
Goto Forum:
  


Current Time: Thu Apr 25 11:14:45 GMT 2024

Powered by FUDForum. Page generated in 0.02735 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top