-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Crash when retrieving servers list with system jsoncpp #1793
Comments
Does this still happen in a current development build? If so, please paste the gdb log and backtrace from there too. In particular, LuaJIT exception wrapping has been improved at some point, so it should no longer display the generic message
but show the actual exception message. |
Thanks, I'll compile the development build and try that. |
Same crash with the master revision, but the error message is indeed more verbose:
|
For me it seems like serverlist is returning erroneous data sometimes. |
It's a systematic error for me though, I never got it to work. I just tried a build with the embedded version of jthread instead of the system one (just to be sure), but it doesn't solve it. |
My assumption was wrong then. |
It might be that the code is depending on an int field being a string. I fixed a few of those oddities in my master server. If so it should consistently crash for everyone though, and I don't have this issue. |
NEVER use a different version then our included jthiread it's not gonna work, we changed quite a lot things in there |
I'll keep that in mind, but anyway this bug is not related to using the system version of jthread, since I can reproduce both with minetest's and my system's. |
@sapier's comment put my on the right track and I figured out that the issue comes from jsoncpp. When retrieving the server list with minetest build against my system's jsoncpp library (0.6.0 RC2), the game crashes. With the embedded version from the minetest tree, it works fine. So I can build minetest against the embedded version of jsoncpp to workaround this issue. I'll let you decide whether you want to try to fix the compatibility with jsoncpp 0.6.0 RC2 or close the issue. Note that jsoncpp 0.7.0 (pre C++11 branch) and 1.0.0 were released 11 days ago; minetest doesn't link against version 1.0.0, I'm off testing 0.7.0. |
There are a lot of LTS distros out there that still do not support C++11, so maybe that's why the JSON lib is included in the minetest tree. Although I'm not sure this explains your issue (apart from the linking one) |
The 0.6.0 RC2 version I was building against is not using C++11, and the newly released 0.7.0 version doesn't either, as I can infer from the branching upstream: https://github.com/open-source-parsers/jsoncpp |
Yes, so I'm not sure what the issue is. Perhaps the one bundled with minetest is modified (I really don't know, sorry). The only reason I commented is I didn't want this issue used as excuse for starting to use C++11 (which you didn't suggest, but ya never know how people might read things :)) |
I built minetest against jsoncpp 0.7.0, and there is some change: the client no longer segfault but I get The GUI stays responsive, but trying to launch a game or to close the client ends up in a freeze (which seems logical with regard to the error message). |
Here's a backtrace. I don't know if this is relevant because the game doesn't segfault, so I had to close it with Ctrl+C in gdb to be able to ask for a backtrace (so maybe it's just a backtrace of my Ctrl+C call :-) ):
|
It looks like minetest's version of jsoncpp was never patched and was imported in 2013, so it should work with a system wide version: https://github.com/minetest/minetest/commits/master/src/json/jsoncpp.cpp Unless minetest uses it in a way that was not supported in 0.6 RC2 (2011) and was changed in 0.7.0 (2014). |
@akien-mga still an issue? Note we have now moved to C++11. |
Did a quick test with minetest 0.4.16, building with |
Thanks. |
I enabled cURL support in Mageia's minetest 0.4.10 package, but it crashes when trying to retrieve the servers list. Disabling the cURL support gets rid of the crash of course.
Here are the log and backtrace from gdb:
This is on Mageia 5 with cURL 7.38.0.
The text was updated successfully, but these errors were encountered: