sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Picking sometimes fails

Open MeFisto94 opened this issue 7 years ago • 4 comments

The issue is that null values make their way into start/finish picLocs. I suspect this is when you start picking (pressing g in my case) when the cursor is outside of the window (or maybe the cursor is on top of another panel).

java.lang.NullPointerException
	at com.jme3.math.Vector3f.subtract(Vector3f.java:683)
	at com.jme3.gde.scenecomposer.tools.PickManager.getTranslation(PickManager.java:185)
	at com.jme3.gde.scenecomposer.tools.PickManager.getTranslation(PickManager.java:195)
	at com.jme3.gde.scenecomposer.tools.shortcuts.MoveShortcut.mouseMoved(MoveShortcut.java:160)
	at com.jme3.gde.scenecomposer.SceneComposerToolController.doEditToolMoved(SceneComposerToolController.java:239)
	at com.jme3.gde.scenecomposer.ComposerCameraController.checkMoved(ComposerCameraController.java:105)
	at com.jme3.gde.core.scene.controller.AbstractCameraController.update(AbstractCameraController.java:514)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:287)
[catch] at com.jme3.gde.core.scene.SceneApplication.update(SceneApplication.java:305)
	at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:200)
	at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:45)
	at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:69)
	at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
	at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:156)
	at java.lang.Thread.run(Thread.java:748)

If someone is bored and wants to try it out, a way to reproduce this would help fixing it (because just ignoring this exception does not really help)

Edit: This seems to choke the sdk though, I've had this exception multiple times, however could recover. Not sure what happens there :/

MeFisto94 avatar Jan 07 '18 20:01 MeFisto94

How do you start picking without mouse by default?

grizeldi avatar Jan 08 '18 06:01 grizeldi

You misread that: "when the cursor is outside of the window" (actually I meant the SceneComposer Frame to be precise). It seems that if you press g then counts as "mousedown" just like it does in blender.

Edit: Oh and I'm tagging @Dokthar since he wrote the gizmos, maybe he has any insight.

MeFisto94 avatar Jan 12 '18 13:01 MeFisto94

@MeFisto94 Thanks I'll have a look.

dokthar avatar Jan 15 '18 14:01 dokthar

Seems related to #80. The stack trace is very similar.

grizeldi avatar Jan 17 '18 14:01 grizeldi