jMonkeyEngine / jMonkeyEngine/jmonkeyengine
BatchNode and SimpleBatchNode serialization do not restore correct runtime state after deserialization
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 14
Description
After serializing and deserializing a BatchNode or a SimpleBatchNode using the standard jME Node read/write mechanisms, the internal runtime state is not correctly restored.
Specifically:
If BatchNode.batch() was called before serialization, the deserialized node may contain duplicated children (both the original geometries and previously generated batch geometries).
Internal structures such as batches, batchesByGeom, and related runtime data are not consistent with the scene graph.
The root cause is that batched geometries are runtime-generated and are serialized along with the original subtree, but the internal structures are not reconstructed during read().
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating BatchNode and SimpleBatchNode and reading their batch(), read(), and write() paths alongside the standard jME Node serialization mechanisms. Reproduce serialization after batching, then inspect whether the deserialized scene graph and runtime structures agree. Done means no duplicated children and consistent batches and batchesByGeom state after deserialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100