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

cloning an UpdateControl throws IllegalArgumentException #997

Closed
stephengold opened this Issue Dec 31, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@stephengold
Copy link
Contributor

commented Dec 31, 2018

Currently (in master branch at 3.3-6689) the jme3test.terrain.TerrainGridSerializationTest app crashes with the following stack trace:

Dec 31, 2018 10:35:55 AM com.jme3.material.plugins.J3MLoader readTechnique
WARNING: Fixed function technique was ignored
Dec 31, 2018 10:35:55 AM com.jme3.material.plugins.J3MLoader readTechnique
WARNING: Fixed function technique 'Default' was ignored for material Common/MatDefs/Terrain/HeightBasedTerrain.j3md
Dec 31, 2018 10:35:55 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalArgumentException
	at java.util.concurrent.ConcurrentLinkedQueue.addAll(ConcurrentLinkedQueue.java:526)
	at com.jme3.scene.control.UpdateControl.jmeClone(UpdateControl.java:95)
	at com.jme3.util.clone.Cloner.clone(Cloner.java:249)
	at com.jme3.util.clone.Cloner.clone(Cloner.java:160)
	at com.jme3.util.clone.ListCloneFunction.cloneFields(ListCloneFunction.java:66)
	at com.jme3.util.clone.ListCloneFunction.cloneFields(ListCloneFunction.java:43)
	at com.jme3.util.clone.Cloner.clone(Cloner.java:228)
	at com.jme3.util.clone.Cloner.clone(Cloner.java:160)
	at com.jme3.scene.Spatial.cloneFields(Spatial.java:1446)
	at com.jme3.scene.Node.cloneFields(Node.java:725)
	at com.jme3.terrain.geomipmap.TerrainQuad.cloneFields(TerrainQuad.java:1801)
	at com.jme3.util.clone.Cloner.clone(Cloner.java:255)
	at com.jme3.util.clone.Cloner.clone(Cloner.java:160)
	at com.jme3.scene.Spatial.clone(Spatial.java:1359)
	at com.jme3.scene.Node.clone(Node.java:684)
	at com.jme3.terrain.geomipmap.TerrainQuad.clone(TerrainQuad.java:1768)
	at com.jme3.terrain.geomipmap.TerrainQuad.clone(TerrainQuad.java:1763)
	at com.jme3.terrain.geomipmap.TerrainQuad.clone(TerrainQuad.java:109)
	at com.jme3.asset.CloneableAssetProcessor.createClone(CloneableAssetProcessor.java:48)
	at com.jme3.asset.DesktopAssetManager.registerAndCloneSmartAsset(DesktopAssetManager.java:317)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:379)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
	at jme3test.terrain.TerrainGridSerializationTest.simpleInitApp(TerrainGridSerializationTest.java:50)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:748)
@stephengold

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2019

Per the JavaDoc for ConcurrentLinkedQueue:

 Attempts to addAll of a queue to itself result in IllegalArgumentException.

@stephengold stephengold self-assigned this Jan 6, 2019

@stephengold stephengold changed the title TerrainGridSerializationTest throws IllegalArgumentException cloning an UpdateControl throws IllegalArgumentException Jan 6, 2019

stephengold added a commit that referenced this issue Jan 8, 2019

@stephengold

This comment has been minimized.

Copy link
Contributor Author

commented Jan 8, 2019

Fixed in master branch at hash fceee58 .

@stephengold stephengold closed this Jan 8, 2019

@stephengold

This comment has been minimized.

Copy link
Contributor Author

commented Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.