Skip to content

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Sep 22, 2025

public class TestShadowRenderer extends SimpleApplication {
	
		@Override
		public void simpleInitApp() {
			PointLight pl = new PointLight();
			pl.setPosition(new Vector3f(5, 5, 5));
			pl.setRadius(10);
			rootNode.addLight(pl);

			PointLightShadowRenderer plsr = new PointLightShadowRenderer(assetManager, 512);
			plsr.setLight(pl);
			plsr.displayFrustum();
			viewPort.addProcessor(plsr);
		}
	}
SEVERE: Uncaught exception thrown in Thread[#32,jME3 Main,5,main]
java.lang.IllegalStateException: Scene graph is not properly updated for rendering.
State was changed after rootNode.updateGeometricState() call.
Make sure you do not modify the scene from another thread!
Problem spatial name: Root Node
at com.jme3.scene.Spatial.checkCulling(Spatial.java:367)
at com.jme3.shadow.ShadowUtil.addGeometriesInCamFrustumAndViewPortFromNode(ShadowUtil.java:778)
at com.jme3.shadow.ShadowUtil.getLitGeometriesInViewPort(ShadowUtil.java:759)
at com.jme3.shadow.PointLightShadowRenderer.getReceivers(PointLightShadowRenderer.java:149)
at com.jme3.shadow.AbstractShadowRenderer.postFrame(AbstractShadowRenderer.java:496)
at com.jme3.renderer.pipeline.ForwardPipeline.pipelineRender(ForwardPipeline.java:127)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1313)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1355)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:283)
at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:707)
at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:797)
at java.base/java.lang.Thread.run(Thread.java:1583)

Copy link

github-actions bot commented Sep 22, 2025

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

  • Go to the (failed run) > Summary > Artifacts > screenshot-test-report
  • Download the zip and open jme3-screenshot-tests/build/reports/ScreenshotDiffReport.html

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@capdevon capdevon changed the title AbstractShadowRenderer: fix debugFrustum AbstractShadowRenderer: fix displayFrustum Sep 22, 2025
@codex128 codex128 self-requested a review September 22, 2025 16:23
protected void doDisplayFrustumDebug(int shadowMapIndex) {
}

protected Node getMainScene() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename this to indicate the returned scene is for debugging purposes (maybe getSceneForDebug?)


}

protected Node getMainScene() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as noted before.

@codex128 codex128 added the bug Something that is supposed to work, but doesn't. More severe than a "defect". label Sep 22, 2025
@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants