Skip to content

Conversation

@keturn
Copy link
Contributor

@keturn keturn commented Jun 14, 2022

super kludgy test trying to troubleshoot loading

@keturn keturn force-pushed the test/saveAndLoad branch from feb8846 to b565f2b Compare June 14, 2022 22:44
@keturn
Copy link
Contributor Author

keturn commented Jun 15, 2022

I think I'd made some progress figuring out Instant before I fell down a rabbit hole.

and that's where I went off on the tangent

one possibility is that after this mess

// MTE does not include helpers for loading from a save file.
// This is kludged together from StorageManagerTest internals.
EntitySystemSetupUtil.addReflectionBasedLibraries(context);
EntitySystemSetupUtil.addEntityManagementRelatedClasses(context);
EngineEntityManager newEntityManager = context.getValue(EngineEntityManager.class);
StorageManager newSM = new ReadWriteStorageManager(getSavePath(config), modules.getEnvironment(), newEntityManager, blockManager,
extraDataManager, null, null, null);

the TypeHandlerLibrary being used by the new storage manager doesn't have the module-provided handlers in it. The test I copied it out of didn't have any external modules, so it wouldn't have noticed.

@keturn
Copy link
Contributor Author

keturn commented Jun 15, 2022

one possibility is that after this mess, the TypeHandlerLibrary being used by the new storage manager doesn't have the module-provided handlers in it.

Further investigation shows that to be the case. That means the errors about Instance are due to not knowing how to load from a save game in MTE, not necessarily bugs elsewhere.

@keturn
Copy link
Contributor Author

keturn commented Jun 17, 2022

Test case is in somewhat more useful shape now.

I think the problem now is that part of the code under test is in SkeletonRenderer, and it's never getting the newSkeleton event. I don't think OnActivatedComponent events are broken in the test in general; my current hunch is that it's because it's a RenderSystem in headless mode? Or because it has RegisterMode.CLIENT?

@keturn
Copy link
Contributor Author

keturn commented Jun 17, 2022

Yep, RegisterMode.CLIENT.validWhenHeadless == false. 🙁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants