libgdx / fbx-conv

Command line utility using the FBX SDK to convert FBX/Collada/Obj files to a custom text/binary format for static, keyframed and skinned meshes.
Apache License 2.0
448 stars 116 forks source link

Linux Segfault #59

Closed andrepl closed 10 years ago

andrepl commented 10 years ago

Built from 2579f61cbd9dd4064a94524d8a71079a0787b3d7 w/ debug config in order to get a proper backtrace from this:

(gdb) r
Starting program: /home/andre/fbxconv/fbx-conv/fbx-conv 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000407d40 in fbxconv::log::Log::msg (this=0x7fffffffde20, code=2) at ../../src/log/log.h:59
59              return (*messages)[code];
(gdb) bt full
#0  0x0000000000407d40 in fbxconv::log::Log::msg (this=0x7fffffffde20, code=2) at ../../src/log/log.h:59
No locals.
#1  0x0000000000407d6a in fbxconv::log::Log::vformat (this=0x7fffffffde20, code=2, vl=0x7fffffffdce8) at ../../src/log/log.h:64
        buff = '\000' <repeats 1023 times>
#2  0x0000000000407f77 in fbxconv::log::Log::vlog (this=0x7fffffffde20, type=@0x43f234: 8, code=@0x7fffffffdcd4: 2, vl=0x7fffffffdce8) at ../../src/log/log.h:116
No locals.
#3  0x0000000000408648 in fbxconv::log::Log::info (this=0x7fffffffde20, code=2) at ../../src/log/log.h:156
        vl = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fffffffddc0, reg_save_area = 0x7fffffffdd00}}
#4  0x0000000000416406 in fbxconv::FbxConv::FbxConv (this=0x7fffffffde10, log=0x7fffffffde20) at ../../src/FbxConv.h:60
No locals.
#5  0x0000000000406d8e in process (argc=1, argv=0x7fffffffdf68) at ../../src/main.cpp:45
        log = {_vptr.Log = 0x443230 <vtable for fbxconv::log::Log+16>, static LOG_STATUS = 1, static LOG_PROGRESS = 2, static LOG_DEBUG = 4, static LOG_INFO = 8, 
          static LOG_VERBOSE = 16, static LOG_WARNING = 32, static LOG_ERROR = 64, filter = -1, messages = @0x7fffffffde10}
        conv = {log = 0x7fffffffde20}
#6  0x0000000000406e20 in main (argc=1, argv=0x7fffffffdf68) at ../../src/main.cpp:55
        result = 0
xoppa commented 10 years ago

Thanks! It looks like somehow https://github.com/libgdx/fbx-conv/commit/69405446289281d15b1a0d178deb44b6edbb77fe reverted #52. Should be solved now. Would you mind to verify and report back as I currently can't test on linux?

andrepl commented 10 years ago

Verified, working perfectly now, thanks.

viperscape commented 10 years ago

I am still getting segfault on precomp binary for linux, I see the jenkins build has failed too-- unless I'm reading that wrong

andrepl commented 10 years ago

@viperscape looks like you're right, it broke the windows build, and I'm not sure if jenkins ever built the linux binary. the logs don't seem to show it, so the one you downloaded is probably the old one.

If you clone this repo and only run the linux build it should work fine, I'll open a new issue for the windows build :)

viperscape commented 10 years ago

I get a build error on make, perhaps I should open a new ticket?

In member function ‘void fbxconv::modeldata::OptionalValue<T, n>::set(T, ...) [with T = float; long unsigned int n = 3ul]’:
cc1plus: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
cc1plus: note: (so you should pass ‘double’ not ‘float’ to ‘va_arg’)
cc1plus: note: if this code is reached, the program will abort
fbx-conv.make:130: recipe for target 'obj/Debug/main.o' failed
make[1]: *** [obj/Debug/main.o] Error 1
Makefile:16: recipe for target 'fbx-conv' failed
make: *** [fbx-conv] Error 2