Bug 39004 - [Viewers] StructuredViewer fails on RuntimeExceptions thrown by content providers
Summary: [Viewers] StructuredViewer fails on RuntimeExceptions thrown by content provi...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-17 05:32 EDT by Peter Severin CLA
Modified: 2007-06-19 15:31 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 Peter Severin CLA 2003-06-17 05:32:53 EDT
The following stack trace shows the problem which occurs in a standalone
application which uses jface API. Our application contained a bug which caused a
RuntimeException to be thrown by an implementation of
ITableLableProvider.getColumnText method. This exception causes the sequence of
calls shown in stacktrace below. To handle the exception, the platform searches
for the plugin which supposedly has thrown this exception which further causes
an assertion failure because of the platform not being initialized.

org.eclipse.core.internal.runtime.AssertionFailedException: assertion failed:
The application has not been initialized.
	at org.eclipse.core.internal.runtime.Assert.isTrue(Assert.java:101)
	at
org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:180)
	at
org.eclipse.core.internal.runtime.InternalPlatform.getPluginRegistry(InternalPlatform.java:399)
	at
org.eclipse.core.internal.runtime.InternalPlatform.getRuntimePlugin(InternalPlatform.java:420)
	at
org.eclipse.core.internal.runtime.InternalPlatform.handleException(InternalPlatform.java:431)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:891)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at
org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1271)
	at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:494)
	at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:431)
	at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:861)
	at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:801)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:859)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:821)
	at org.eclipse.jface.viewers.TableViewer.inputChanged(TableViewer.java:398)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:238)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:991)
...


Regards,
Peter.
Comment 1 Steve Northover CLA 2003-06-17 11:22:25 EDT
Moving to JFace.
Comment 2 Nick Edgar CLA 2003-06-20 14:18:15 EDT
Either you're running on top of the Eclipse runtime or you're not.
If you have, it should already be set up properly and you should not be getting 
this assertion failure.
If you're not, and are merely including org.eclipse.core.runtime to satisfy 
JFace's dependencies, then it's not set up properly.  
We do not currently support JFace as a separate component from Eclipse, 
although you can still use it with minimal hacking.
I recommend replacing the implementation of Platform.run with one that works 
for you.
Comment 3 Nick Edgar CLA 2006-03-15 11:47:42 EST
Reassigning bugs in component areas that are changing ownership.
Comment 4 Boris Bokowski CLA 2007-06-19 15:31:51 EDT
No plans to fix this.