Bug 574598 - [Passage] Dialog-facilitated import of unreadable license fails without reporting
Summary: [Passage] Dialog-facilitated import of unreadable license fails without repor...
Status: CLOSED FIXED
Alias: None
Product: Passage
Classification: Technology
Component: Runtime (show other bugs)
Version: 2.0.0   Edit
Hardware: All Windows All
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Elena Parovyshnaia CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-01 11:06 EDT by Elena Parovyshnaia CLA
Modified: 2021-07-08 11:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elena Parovyshnaia CLA 2021-07-01 11:06:47 EDT
- run a product under license protection without proper license (with on-startup-check)
-> LicensingDialog opens and reports insufficient license coverage
- press 'Import...'
-> Import License Dialog appears
- point unreadable license file, for example from another product (key-incompatible)
-> dialog fails to report 'license cannot be read' - it fails with exception

=============================
java.lang.NoSuchMethodError: org.eclipse.swt.graphics.Color.<init>(III)V
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.DiagnosticColors.<init>(DiagnosticColors.java:27)
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.DiagnosticDialog.<init>(DiagnosticDialog.java:37)
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.ImportLicenseDialog.reportError(ImportLicenseDialog.java:158)
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.ImportLicenseDialog.loadLicense(ImportLicenseDialog.java:147)
	at java.util.Optional.ifPresent(Optional.java:159)
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.ImportLicenseDialog.browseAndLoad(ImportLicenseDialog.java:125)
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.ImportLicenseDialog.lambda$0(ImportLicenseDialog.java:83)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:822)
	at org.eclipse.jface.window.Window.open(Window.java:798)
	at org.eclipse.passage.lic.internal.jface.dialogs.licensing.GoodIntention$ImportLicense.paveTheWay(GoodIntention.java:47)
	at org.eclipse.passage.lic.internal.jface.EquinoxPassageUI.exposeAndMayBeEvenFix(EquinoxPassageUI.java:93)
	at org.eclipse.passage.lic.internal.jface.EquinoxPassageUI.investigate(EquinoxPassageUI.java:59)
	at org.eclipse.passage.lic.internal.jface.EquinoxPassageUI.acquireLicense(EquinoxPassageUI.java:42)
	at org.eclipse.passage.lic.internal.e4.ui.addons.E4LicensingAddon.applicationStarted(E4LicensingAddon.java:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:67)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
	at de.validas.cqc.tca.editor.MetamodelEditorAdvisor$Application.start(MetamodelEditorAdvisor.java:179)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1474)

============================================
Comment 1 Elena Parovyshnaia CLA 2021-07-08 11:24:53 EDT
Color constructor from three rgb integers is available since 3.115. 

It looks like the issue is related to 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=574492

Mitigated with the usage of old-fashion device-aware constructor.

https://github.com/eclipse-passage/passage/pull/824