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

Error when reloading emc #135

Open
BrockWS opened this issue Jan 4, 2019 · 8 comments
Open

Error when reloading emc #135

BrockWS opened this issue Jan 4, 2019 · 8 comments

Comments

@BrockWS
Copy link

BrockWS commented Jan 4, 2019

When reloading emc via /projecte reloadEMC, the following error is sent to the console.
I had edited nbt_whitelist.json.

Version 0.8.3
MC: 1.12.2
Forge: 14.23.5.2768
AE2: rv6-stable-6
ProjectE: 1.12-PE1.3.1B

https://gist.github.com/BrockWS/f81204049d39716a585098328948b429

@Mordenkainen
Copy link
Owner

Mordenkainen commented Jan 5, 2019

I will need a copy of your whitelist and the complete log, not just the stacktrace.

The value in question should really never be null, so I am at a bit of a loss to explain what happened at this point.

@BrockWS
Copy link
Author

BrockWS commented Jan 5, 2019

I've updated the gist with the log and nbt whitelist json. This is Modern Skyblock 3 and just the first two values, tconstruct:pickaxe and botania:specialflower. I added thaumcraft:crystal_essence when this happened.
However since posting this the server restarted and when trying to reloadEMC again there was no error so I tried adding forge:bucketfilled as a test and also got no error.

@Mordenkainen
Copy link
Owner

Thanks for the info.

I don't really see anything in the logs that tells me what the issue might have been caused by. I'll try to add some better error handling in that area of the code to try to catch similar errors in the future.

The object that threw the NPE was pulled from a map, and null items should be prevented from being put in the map, so I find this issue very, very strange. In any case, I'll keep looking.

@MaPePeR
Copy link

MaPePeR commented Jan 5, 2019

Maybe there was a null, because the key was not present in the map anymore?

Maybe its a race condition?

@Mordenkainen
Copy link
Owner

Mordenkainen commented Jan 5, 2019

That is one possibility, but I would have expected a CME instead. It's a wierd one!

The code iterates the map keyset and verifies the key (an itemstack) has an emc value. If not, it removes it from the map, and if so recalculates the emc pattern by getting the object and calling a method on it..... so.....

  1. Key was present since it got iterated over.
  2. Key has an EMC value (so it is not a case where recalc determined the item no longer had an emc value).
  3. Pulled the object and it was null.

The object in question is created by a factory method that should never return null, instead it returns an instance with an "invalid flag" set. Anything with the flag should never be put in the map.

@ghost
Copy link

ghost commented Jan 6, 2019

In addition to #136 I would like to add a sequence of events.
-Loaded minecraft
-Loaded one of my test worlds just fine, after deeming no issues (famous last words) saved to title
-Attempted to load another world, got the issue
-Attempted to generate a new world, got the issue

Not sure if this is of use, but extra information isn't a bad thing.

@Mordenkainen
Copy link
Owner

Thanks for the info.

@ghost
Copy link

ghost commented Jan 12, 2019

Maybe there was a null, because the key was not present in the map anymore?

Maybe its a race condition?

I'm going to second the race condition theory. I just ran an emc reload on my singleplayer test world and it went as expected

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

No branches or pull requests

3 participants