-
Notifications
You must be signed in to change notification settings - Fork 21
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
(MoHAA/Spearhead/Breaktrough) The soldiers aren't displayed correctly in a Release mode #337
Comments
I tried MSVC, Clang and GCC in release mode and the only compiler that causes openmohaa to have strange issues is GCC. This bug comes from GCC itself when it optimizes code for release mode and it cannot be fixed in openmohaa. |
Hi Thank you for the answer.
Is there any workaround for it? I don't have this issue in Debug mode, so I don't know what is causing it, but it reminds me of this: I can switch to Clang, but I have doubts about dropping the support for GCC in OpenMoHAA. It's the popular compiler used by many regular users on Linux and many other operating systems. I suspect this change could negatively affect the availability of OpenMoHAA for other operating systems in the future. I don't know if Clang is actively maintained on systems like MorphOS, but many users are expecting this port to be released: https://morph.zone/modules/newbb_plus/viewtopic.php?topic_id=13819&forum=10 I hope that users working on the unreleased ports of OpenMoHAA can share their opinions about it.
I have to admit that I haven't tested the Release mode for many months. On the other hand, I can say that OpenMoHAA in the Debug mode is very stable. For example, I had played the base version (the default sound system) from the beginning to the end without cheat codes, and I only had two random crashes. It's more stable than many other commercial games. I don't know if OpenMoHAA builds with GCC on Linux are less stable than builds with MSVC on Windows. I saw issues reported on Windows that I have never encountered on Linux. I hope you reconsider it because it looks like a big change in this project. |
It's not a big change, the Linux binaries in the Release page of the project are produced by clang (since the beginning), GitHub actions use clang to compile the project. The only rule is that the project must compile with all 3 compilers, GCC, Clang and MSVC. |
It's an out-of-hand issue when only GCC has weird behaviour like this, @gbudny your Debug build worked most probably because optimizations are disabled in debug. |
Dhewm3 uses "-fno-math-errno -fno-trapping-math -ffinite-math-only" for gcc anf g++ "-ffp-contract=off". Way to enable/test those options in Cmakelists ? |
These parameters don't work after trying, the current issue is the way that GCC optimize loops |
Hi Thank you for the answers. I know this issue should exist in both versions: cmake .. -DCMAKE_BUILD_TYPE=Debug -DDEBUG_DROP_ASSERT=1 -DDEBUG_MEMORY=1 Unfortunately, I only have this issue when I build it this way. cmake .. -DCMAKE_BUILD_TYPE=Release @Cowcat5150 Can you check my file? |
@smallmodel It looks like GCC is more common on MorphOS and OpenPandora.
|
Anyone can use whatever compiler they want, but must be aware of stability issues when enabling optimizations with GCC |
It should be fixed now, there were 2 issues that caused GCC optimizer to behave strangely |
Thank you. It works now! |
Hi
I want to inform you that all soldiers aren't displayed correctly only in a Release mode in all levels.
https://gist.github.com/gbudny/a86604e5fb49f07344b3529de3a6e661
Can you fix it?
The text was updated successfully, but these errors were encountered: