Bug 465663 - "Device is disposed" message for an existing workspace
Summary: "Device is disposed" message for an existing workspace
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-04-28 05:38 EDT by Lars Vogel CLA
Modified: 2020-04-22 15:02 EDT (History)
7 users (show)

See Also:


Attachments
Workspace (28.52 MB, application/zip)
2015-04-28 08:41 EDT, Lars Vogel CLA
no flags Details
Log file showing the error (50.26 KB, application/octet-stream)
2016-04-01 04:47 EDT, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-04-28 05:38:11 EDT
If I try to start Eclipse for an existing workspace or try to switch to it, I get the following error. A new workspace works fine.

vogella@BigMachine:~/dev/Eclipse45_20150428a/eclipse$ ./eclipse 
Exception in thread "Event Loop Monitor" org.eclipse.swt.SWTException: Device is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4491)
	at org.eclipse.swt.SWT.error(SWT.java:4406)
	at org.eclipse.swt.SWT.error(SWT.java:4377)
	at org.eclipse.swt.widgets.Display.error(Display.java:1186)
	at org.eclipse.swt.widgets.Display.asyncExec(Display.java:725)
	at org.eclipse.ui.internal.monitoring.EventLoopMonitorThread.run(EventLoopMonitorThread.java:489)
Comment 1 Markus Keller CLA 2015-04-28 08:27:11 EDT
Works for me with I20150428-0100. Maybe some fallout from bug 465578 on 64-bit machines? Please check logs/debug on your end.
Comment 2 Lars Vogel CLA 2015-04-28 08:41:02 EDT
Created attachment 252847 [details]
Workspace

Attached my failing test workspace.  I also get the same exception if I try to select this workspace via a runtime Eclipse. I do not see any additional log entry.

Markus, does this workspace work for you? I'm using Ubuntu 14.10 with GTK3.
Comment 3 Markus Keller CLA 2015-04-28 09:00:07 EDT
> I also get the same exception if I try to select this workspace via a runtime Eclipse.

Then just set some breakpoints, e.g. in Device#dispose(), in the EventLoopMonitorThread, and in DarkThemeProcessor.
Comment 4 Dani Megert CLA 2015-04-28 09:06:30 EDT
(In reply to Lars Vogel from comment #2)
> Created attachment 252847 [details]
> Workspace
> 
> Attached my failing test workspace.  I also get the same exception if I try
> to select this workspace via a runtime Eclipse. I do not see any additional
> log entry.

This workspace somehow got corrupted. It also doesn't start with 4.4 or 4.5 M6.

The exception you pasted is just one of many that I see in the .log and most likely a follow-up error due to the workbench shutting down.
Comment 5 Lars Vogel CLA 2015-04-28 09:20:56 EDT
(In reply to Dani Megert from comment #4)
> This workspace somehow got corrupted. It also doesn't start with 4.4 or 4.5
> M6.

Starting the workspace with clearPersistedState makes it work again.

./eclipse -clearPersistedState

> The exception you pasted is just one of many that I see in the .log and most
> likely a follow-up error due to the workbench shutting down.

I assume an investigation here is not helpful, so I mark this bug as worksforme.
Comment 6 Markus Keller CLA 2015-04-28 10:11:16 EDT
An investigation would be helpful, but can only be done by someone from the E4 team who knows why introducing all this persisted state was a good idea.
Comment 7 Thomas Schindl CLA 2015-04-28 14:21:56 EDT
I'm currently unable to download this file but what are the other stacktraces - Markus refers to the fact that too many informations are store in the XMI-File. How did you came to this conclusion? So that once I have better WiFi I can take a look and don't have to start from scratch?
Comment 8 Lars Vogel CLA 2015-04-28 14:24:01 EDT
(In reply to Thomas Schindl from comment #7)
> I'm currently unable to download this file but what are the other
> stacktraces 

I did not see any other stacktraces.
Comment 9 Markus Keller CLA 2015-04-28 14:39:06 EDT
(In reply to Thomas Schindl from comment #7)
> Markus refers to the fact that too many informations are store
> in the XMI-File. How did you came to this conclusion?

If -clearPersistedState solves the problem without data loss, then too much is stored.
Comment 10 Patrik Suzzi CLA 2016-04-01 04:47:33 EDT
Created attachment 260659 [details]
Log file showing the error

I tried to unzip the zipped workspace in Windows 10x64, using 7zip, but there was an error during the extraction "the destination has 9 files with the same names" 
(see http://i.imgur.com/oO8Evfk.png) 
So, I split into two tests: one replacing files and one keeping them. 

In both cases Eclipse does not start at all, and I can read in the log the same error: 

org.eclipse.core.internal.resources.ResourceException: The project description file (.project) for '.org.eclipse.jdt.core.external.folders' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:889)
	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:903)
	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:883)
	( etc .. )

Root exception:
org.eclipse.swt.SWTException: Device is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4522)
	at org.eclipse.swt.SWT.error(SWT.java:4437)
	at org.eclipse.swt.SWT.error(SWT.java:4408)
	( etc .. )

See full log attached. 

Note: I opened the workspace with a newer version of Eclipse: Neon 4.6.0.I20160128-2000, 
but I get the same error even when using Mars

Could you please try to reproduce the problem into another workspace and attach it?
Comment 11 Alexander Kerner CLA 2019-04-01 11:23:31 EDT
Same error here when trying to start an RCP application.
Comment 12 Dillon Providen CLA 2020-04-22 15:02:58 EDT
I believe I'm having the same problem in Eclipse 2020-03.

Happened last week, happened again this week.

Both times, running with `-clearPersistedState` allowed me to open my workspace again.

Will save workspace next time it happens and attach.