JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.01k stars 612 forks source link

Segmentation fault between linuxjampded(original) and jampgame(openjk) #358

Closed Yberion closed 11 years ago

Yberion commented 11 years ago

Ubuntu 32, 12.04.

Building myself using cmake and gdb (still 32bits) :

Program received signal SIGSEGV, Segmentation fault. 0xb5092508 in SaveRegisteredItems ()

Using gdb + Xycaleth's build from here http://jk.xd.cm/builders/linux/builds/243 :

Program received signal SIGSEGV, Segmentation fault. 0xb508f146 in ClientSpawn ()

I don't have any error using a debug build or openjkded.

No error on windows too.

Razish commented 11 years ago

What gamecode are you running? Is it using the new API?

ensiform commented 11 years ago

Hes using openjk gamecode and linuxjampded.

Yberion commented 11 years ago

When using the Xycaleth's 32bit build, the segmentation fault only happen when someone connect, real/bot client.

And yes i am using theoriginal linuxjampded with the jampgame from openjk.

Razish commented 11 years ago

Seems to work for me on Ubuntu 32bit, linuxjampded and latest OpenJK gamecode, adding bots via bot_minplayers 2. Can't test real clients yet, I will later tonight.

EDIT: Tested with real clients. No crash. Can't reproduce on Window 32, Linux 32 or Linux 64 using any variant of (linux)jampded, openjkded, raven gamecode or openjk gamecode using latest from git.

Yberion commented 11 years ago

I just tested, with the new xycaleth's build and compiling myself, it does the same "segmentation fault", it happened too on a public server.

ensiform commented 11 years ago

Check to see if it works now.

Yberion commented 11 years ago

df3f4c1 didn't solved the problem, same segmentation fault (compiling myself or using xycaleth's build).

ensiform commented 11 years ago

Did you actually rerun cmake.

Yberion commented 11 years ago

I totaly deleted the openjk folder, re-downloaded it with github and rerun cmake and did : make jampgamei386.

Edit: no segmentation fault in debug and in relwithdebinfo same using openjkded (no error)

Edit2: building with relwithdebinfo but using -o3 (default is -o2) do this :

http://pastebin.com/TsnrxmWn https://github.com/Razish/OpenJK/blob/master/codemp/game/g_items.c#L3036

-o3 seems to be the problem

ensiform commented 11 years ago

df3f4c1 only fixed -O2 supposedly. @Razish didn't implement teh's fix for -O3. Apparently needs -fno-tree-vectorize too. (For engine related crash in -O3)

Yberion commented 11 years ago

-fno-tree-vectorize (-o3) fixed the problem, thanks teh & ensiform !