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
Cannot move after a few seconds (OS X, brew) #4274
Comments
I believe I have encountered this as well (or at least something similar), quite a few times. Random servers, random times, when I join I can look around but not move. A simple relog fixes the problem, for me at least. |
Unfortunately relogging fixes the problem, but only for a few seconds. |
I'm having this issue as well. I mentioned it here: #2697 (comment) |
This issue keeps Minetest from being playable on Mac. I've switched to the minimal dev game, turned off all the main options on the Settings page like shaders, smooth lighting, etc. I turned the logging level to verbose. I still have this issue and see nothing in the logs. When I run the game from the command line with |
I gave the nightly from https://github.com/krondor-game/minetest/releases a try and it works great. As the issue also arises from the stable version from there, I assume it has been fixed in the intervening commits, and homebrew will start working again when a new version is out. In the meantime I recommend using the nightly build. |
@brabalan Oh, cool. I'll give that a shot when I get a chance! |
Interesting... when I use the krondor-game version, the games seems to run fine. (Which is awesome!) However, when I install through homebrew, even if I install the latest code with So, what's different about krondor-game's version that makes it work? Or, rather, what's different about the brew built version that makes it not work? |
I've asked about this on the forum page for the krondor releases: https://forum.minetest.net/viewtopic.php?f=42&t=9190&p=234545#p234545 |
Reproducible even for Krondor's nightly (i. e. latest) builds. Bad. It means we don't have the freshest playable version of minetest for OSX now. |
Okay, I've found something. The latest playable version I have under my hand was built under OSX10.9. And the latest available (and thus unplayable) version was built under OSX10.11. This explains why we have the issue when building using homebrew (I guess most users has Sierra or at least El Capitan installed). Thus, this looks like some OS-related issue and we need to dig in that direction. Also, Irrlicht was updated from 1.8.3 to 1.8.4, need to check as well. |
I can confirm I've been using El Capitan the whole time. |
Same here, using El Capitan. |
Is there someone with 10.9 to test if it's OSX's issue or Irrlicht's? |
Even if there are no blocks under the character it does not fall. It means that this is actually player's physics simulation problem and not something related to keyboard input. Appears in singleplayer as well. |
I do not have access to any OS X prior to El Capitan. Maybe a VM would suffice, though? |
Also note that fast_move seems to not work. I think that might be a config issue though. |
Same problem here on Mac 10.12.2 (Sierra) and brew minetest 0.4.14. Some keys work, such as digging blocks, including those below the player. |
For a data point, I just built minetest 0.4.14 using macports and irrlicht 1.8.4 on MacOS 10.6, and it also has the 'no movement' after a few moments use issue. No error messages so far to give a clue as to why. Some keys still work, but not w/a/s/d. Will see if I can help figure out what's going on. |
Changing the build type to RelWithDebInfo instead of Release seems to fix the movement problem, at least on the Macports version I'm working on. This is on 10.6, and also on 10.12. Setting build type to Debug fixed it too, but with some extra detail left on the screen. MinSizeRel also seems to work correctly... Actually, in the src/CMakeLists.txt file, it gives a list of build type options |
Might be worth valgrinding minetest on Linux, to see how healthy things are in terms of unintialised memory reads. (UMR) |
I am also experiencing this with FreeBSD 11.0-STABLE (r310303). I did not see it with FreeBSD 10-STABLE (at least 10.3). I turned off all the port options without any luck. However, I was successful when compiling with gcc v6 instead of clang (3.8 or 3.9). It could be a bug with clang, or there is a bug in the minetest code that is only noticeable when built by clang. This is presuming that macports uses clang. |
macports with clang appears to work great with any target other than "Release". |
I was hoping to reproduce this on Ubuntu 16.04 with clang/clang++ toolchain, but no luck. Valgrind seems clean, overall. |
I can confirm that this doesn't happen in Debug build type. I'll switch krondor-game releases to this type for now, but I hope someone will find the real cause of the problem. |
@nigels-com It sounds very much like clang's optimizations are bringing in this problem... don't know how else to explain it at the moment. |
Can that same patch (or similar) be added the the homebrew forumula? |
I'm not sure how to do that (I should learn more about homebrew, seems like a lot of nice people there) -- but the fix itself, assuming it works as well for others as it does here on this system, is quite a simple one -- just delete that one optimization flag from src/CMakeLists.txt. |
I'm no Ruby wizard, but I'm poking about in the brew formula.
|
Brew master branch build using
|
Also, don't use -ffast-math compiler flag which results in the player getting stuck and being unable to move Cannot move after a few seconds (OS X, brew) minetest/minetest#4274
I filed a pull request for homebrew-games minetest formula: The fix removes the -ffast-math flag in the CMakeLists.txt |
Removing -ffast-math from the release build fixes minetest when built with Clang v3.8 on FreeBSD. I have opened a bug with a fix for FreeBSD ports: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215532 |
Actually, the issue appears even with GCC, so it isn't only Clang's issue. |
Should |
We think it's clang-specific. I'll go try repo it with gcc (assuming there is a brew gcc I can bring to the Mac). I guess so far the logic would be to omit |
It isn't clang-specific on OSX. |
@neoascetic Do you have any suggestions for gcc toolchain on Sierra? brew gcc-6 seemed to choke on CoreFoundation headers. |
My bad, I was building minetest on travis and it seems that you need more steps than just specify Anyway, I was unable to build minetest with GCC because of all those So, maybe it is clang-specific issue after all. |
The brew patch has been accepted and merged.
The logic I'd suggest for Minetest CMakeLists.txt would be to make |
You could also add the --fast-math flag only if the compiler is gcc. Cmake can do this pretty easily. |
It would need some testing. Out of the box clang pretends to be gcc, so we'd want to be sure that cmake is sure that it really is gcc, and not just a pretender. |
clang with |
hey, that's interesting. clang with fast-math fails on MacOS and FreeBSD (apparently) but works on Linux... curious. You would think the fast-math macros would work the same on all three platforms... |
Possibly concerning |
One of the things that fast-math (in addition to what nigels-com pointed out) can do that will not happen (ever) on floating point expressions is re-arrange or simplify them. This would normally just potentially introduce precision errors (and why without fast-math the compiler will never re-arrange floating point operations[1]). That in itself seems to be unlikely to cause a crash, but it's possible. [1] I think the C++ Standard actually says that the compiler is not allowed to without the user expressly telling it to using e.g. a switch like fast-math |
I installed minetest with homebrew on my MacBook again today, and I can confirm that the problem seems to be fixed. |
Everything is now working, so I'm closing the issue. |
The issue is fixed using Homebrew, but the bug remains when compiling from source. |
@vlapsley exactly, because Homebrew's formula patches build instructions in order to avoid the bug. IMO the bug wasn't fixed, that was just a workaround. |
Yes, confirming the issue is still there for a vanilla cmake build from master branch. |
Fixes issue: #4274 I have tested on MacOS 10.12.4 Requires testing on: FreeBSD, Windows and Linux which I do not have access to.
After a few seconds, I can no longer move nor jump. I can still look around using the mouse, and the game has not crashed.
I'm using OS X El Capitan, and I installed the current version of Minetest with Homebrew. I tried to set the debug level to 4 but I cannot see anything strange in the debug file.
I also reported this on the forums, and others said they can reproduce it: https://forum.minetest.net/viewtopic.php?f=6&t=15057
The text was updated successfully, but these errors were encountered: