FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.13k stars 143 forks source link

[AppCrash] Nox #233

Closed SilentMRG closed 11 months ago

SilentMRG commented 11 months ago

Hello...

When running Nox in the latest version of cnc-ddraw and loading a save, the game presents the infamous "AppCrash" error on a black screen. Deleting the "Shaders" directory resolved the issue, however in previous versions this error did not occur. I've always used the default setting and the only thing I've done is change the fullscreen option to upscaled. My PC is a potato, like an Intel HD Graphics and from what I saw the Shaders are mostly dated 2020, so I don't know what happened. Anyway, this is just a warning, as I have resolved the issue. =)

SilentMRG commented 11 months ago

Forget what I said about the "Shaders" directory. Actually the error is here:

"; Force CPU0 affinity, avoids crashes/freezing, might have a performance impact ; Note: Disable this if the game is not running smooth or there are sound issues singlecpu=true"

By default "true" is activated, if I deactivate "false" the game starts after loading the save. Interestingly, when it is set to "true", the "AppCrash" occurs after loading the save, and when it is set to "false", when leaving the game using the "Quit" option, the game closes with an "AppCrash" error.

SilentMRG commented 11 months ago

Me again! No, don't forget what I said about the shaders directory. I did some tests... And the game crashes with the mentioned error due to the "Shaders" directory plus "Force CPU0 affinity" set to "true". To solve the problem just delete the shaders directory and set force cpu0 affinity to "false". Rudimentary but functional solution, hehehe. XD

FunkyFr3sh commented 11 months ago

I could reproduce the quit crash, it's a random one because it's trying to access some memory that was freed. I don't think I can reproduce the save game crash, but maybe you can help me with this one. Try to keep everything on default (keep shaders folder and cpu0 setting unchanged)

cnc-ddraw.zip

FunkyFr3sh commented 11 months ago

NVM, I can reproduce the save game crash now too (It doesn't happen with 640x480, you need to raise the resolution to trigger it!)

Both should be fixed with the build i posted above! Thanks for reporting!

SilentMRG commented 11 months ago

Of course I can help you! You are the wizard who fixed the old games. I didn't change anything, I didn't even change the full screen to upscaled, and with this version I didn't get any errors, everything worked fine.

SilentMRG commented 11 months ago

When you say increase the resolution are you referring to putting full screen in upscaled? I didn't change the resolution in the ".ini" file, it stayed at 0/0 in the version I tested before the one you sent me. You are welcome! You saved my Dungeon Master night!

FunkyFr3sh commented 11 months ago

No, I meant the actual game resolution (there is 640x480, 800x600 and 1024x768), the bug happened only when the game switched to a higher resolution when the gameplay starts

SilentMRG commented 11 months ago

I switched to fullscreen upscaled and everything worked fine! =D Well, however, my game was set to 1024x768 when I used the version before the one you gave me. I think any resolution above 1024x768 was crashing the game. My monitor's maximum resolution is 1366x768. Anyway, it doesn't matter, hehe, it's fixed thanks to you!