[worked around] Latest version segfaults when I run it.

For those having trouble installing/running the game or to report a bug

Moderator: Staff

Winter Knight
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm

[worked around] Latest version segfaults when I run it.

Postby Winter Knight » Fri Sep 21, 2007 11:30 pm

The latest version segfaults when run. It segfaults while on this line:
main.cpp:151: hoa_defs::BindEngineToLua();

Here is a backtrace:

Code: Select all

(gdb) bt
#0  0x83e58955 in ?? ()
#1  0xb7f2349b in luabind::detail::overload_rep::overload_rep () from /usr/lib/libluabind.so.0
#2  0xb7f244e9 in std::vector<luabind::detail::overload_rep, std::allocator<luabind::detail::overload_rep> >::_M_insert_aux ()
   from /usr/lib/libluabind.so.0
#3  0xb7f219ff in luabind::detail::class_base::add_method () from /usr/lib/libluabind.so.0
#4  0x08057772 in hoa_defs::BindEngineToLua () at /usr/include/luabind/class.hpp:1223
#5  0x0805195c in InitializeEngine () at src/main.cpp:151
#6  0x08053946 in main (argc=1, argv=0xbfbf4d94) at src/main.cpp:234

I am using libluabind 0.7. I am using lua 5.0.3. What lua versions do you guys use?
Last edited by Winter Knight on Sat Sep 22, 2007 12:01 am, edited 1 time in total.
Winter Knight
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm

Postby Winter Knight » Sat Sep 22, 2007 12:01 am

After reading this post: http://www.allacrost.org/forum/viewtopic.php?t=1759 I got an idea.

I recompiled luabind with my current g++ version, 4.2.1. It worked!

Judging by Auris's and my experience, it seems that allacrost and luabind have to be compiled with the same version of g++. I don't know why this would be.
User avatar
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX

Postby Roots » Sat Sep 22, 2007 1:06 am

I believe it is because otherwise the two libraries use different versions of libc. luabind has been somewhat of a headache for us, and I get a similar seg fault if I use the official Luabind package in the Debian repository, versus our own luabind package that's kept in Allacrost's repository for Debian installs.
Winter Knight
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm

Postby Winter Knight » Sat Sep 22, 2007 1:37 am

Roots wrote:I believe it is because otherwise the two libraries use different versions of libc.

They both use libc6. Both the version in the debian repository and anything that compiles on my system. I only have one version of libc. Not saying I have a better answer though. Unless I am mistaken, various versions of g++ should be compatable (since 3.4, at least).

The released allacrost debian binary works with the official debian libluabind0. However, when I compile allacrost myself, I also have to compile libluabind0 myself, or else it will segfault. I can't use the released allacrost debian binary with my custom built libluabind0, or else, again, it will segfault, even though they both use the same libc and libstdc++.

I didn't even know that you had your own version of libluabind0 in your repository. I checked, and that is not the one that I installed. I installed the official debian version. It has a slightly higher version number.

UPDATE: It is not as simple as I had believed, and I never thought this was simple. I just recompiled allacrost using g++-4.1. It still segfaults with the debian libluabind0. It works fine with libluabind0 compiled with g++-4.2.

These are the combinations that work, so far:
official allacrost debian binary : libluabind0 binary from debian repo
latest svn allacrost (compiled with g++-4.1 or g++-4.2) : locally compiled libluabind0 from debian repo source.

I'll try to narrow it down bit more.

UPDATE #2: I just tested a theory, and it seems that it is true. I compiled libluabind0 from the debian repo source, using both g++-4.1 and g++-4.2. It does not matter which I use. They both allow a locally compiled allacrost to run, but fail when I run the official allacrost debian binary. When I use the official libluabind0 binary, then the official allacrost binary will run, but neither a locally compiled latest svn, or svn858 (allacrost release version from June) will run. svn and svn858, locally compiled, will run with a locally compiled version of libluabind0.

Conclusion thus far: libluabind0 and allacrost must be compiled on the same machine. I don't know why yet. I have ruled out g++ version, and a I have ruled out a difference in allacrost between 0.2.0 and latest svn.

UPDATE #3: I had another theory. I thought that Roots might be right about using different libc6 versions. However, the debian binary is compiled with libc6-dev 2.6.1-1+b1. According to my install logs, I installed that exact same version of libc6 and libc6-dev in August, one month before I discovered allacrost, and I am still using that version today. Here is the debian build log.

On the other hand, perhaps it is a problem with compiling with differing libstdc++ versions? It appears that the build machine had a differing run-time and dev versions of libstdc++. I've added a comment to the related debian bug report.

Return to “Technical Issues”

Who is online

Users browsing this forum: No registered users and 1 guest