Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs when using Properties item in context menu item from InteractiveChart of SWT chart extension #419

Open
QuocDoBV opened this issue Oct 23, 2024 · 6 comments

Comments

@QuocDoBV
Copy link
Contributor

QuocDoBV commented Oct 23, 2024

I have created a java project which uses an InteractiveChart from SWT chart extension. Then using context menu of the chart.
The exception as below throws when trying to open Properties item in the second time.

Exception in thread "main" java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:4903)
	at org.eclipse.swt.SWT.error(SWT.java:4837)
	at org.eclipse.swt.SWT.error(SWT.java:4808)
	at org.eclipse.swt.graphics.GC.setForeground(GC.java:4409)
	at org.eclipse.swtchart.internal.Title.paintControl(Title.java:294)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1536)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4801)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
	at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method)
	at org.eclipse.swt.widgets.Control.update(Control.java:4588)
	at org.eclipse.swt.widgets.Display.update(Display.java:5009)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:830)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.swtchart.extensions.charts.InteractiveChart.openPropertiesDialog(InteractiveChart.java:488)
	at org.eclipse.swtchart.extensions.charts.InteractiveChart.handleSelectionEvent(InteractiveChart.java:409)
	at org.eclipse.swtchart.extensions.charts.InteractiveChart.handleEvent(InteractiveChart.java:202)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at Test.main(Test.java:42)

How to reproduce:

  1. Create a plug-in project then adding extensions as below settings:
    image
  2. Create main source as attached file
    Test.txt
  3. Run the source
  4. Right-click on the chart to open Properties dialog. Then clicking Close and Apply button to close the dialog and apply settings
    image
  5. Repeat step 4
    Expected: Can change settings on Propeties dialog
    Actual: Exception throws.
    Note: the problem only happens when I use SWT extension. If I import SWT source to my workspace instead of installing SWT chart extension, the problem does not happen
@QuocDoBV
Copy link
Contributor Author

Hi @eselmeister,
Could you please take a look at this?
Thank you!

@eselmeister
Copy link
Contributor

Sure, I will have a look at it.

@eselmeister
Copy link
Contributor

@QuocDoBV Try the InteractiveChartDemo.java and start it in the IDE as a Java Application. If that works fine, then export the InteractiveChartDemo.java as a Runnable Jar File. Then try the exported jar and watch if an exception is thrown.

@eselmeister
Copy link
Contributor

Screenshot From 2024-10-25 10-12-32
Screenshot From 2024-10-25 10-12-38

@QuocDoBV
Copy link
Contributor Author

Hi @eselmeister,
The problem still occurs.
image
Let close all projects in your workspace to make sure that the application is using extension instead of library from projects in your workspace. The extension is used from https://download.eclipse.org/swtchart/releases/0.14.0/

@QuocDoBV
Copy link
Contributor Author

The problem only occurs the second time I open the Properties dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants