Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311507 - InvocationTargetException when switching to Preview Results
Summary: InvocationTargetException when switching to Preview Results
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.6.0 RC2   Edit
Assignee: Xiaoxiao Wu CLA
QA Contact: Tianli Zhang CLA
URL:
Whiteboard: Non-Auto
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-04 06:11 EDT by Gergo Olah CLA
Modified: 2010-05-24 23:21 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gergo Olah CLA 2010-05-04 06:11:15 EDT
Build Identifier: 20100218-1602

InvocationTargetException occurs when editing a DataSet (to which the DataSource has property binding) and switching to Preview Results. The real exception is SWTException(Invalid thread access) in ReportPropertySheetPage (elementChanged function).

Possible resolution (asynchExec):

public void elementChanged( DesignElementHandle focus, NotificationEvent ev )
{
if ( !viewer.getTree( ).isDisposed( ) )
	{
	PlatformUI.getWorkbench().getDisplay().asynchExec(){new Runnable() {
		public void run() {
		refresh( );
		}
	});

	}


Reproducible: Always

Steps to Reproduce:
1. Create a new Report Design
2. Create a new XML Data Source (e.g. based on library.xml)
3. Create a new ReportParameter (name: XMLfile, type: String)
4. Bind this XMLfile ReportParameter to "XML Data Source File" property in the DataSource Editor
5. Create a new XMLDataSet 
6. Open Properties View
7. Edit the DataSet
8. Open the DataSet (double click on it in Data Explorer)
9. Switch to Preview Results => Exception
Comment 1 Chen Chao CLA 2010-05-17 05:38:19 EDT
In the ResultSetPreviewPage, the dataset preview operation is in a thread, so dte should use Display.getDefault.syncExec( ) method to wrap the code related GUI.
Comment 2 Chen Chao CLA 2010-05-17 05:40:08 EDT
Reassign it to dte.
Comment 3 Xiaoxiao Wu CLA 2010-05-20 23:13:51 EDT
DtE modified the codes to use Display.getDefault.syncExec( ) method to wrap the code related GUI.

So this bug has been fixed.
Comment 4 Tianli Zhang CLA 2010-05-24 23:21:30 EDT
Can not reproduce in 2.6.0.v20100525-0630