Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313423 - SWT Crash inside Handler
Summary: SWT Crash inside Handler
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 15:00 EDT by Stephen McCants CLA
Modified: 2013-08-14 13:03 EDT (History)
6 users (show)

See Also:


Attachments
SWT Crash demonstration plug-in. Import as project archive file. (11.01 KB, application/octet-stream)
2010-05-18 15:04 EDT, Stephen McCants CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen McCants CLA 2010-05-18 15:00:00 EDT
Build Identifier: M20100211-1343

I've written and attached a simple plug-in that demonstrates this crash bug.  The plug-in (swt.crash) comes with a launcher that can be used to launch the demonstration.

Interesting facts and other things I've learned that maybe useful:

1) The delete handler is swt.crash.CrashHandler in the attached plugin.
2) The handler intentionally throws a NPE after the confirmation dialogue.  If you don't throw this (or maybe a similar exception), then the code works without a crash.
3) If you remove the confirmation dialogue from the CrashHandler, then it will not crash.
4) You can access the handler through the right click pop-up menu and it will not crash.  The crash only occurs through the key binding.

Reproducible: Always

Steps to Reproduce:
1) Launch "SWT Crash Example"
2) If the "Crash View" is not open, open it with Window->Show View->Other.. and select the "Crash View" under Other.
3) Select one or more "Datum" rows in the "Crash View".
4) Press the delete key.
5) Select "OK" when the confirmation dialogue comes up.

After clicking OK, it will crash.
Comment 1 Stephen McCants CLA 2010-05-18 15:04:08 EDT
Created attachment 168997 [details]
SWT Crash demonstration plug-in. Import as project archive file.

This was exported as a project archive file.
Comment 2 Stephen McCants CLA 2010-05-18 15:05:32 EDT
Maybe related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=250492
Comment 3 Bogdan Gheorghe CLA 2010-05-19 11:53:12 EDT
I cannot reproduce this crash using the latest 3.6 RC1 build with a Sun 1.6 (update 20) JRE. I select the item in the crash view, hit delete (the NPE gets logged in the log file) but no crash.

I am running on Ubuntu 10.04.

What's your configuration? JRE? Can you try the RC1 build on your machine and attach the stack trace you get (if it still doesn't work for you).
Comment 4 Praveen CLA 2010-05-20 03:12:46 EDT
Even I am not able to reproduce the crash. The exception is handled by Workbench handler and it always consumes the exception. Thus, there is no crash reported on my machine (Ubuntu9.04 and Eclipse3.6RC1). Please check against the latest version and see whether that solves the reported problem.
Comment 5 Stephen McCants CLA 2010-05-20 10:28:40 EDT
Early next week, I'll test against the latest version.  However, even if the latest version does not "exhibit" the problem, that does not mean it is solved.  If it is a memory corruption bug (makes sense given the stack trace), it could have just "moved".
Comment 6 Grant Gayed CLA 2010-05-20 10:38:23 EDT
If the case crashes in 3.5.2 but works in 3.6 then it should be possible to determine which change during 3.6 development made the problem stop happening.  Based on this it can be determined whether it seems properly fixed.
Comment 7 Silenio Quarti CLA 2010-05-20 10:56:09 EDT
Please attach the stack tace.
Comment 8 Felipe Heidrich CLA 2010-05-26 14:41:11 EDT
Is this bug fixed ?
Please close the accordingly, for now I'll change the severity to normal (works in 3.6)
Comment 9 Alexander Kurtakov CLA 2013-08-14 13:03:07 EDT
Long time no reply from reporter. I'm closing it now, please reopen if you still experience it with supported swt version.