ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.65k stars 371 forks source link

Enemy heroes crashing game on world map (I suspect from casting dimension door) #7269

Closed aslak01 closed 1 year ago

aslak01 commented 1 year ago

Preliminary checks

Platform

macOS

Describe the bug

I'm on an M1 mac on latest macOS, latest fheroes2. Since last version I have noticed crashes when encountering enemies on the world map, which are reproducible on reload. I think it is tied to dimension door, as at least once it happened when the enemy was dimension dooring around, while the other times I was unable to see whether they had dimension door available.

Save file

Archive.zip

Additional info

This is the output from Console.app

default 21:23:06.764482+0200    runningboardd   Acquiring assertion targeting [anon<fheroes2>(501):16391] from originator [osservice<com.apple.coreservices.launchservicesd>:563] with description <RBSAssertionDescriptor| "frontmost:16391" ID:599-563-51506 target:16391 attributes:[
    <RBSDomainAttribute| domain:"com.apple.launchservicesd" name:"RoleUserInteractiveFocal" sourceEnvironment:"(null)">
    ]>
default 21:23:06.764548+0200    runningboardd   Assertion 599-563-51506 (target:[anon<fheroes2>(501):16391]) will be created as active
default 21:23:06.767159+0200    fheroes2    SetFrontProcess: asn=0x0-0x558558 options=1
default 21:23:06.765312+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:06.768443+0200    fheroes2    order window front conditionally: 10a4 related: 0
default 21:23:06.767604+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:06.769371+0200    runningboardd   [anon<fheroes2>(501):16391] Set darwin role to: UserInteractiveFocal
default 21:23:06.770356+0200    runningboardd   Acquiring assertion targeting [anon<fheroes2>(501):16391] from originator [osservice<com.apple.coreservices.launchservicesd>:563] with description <RBSAssertionDescriptor| "notification:16391" ID:599-563-51507 target:16391 attributes:[
    <RBSDomainAttribute| domain:"com.apple.launchservicesd" name:"LSNotification" sourceEnvironment:"(null)">
    ]>
default 21:23:06.771282+0200    runningboardd   Assertion 599-563-51507 (target:[anon<fheroes2>(501):16391]) will be created as active
default 21:23:06.770519+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:06.772401+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:06.772718+0200    runningboardd   Invalidating assertion 599-563-51500 (target:[anon<fheroes2>(501):16391]) from originator [osservice<com.apple.coreservices.launchservicesd>:563]
default 21:23:09.025384+0200    loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] |      checkAgainstApp is : fheroes2
default 21:23:09.025405+0200    loginwindow -[PersistentAppsSupport appShouldBeRelaunched:] | entered. checking app: fheroes2
default 21:23:12.771032+0200    runningboardd   Assertion did invalidate due to timeout: 599-563-51507 (target:[anon<fheroes2>(501):16391])
default 21:23:12.976552+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:12.976680+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:12.976739+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:12.976985+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:20.879421+0200    spindump    fheroes2 [16391]: spin: not sampling due to conditions 0x400000000
default 21:23:22.720354+0200    runningboardd   Invalidating assertion 599-563-51506 (target:[anon<fheroes2>(501):16391]) from originator [osservice<com.apple.coreservices.launchservicesd>:563]
default 21:23:22.829885+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:22.829940+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:22.830245+0200    runningboardd   [anon<fheroes2>(501):16391] Set darwin role to: UserInteractiveNonFocal
default 21:23:22.830418+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:22.830815+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:31.237597+0200    runningboardd   Acquiring assertion targeting [anon<fheroes2>(501):16391] from originator [osservice<com.apple.coreservices.launchservicesd>:563] with description <RBSAssertionDescriptor| "frontmost:16391" ID:599-563-51519 target:16391 attributes:[
    <RBSDomainAttribute| domain:"com.apple.launchservicesd" name:"RoleUserInteractiveFocal" sourceEnvironment:"(null)">
    ]>
default 21:23:31.237732+0200    runningboardd   Assertion 599-563-51519 (target:[anon<fheroes2>(501):16391]) will be created as active
default 21:23:31.238703+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:31.238743+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:31.239231+0200    runningboardd   [anon<fheroes2>(501):16391] Set darwin role to: UserInteractiveFocal
default 21:23:31.241236+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:31.241980+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:31.244890+0200    runningboardd   Acquiring assertion targeting [anon<fheroes2>(501):16391] from originator [osservice<com.apple.coreservices.launchservicesd>:563] with description <RBSAssertionDescriptor| "notification:16391" ID:599-563-51520 target:16391 attributes:[
    <RBSDomainAttribute| domain:"com.apple.launchservicesd" name:"LSNotification" sourceEnvironment:"(null)">
    ]>
