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

49.19 Nightly - Soft Freeze upon advancing day. #4002

Closed
Thom293 opened this issue Apr 16, 2024 · 14 comments · Fixed by #4009
Closed

49.19 Nightly - Soft Freeze upon advancing day. #4002

Thom293 opened this issue Apr 16, 2024 · 14 comments · Fixed by #4009

Comments

@Thom293
Copy link
Contributor

Thom293 commented Apr 16, 2024

EDIT2: Ok - well - its not even the ghost pilot issue maybe. What worked last night - deleting the pilot or mech - inexplicably does not work this morning with the exact same process. Frustrated, I reloaded nightly from 4.14 and loaded same save and was able to advance to monday. So I presume now, probably incorrectly, that this is something new that was introduced by the merges yesterday. Regardless, Im going to let someone smarter than me figure it out. Im stumped.

EDIT: Looks like this may be related to the infamous Ghost Pilot issue. Normally it goes away upon reload, but I had mothballed the Warhammer that he died in so I guess that preserved whatever the bug is. Illiani isolated it to a mech or Pilot and on a hunch I checked the recently departed and his mech. Deleting either of them allowed it to advance to Monday.

Will close this and open a new issue. Can re-open later if needed.

Title - was advancing day. Not sure if it was from a Saturday to Sunday or Sunday to Monday. i would guess the latter, but not certain.

EDIT: Looks like I got an autosave, so I guess it was advancing from Sunday to Monday when it froze. So might be some weekly roll shenanigans. I dont see anything in the log, but it is attached. Will try to load that autosave after I post this.

It did not give me a NPE or other Error pop up, it just became unresponsive. I could move my mouse and switch to other windows outside of MHQ, but none of the menus or tabs or anything in MHQ could be clicked on. Its almost as if there is an invisibile pop-up menu waiting to be clicked and rendering the rest unresponsive. Alt tabbing and minimizing everything else to try to find a buried window did no good.

Log and autosave and save before autosave and customs attached.

image

mekhq.log

Autosave-1-Crazed Profanity-30700220.cpnx.gz

Crazed Profanity30700218a.cpnx.gz

Customs.zip

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

Update - window would not close normally, so had to close with Task Manager.

Loaded autosave and it loaded fine and I could use the mouse. Advancing day froze it again though. And minimizing and restoring turned the whole screen grey. Task manager close again. New log attached.

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

Oh man. Those are wrong logs. Its loading old saves now. Ignore those. Will have a good one soon.

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

Here is correct log. Loading the autosave above and advancing day will freeze it.

mekhq.log

@Sleet01
Copy link
Collaborator

Sleet01 commented Apr 16, 2024

A hidden or initializing modal dialog would be my guess too, and explain the issues you're seeing.

Might need to turn on debug logging to get more info.

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

new log at debug level.

mekhq.log

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

Ok, this save on Woodstock works. Im able to advance through multiple mondays with no issues. A different contract on a different planet. But any save from day 1 of contract on Mallory's world, freezes on a monday.

Crazed Profanity30690808.cpnx.gz

And here is a new log with a new warning related to a missing file.

mekhq.log

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

Looks like this may be related to the infamous Ghost Pilot issue. Normally it goes away upon reload, but I had mothballed the Warhammer that he died in so I guess that preserved whatever the bug is. Illiani isolated it to a mech or Pilot and on a hunch I checked the recently departed and his mech. Deleting either of them allowed it to advance to Monday.

Will close this and open a new issue. Can re-open this one later if needed.

@Thom293 Thom293 closed this as completed Apr 16, 2024
@Thom293
Copy link
Contributor Author

Thom293 commented Apr 16, 2024

Ok - well - its not even the ghost pilot issue maybe. What worked last night - deleting the pilot or mech - inexplicably does not work this morning with the exact same process. Frustrated, I reloaded nightly from 4.14 and loaded same save and was able to advance to monday. So I presume now, probably incorrectly, that this is something new that was introduced by the merges yesterday. Regardless, Im going to let someone smarter than me figure it out. Im stumped.

somehow related to #4004

Here is the save from the nightly on 4.14 where I was able to advance the day to the following Monday with no problem, if it helps.

Crazed Profanity30700221eureka.cpnx.gz

@IllianiCBT
Copy link
Collaborator

IllianiCBT commented Apr 17, 2024

I don't know the cause, but I was able to semi-reliably replicate the bug by moving from Sunday-Monday while in a contract with units in my TOE.

This can be recreated by following the below steps:

  1. start new campaign
  2. create company and add units to the TOE (company generator will do this for you, if you let it, so I recommend doing that)
  3. accept a contract and travel to it
  4. advance days until Sunday
  5. if the bug triggers, mhq will lock up when moving from Sunday to Monday

With it consistently occurring on the transition from Sunday to Monday, we should check into what processes run at the end/beginning of a week and whether any were changed recently. To help narrow down the issue we can be certain that it occurs after the save step - as the end of day save appears to complete correctly.

@Thom293
Copy link
Contributor Author

Thom293 commented Apr 17, 2024

Thank you for looking into it. A nasty one that needs killing for sure. That it can happen on a new campaign is even worse.

@IllianiCBT
Copy link
Collaborator

I have since been able to isolate this bug. It appears to be caused by Invincible enemy morale triggering base attacks while StratCon is enabled.

To reproduce:

  • start a new campaign with StratCon enabled
  • generate a company (with units in the TOE) and accept a contract
  • arrive at the contract
  • manually change enemy morale to Invincible
  • mhq will lock-up when moving from Sunday-Monday

@kuronekochomusuke
Copy link
Collaborator

this looks to be getting into an infinite loop in CrewSkillUpgrader.java addSingleSPA() the while loop never exits

image

@Sleet01
Copy link
Collaborator

Sleet01 commented Apr 17, 2024

@kuronekochomusuke damn. I'll take a look.

@Sleet01
Copy link
Collaborator

Sleet01 commented Apr 17, 2024

@kuronekochomusuke @IllianiCBT @Thom293 ^^^ fix for the infinite loop I introduced.
I doubt that this fixes the ghost pilot issue, however.

Sleet01 added a commit that referenced this issue Apr 17, 2024
…eSPA

Fix MHQ #4002: prevent infinite loop while assigning SPAs by removing unusable entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants