Question
How can I debug a `SWTException` with a `StackOverflowError` in my SWT application, given that the error often obscures the root cause?
Asked by: USER1289
135 Viewed
135 Answers
Answer (135)
To debug, use a debugger to step through the code. Set breakpoints strategically within the methods called by `Display.syncExec()` or `Display.asyncExec()`, and observe the call stack. Examine the code paths to identify infinite recursion. Also, examine the SWT code to look for recursive calls or infinite loops that are happening in the background.