default 21:23:31.245143+0200    runningboardd   Assertion 599-563-51520 (target:[anon<fheroes2>(501):16391]) will be created as active
default 21:23:31.247535+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:31.247857+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:31.248287+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:31.248662+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:35.930228+0200    runningboardd   Invalidating assertion 599-563-51519 (target:[anon<fheroes2>(501):16391]) from originator [osservice<com.apple.coreservices.launchservicesd>:563]
default 21:23:36.041193+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:36.041311+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:36.041363+0200    runningboardd   [anon<fheroes2>(501):16391] Set darwin role to: UserInteractiveNonFocal
default 21:23:36.041393+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:36.041451+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:37.240737+0200    runningboardd   Assertion did invalidate due to timeout: 599-563-51520 (target:[anon<fheroes2>(501):16391])
default 21:23:37.446362+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:37.446387+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:37.446425+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:37.446531+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:23:41.149912+0200    CAReportingService      CAReportingService.mm:469   Removing { client.clientProcessName="fheroes2" }
default 21:23:41.150001+0200    fheroes2         CAReportingClient.mm:335   Interruption Handler: connection was interrupted
default 21:23:41.149981+0200    CAReportingService      CAReportingService.mm:536   invalidationHandler: connection exited { procname="fheroes2", uptime_sec=37 }
default 21:23:41.150013+0200    fheroes2         CAReportingClient.mm:300   Disconnecting reporters
default 21:23:48.537657+0200    runningboardd   Invalidating assertion 599-591-51498 (target:[anon<fheroes2>(501):16391]) from originator [osservice<com.apple.WindowServer(88)>:591]
default 21:23:48.659285+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:23:48.659316+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:23:48.659343+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:23:48.659512+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
default 21:24:25.491478+0200    runningboardd   Invalidating assertion 599-591-51497 (target:[anon<fheroes2>(501):16391]) from originator [osservice<com.apple.WindowServer(88)>:591]
default 21:24:25.610980+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring jetsam update because this process is not memory-managed
default 21:24:25.611059+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring suspend because this process is not lifecycle managed
default 21:24:25.611167+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring GPU update because this process is not GPU managed
default 21:24:25.611356+0200    runningboardd   [anon<fheroes2>(501):16391] Ignoring memory limit update because this process is not memory-managed
aslak01 commented 1 year ago

Fheroes2 version 1.04, installed with homebrew.

oleg-derevenetz commented 1 year ago

Hi @aslak01 what I see with your single-player AUTOSAVE file is an infinite loop (which looks like a game "freeze") that should be fixed by #7169. There is no crash (even on 1.0.4). Have you tried the latest snapshot build (don't confuse it with the latest release)? I don't see any issues with the latest snapshot build.

aslak01 commented 1 year ago

Could be it's a mac specific crash? I just tried another map and it crashed before I even found an enemy. I did confuse the snapshot build with 1.04, so I haven't tried that. Trying it now, I can't get it to start with the error: dyld[18029]: Library not loaded: /usr/local/opt/sdl2_mixer/lib/libSDL2_mixer-2.0.0.dylib

Edit: You're right I'm seeing a freeze, not a crash, the game doesn't exit just stalls. I wasn't aware of the distinction.

oleg-derevenetz commented 1 year ago

Edit: You're right I'm seeing a freeze, not a crash, the game doesn't exit just stalls. I wasn't aware of the distinction.

If you are seeing a freeze, then you should try the latest snapshot.

aslak01 commented 1 year ago

Yeah but I'm not sure how to get it to run. I downgraded to 1.03 on my other computer to be able to play, which worked, although I'm not sure if the enemy just didn't get dimension door in that game.

oleg-derevenetz commented 1 year ago

Yeah but I'm not sure how to get it to run.

You can try to build it yourself. You'll need the Xcode and a few libraries from Homebrew:

https://ihhub.github.io/fheroes2/DEVELOPMENT.html#macos-and-linux

You will not need to copy HoMM2 data files, so you can just skip the second and third items of the list.

aslak01 commented 1 year ago

I didn't load in the autosave with the freeze but I'm pretty sure you're right https://github.com/ihhub/fheroes2/pull/7169 solves the issue.

aslak01 commented 1 year ago

Just confirmed with a freezing autosave that my issue is resolved.