-
Notifications
You must be signed in to change notification settings - Fork 171
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
3.25 : NPE when advancing a day #31
Comments
You assigned Cpt. Travis Riviera (who has like no tech skills, at all) to work on repairing an AMS. I'm not sure if that assignment should be made totally impossible (yes, it will always fail, but you could still gain XP from it I guess, while burning through equipment), but the code certainly needs a guard there, just in case. |
I don't think the UI is supposed to allow people without the proper skill to be assigned to a repair job. There's potentially a bug in how this assignment was allowed. (I'm not super familiar with MHQ code, so I may be wrong). |
@arlith No, you are correct. An assignment should not be allowed unless the person has the proper tech skills. |
Hmm, in the warehouse, i was simply clicking the "do task" button without checking which tech was going to be assigned (since i pretty much have all elite techs anyway). I guess at some point Cpt Travis Riviera (a vessel gunner) got selected. Not sure why he would show in the list of techs for the warehouse though, if hes a vessel gunner. |
I think that, for large craft, the crew performs repairs/maintenance. That may be how this came about, I dunno if the code around repairing/maintaining large craft is fully implemented. |
Not quite, there is an "Engineer" for vessels. |
Manually removing the repair job from the cpnx file allows the day to advance normally and without any errors in log. This doesn't fix the issue; it just lets Question2 play the game. |
Thanks for the help! |
So ... try as I might, I still didn't manage to replicate the behaviour. Anybody has any more luck? At best, we can add some extra checks to make sure nobody with no tech skills gets assigned and that a day gets passed (with an automatic failure) if a broken save game includes such. |
If we add such extra checks, I'd rather that on campaign loading that person got un-assigned from the repair. Or if it's difficult on loading, then on the advance day checks for repairs. As for how this can happen? It's easy: Have a tech skill on someone, assign them to a repair, and then remove the tech skill from them. Whups! |
Well, a fix-at-load-time check won't help us with people messing up their game state by abusing the GM tools ... |
Added an NPE guard in |
Last thing i did was start repairing damaged equipment in the warheouse (a lot of them) before advancing a day, and i got a NPE.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Save game is attached.
#battletech.zip
The text was updated successfully, but these errors were encountered: