jMonkeyEngine / jMonkeyEngine/jmonkeyengine

BatchNode and SimpleBatchNode serialization do not restore correct runtime state after deserialization

Open
#2,600 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.