Segfault when updating to Bullet 2.86 (Help Needed!)

Post Reply
Electric-Gecko
Posts: 1
Joined: Wed Jun 21, 2017 8:18 am

Segfault when updating to Bullet 2.86 (Help Needed!)

Post by Electric-Gecko » Wed Jun 21, 2017 8:48 am

I am badly needing some one-time help in fixing a segfault in the open-source game project; Lips of Suna.

I have been updating the codebase to support Ogre 1.10 and Bullet 2.86. I am very inexperienced with C++ and programming in general, so this was not a trivial task. Worse, the project was abandoned by it's creator, so I don't have a team of devs to help me.

With all my changes, I have finally managed to make it compile with Bullet 2.86 and Ogre 1.10. The only problem that remains is that it segfaults immediately after starting the program.

It would be best if someone could volunteer and go to the Lips of Suna repository and fix it themselves, as fixing a segfault is something that I have never achieved. However, I will still appreciate if anyone gives me hints from here.

Git repository: https://gitlab.com/electric-gecko/lipsofsuna.git

Here's the backtrace from gdb:

Code: Select all

#0  0x00007ffff6c25489 in btClock::getTimeMicroseconds() () from /usr/lib/libLinearMath.so.2.86
#1  0x00007ffff6c25788 in CProfileNode::Call() () from /usr/lib/libLinearMath.so.2.86
#2  0x00007ffff6c25da6 in CProfileManager::Reset() () from /usr/lib/libLinearMath.so.2.86
#3  0x00007ffff71a1e95 in btDiscreteDynamicsWorld::stepSimulation(float, int, float) ()
   from /usr/lib/libBulletDynamics.so.2.86
#4  0x00000000004fcc17 in liphy_physics_update (self=0x83ff30, secs=0.00153100491)
    at ../src/lipsofsuna/extension/physics/physics.cpp:416
#5  0x00000000004e3542 in private_physics_main (thread=0x15d3bd0, data=0x7fffffffd730)
    at ../src/lipsofsuna/extension/parallel/ext-module.c:140
#6  0x0000000000469f15 in private_thread (data=0x15d3bd0) at ../src/lipsofsuna/system/system-thread.c:91
#7  0x00007ffff5e92297 in start_thread () from /usr/lib/libpthread.so.0
#8  0x00007ffff302a1ef in clone () from /usr/lib/libc.so.6
Here's my full terminal input/output from gdb:
lipsofsuna-gdb.txt
Terminal input/output from gdb
(13.34 KiB) Downloaded 87 times
gdb has been pointing fingers at "src/lipsofsuna/extension/physics/physics.cpp", line 416.

Code: Select all

void liphy_physics_update (
	LIPhyPhysics* self,
	float         secs)
{
	/* Step simulation. */
	self->updating = 1;
	self->dynamics->stepSimulation (secs, 20);
	self->updating = 0;
}

Here are instructions to compile from Linux terminal:

Code: Select all

./waf configure --disable-input-grabs
./waf
There's also a "--enable-memdebug" option, although I haven't figured out what it does.
It used to put the executable "lipsofsuna" in the active directory. However, recently it's strangely been putting it in ".build/". It must be moved to the base directory for it to work.

Code: Select all

mv .build/lipsofsuna .
You're help will be very much appreciated.

Post Reply