scenic-view icon indicating copy to clipboard operation
scenic-view copied to clipboard

Events with Java 11

Open gmatrangola opened this issue 5 years ago • 2 comments

Running v11.0.2 I tried with the pre-packaged Java 12 for Windows and also cloned the project and built myself. I get the same error on both.

Select an element from the tree-view on the left in Senic View, then Select the Events Tab, then select Events->Enable Event Tracing

When I cause an event in my application by moving the mouse over the selected element I get the following stack trace from Scenic View and no events appear in the Scenic View Table.

Jan 09, 2020 2:02:03 PM javafx.scene.control.cell.PropertyValueFactory getCellDataReflectively WARNING: Can not retrieve property 'source' in PropertyValueFactory: javafx.scene.control.cell.PropertyValueFactory@709429cb with provided class type: class org.scenicview.view.tabs.EventLogTab$ScenicViewEvent java.lang.RuntimeException: java.lang.IllegalAccessException: module javafx.base cannot access class org.scenicview.view.tabs.EventLogTab$ScenicViewEvent (in module org.scenicview.scenicview) because module org.scenicview.scenicview does not open org.scenicview.view.tabs to javafx.base at javafx.base/com.sun.javafx.property.PropertyReference.get(Unknown Source) at javafx.controls/javafx.scene.control.cell.PropertyValueFactory.getCellDataReflectively(Unknown Source) at javafx.controls/javafx.scene.control.cell.PropertyValueFactory.call(Unknown Source) at javafx.controls/javafx.scene.control.cell.PropertyValueFactory.call(Unknown Source) at javafx.controls/javafx.scene.control.TableColumn.getCellObservableValue(Unknown Source) at javafx.controls/javafx.scene.control.TableColumn.getCellObservableValue(Unknown Source) at javafx.controls/javafx.scene.control.TableCell.updateItem(Unknown Source) at javafx.controls/javafx.scene.control.TableCell.indexChanged(Unknown Source) at javafx.controls/javafx.scene.control.IndexedCell.updateIndex(Unknown Source) at javafx.controls/javafx.scene.control.skin.TableRowSkinBase.updateCells(Unknown Source) at javafx.controls/javafx.scene.control.skin.TableRowSkinBase.<init>(Unknown Source) at javafx.controls/javafx.scene.control.skin.TableRowSkin.<init>(Unknown Source) at javafx.controls/javafx.scene.control.TableRow.createDefaultSkin(Unknown Source) at javafx.controls/javafx.scene.control.Control.doProcessCSS(Unknown Source) at javafx.controls/javafx.scene.control.Control.access$000(Unknown Source) at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Unknown Source) at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source) at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at javafx.graphics/javafx.scene.Node.processCSS(Unknown Source) at javafx.graphics/javafx.scene.Node.applyCss(Unknown Source) at javafx.controls/javafx.scene.control.skin.VirtualFlow.setCellIndex(Unknown Source) at javafx.controls/javafx.scene.control.skin.VirtualFlow.getCell(Unknown Source) at javafx.controls/javafx.scene.control.skin.VirtualFlow.getCellLength(Unknown Source) at javafx.controls/javafx.scene.control.skin.VirtualFlow.computeViewportOffset(Unknown Source) at javafx.controls/javafx.scene.control.skin.VirtualFlow.layoutChildren(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Parent.layout(Unknown Source) at javafx.graphics/javafx.scene.Scene.doLayoutPass(Unknown Source) at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source) at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Unknown Source) at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(Unknown Source) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalAccessException: module javafx.base cannot access class org.scenicview.view.tabs.EventLogTab$ScenicViewEvent (in module org.scenicview.scenicview) because module org.scenicview.scenicview does not open org.scenicview.view.tabs to javafx.base at javafx.base/com.sun.javafx.property.MethodHelper.invoke(Unknown Source) ... 47 more

gmatrangola avatar Jan 09 '20 19:01 gmatrangola

Ran into same problem. I was able to get it working simply by editing the ScenicView launcher script to add the following:

--add-opens org.scenicview.scenicview/org.scenicview.view.tabs=javafx.base

tcfurrer avatar Mar 16 '21 23:03 tcfurrer

I ultimately ended up just creating an alternate run configuration (only for use when debugging with this tool) which places everything on the classpath instead of the modulepath. This prevented additional exceptions and broken behaviors which I was encountering (at least with OpenJDK 17).

tcfurrer avatar Feb 10 '22 20:02 tcfurrer