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

Planet won't convert to Persistent RimWorlds #72

Open
rkemsley opened this issue Sep 16, 2019 · 9 comments
Open

Planet won't convert to Persistent RimWorlds #72

rkemsley opened this issue Sep 16, 2019 · 9 comments
Assignees
Labels
bug Something isn't working other mod Something wrong with the other mod
Milestone

Comments

@rkemsley
Copy link

rkemsley commented Sep 16, 2019

When loading a world in the Persistent RimWorlds tab it gets to 90% complete, then...

"Error while loading a map"
"An error occurred while loading a map. See error log for more information"

The map icon then appears in the load worlds tab. However, when I click to load up the map, I just get a black screen.

See below for error log...
https://pastebin.com/5ivU7HE4

@rkemsley rkemsley added the bug Something isn't working label Sep 16, 2019
@FilUnderscore FilUnderscore self-assigned this Sep 17, 2019
@FilUnderscore FilUnderscore modified the milestone: 0.1.4.0 Sep 17, 2019
@FilUnderscore
Copy link
Owner

FilUnderscore commented Sep 17, 2019

Thanks for reporting this, appears to be an issue with how the mod interacts with other world objects (in this case from Vanilla Furniture Expanded - Security)

Exception from asynchronous event: System.NullReferenceException: Object reference not set to an instance of an object
at VFESecurity.WorldArtilleryTracker.DeregisterWorldObject (RimWorld.Planet.WorldObject) 

EDIT: Appears to be something wrong with the way the other mod (Vanilla Furniture Expanded - Security) handles it's tracking of world objects - in the method WorldArtilleryTracker.RegisterWorldObject it checks if the WorldObject provided is null before registering the list cachedWorldObjects which is then reported null later on when the persistent world is being saved, from the method WorldArtilleryTracker.DeregisterWorldObject due to the null list as mentioned before. To be fair, this could be on my part with the provided null world object in the RegisterWorldObject method however the way the other mod handles it is poor, by registering the list after depending on a not null world object to be provided, and then not checking if the list is null in the DeregisterWorldObject method. This may be on my part partly, due to the way the mod handles conversions by not fully initializing the world when preparing the persistent world, however the way the other mod handles the list is also poor.

In turn, I'll take a look at how I can improve this compatibility between mods as I'm not sure if any mods have a similar system and to avoid potential conflicts in the future, however the other mod author should be advised of trying to assume that the list will never be null when de-registering world objects - also for mod compatibility purposes.

@FilUnderscore FilUnderscore added the other mod Something wrong with the other mod label Sep 17, 2019
@rkemsley
Copy link
Author

Yeah, last night I was enabling and disabling different mods to check compatibility. All of them work fine with the Persistent RimWorlds mod in its current state (and I have a tone of mods).

I think I will forward this thread on to the "Vanilla Furniture Expanded - Security" modder.

@FilUnderscore
Copy link
Owner

Alright, XeoNovaDan has responded that it'll be fixed with a simple patch. Will close this issue once it's reported that it works.

@rkemsley
Copy link
Author

I believe XeoNovaDan has released a patch for "Vanilla Furniture Expanded - Security". However, I am still getting the same error when that certain mod is loaded into the mod list.

90% complete, then...

"Error while loading a map"
"An error occurred while loading a map. See error log for more information"

See below for new error log...
https://pastebin.com/hAaptQgv

@FilUnderscore
Copy link
Owner

FilUnderscore commented Sep 19, 2019

Looks like a similar issue in a related method, Notify_WorldObjectRemoved in the WorldArtilleryTracker, again the issue seems to be a forgotten null check this time for the list listerArtilleryComps. This also may be because for some reason the TryPostInit is never called when the world is loaded through the conversion process (if I'm correct) so I need to find out what's causing that and come up with some sort of fix. I'll take a look into it and update this once I've got something.

@FilUnderscore
Copy link
Owner

FilUnderscore commented Feb 23, 2020

Requesting an update on this issue, does it still occur with the latest versions of the Vanilla Furniture Expanded - Security mod?

@rkemsley
Copy link
Author

It still does not work when I load my whole mod list. Probably still an issue with the Vanilla Furniture Expanded - Security.

See below for error log...
https://pastebin.com/sZ2sVwHC

@FilUnderscore
Copy link
Owner

Upon examining the error log, I have determined that it is still the same error since September. I will put a disclaimer on the mod for now, that the mod Vanilla Furniture Expanded - Security is incompatible (with world conversion as we've seen?) I'll look into possibly patching this particular call within the mod as a semi-permanent fix which will just ignore this call, of which the implications are unknown for now, but should allow world conversion to work then. Expect to see a fix in subsequent updates implemented, I'll keep you updated on this. In the meantime, I'm working on getting this mod ported to 1.1.

@FilUnderscore FilUnderscore added this to the 0.1.4.0 milestone Mar 11, 2020
@FilUnderscore FilUnderscore modified the milestones: 0.1.4.0, 0.1.5.0 Dec 17, 2020
FilUnderscore added a commit that referenced this issue Dec 17, 2020
FilUnderscore added a commit that referenced this issue Feb 21, 2021
FilUnderscore added a commit that referenced this issue Feb 21, 2021
Bug fixes: #82, #72 ?, #87
Features: #24, #41, #28
@FilUnderscore
Copy link
Owner

Please let me know if this is still an issue in the latest release, 0.1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working other mod Something wrong with the other mod
Projects
None yet
Development

No branches or pull requests

2 participants