Skip to content
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

Segfault on bleeding edge linux build #183

Closed
FreakTheMighty opened this issue Apr 30, 2019 · 6 comments
Closed

Segfault on bleeding edge linux build #183

FreakTheMighty opened this issue Apr 30, 2019 · 6 comments
Assignees
Labels

Comments

@FreakTheMighty
Copy link
Contributor

FreakTheMighty commented Apr 30, 2019

It seems the latest linux build is segfaulting on any FBX.

I'm running in docker using FROM ubuntu:16.04 to match your azure pipeline and the result is:

root@46c4f6423ab8:/app# ./bin/FBX2glTF -i src/piper_pa18.fbx -o /tmp/ --verbose
Defaulting to --pbr-metallic-roughness material support.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
@FreakTheMighty
Copy link
Contributor Author

Just to make sure we're on the same page, here is a super simple FBX cube exported from Maya. Also, running multiple times gives different outputs.

cube.fbx.zip

root@e9f8c54e15d2:/data# FBX2glTF -i cube.fbx -o cube.gltf
*** Error in `FBX2glTF': free(): invalid pointer: 0x0000000002b6b488 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f0654b497e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f0654b5237a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f0654b5653c]
FBX2glTF[0x40f771]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f0654af2830]
FBX2glTF[0x41ebd9]
======= Memory map: ========
00400000-00b9d000 r-xp 00000000 08:01 2447614                            /usr/bin/FBX2glTF
00d9c000-00db6000 r--p 0079c000 08:01 2447614                            /usr/bin/FBX2glTF
00db6000-00db9000 rw-p 007b6000 08:01 2447614                            /usr/bin/FBX2glTF
00db9000-00dc2000 rw-p 00000000 00:00 0 
02b4e000-02b80000 rw-p 00000000 00:00 0                                  [heap]
7f064c000000-7f064c021000 rw-p 00000000 00:00 0 
7f064c021000-7f0650000000 ---p 00000000 00:00 0 
7f0652a65000-7f065431b000 r-xp 00000000 08:01 2371831                    /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7f065431b000-7f065451a000 ---p 018b6000 08:01 2371831                    /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7f065451a000-7f065451b000 r--p 018b5000 08:01 2371831                    /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7f065451b000-7f065451c000 rw-p 018b6000 08:01 2371831                    /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7f065451c000-7f065453d000 r-xp 00000000 08:01 684679                     /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f065453d000-7f065473c000 ---p 00021000 08:01 684679                     /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f065473c000-7f065473d000 r--p 00020000 08:01 684679                     /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f065473d000-7f065473e000 rw-p 00021000 08:01 684679                     /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f065473e000-7f06548bd000 r-xp 00000000 08:01 2372044                    /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7f06548bd000-7f0654abd000 ---p 0017f000 08:01 2372044                    /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7f0654abd000-7f0654acd000 r--p 0017f000 08:01 2372044                    /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7f0654acd000-7f0654ace000 rw-p 0018f000 08:01 2372044                    /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7f0654ace000-7f0654ad2000 rw-p 00000000 00:00 0 
7f0654ad2000-7f0654c92000 r-xp 00000000 08:01 684648                     /lib/x86_64-linux-gnu/libc-2.23.so
7f0654c92000-7f0654e92000 ---p 001c0000 08:01 684648                     /lib/x86_64-linux-gnu/libc-2.23.so
7f0654e92000-7f0654e96000 r--p 001c0000 08:01 684648                     /lib/x86_64-linux-gnu/libc-2.23.so
7f0654e96000-7f0654e98000 rw-p 001c4000 08:01 684648                     /lib/x86_64-linux-gnu/libc-2.23.so
7f0654e98000-7f0654e9c000 rw-p 00000000 00:00 0 
7f0654e9c000-7f0654eb2000 r-xp 00000000 08:01 684669                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f0654eb2000-7f06550b1000 ---p 00016000 08:01 684669                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f06550b1000-7f06550b2000 rw-p 00015000 08:01 684669                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f06550b2000-7f06551ba000 r-xp 00000000 08:01 684680                     /lib/x86_64-linux-gnu/libm-2.23.so
7f06551ba000-7f06553b9000 ---p 00108000 08:01 684680                     /lib/x86_64-linux-gnu/libm-2.23.so
7f06553b9000-7f06553ba000 r--p 00107000 08:01 684680                     /lib/x86_64-linux-gnu/libm-2.23.so
7f06553ba000-7f06553bb000 rw-p 00108000 08:01 684680                     /lib/x86_64-linux-gnu/libm-2.23.so
7f06553bb000-7f065552d000 r-xp 00000000 08:01 685558                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f065552d000-7f065572d000 ---p 00172000 08:01 685558                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f065572d000-7f0655737000 r--p 00172000 08:01 685558                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f0655737000-7f0655739000 rw-p 0017c000 08:01 685558                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f0655739000-7f065573d000 rw-p 00000000 00:00 0 
7f065573d000-7f0655756000 r-xp 00000000 08:01 684747                     /lib/x86_64-linux-gnu/libz.so.1.2.8
7f0655756000-7f0655955000 ---p 00019000 08:01 684747                     /lib/x86_64-linux-gnu/libz.so.1.2.8
7f0655955000-7f0655956000 r--p 00018000 08:01 684747                     /lib/x86_64-linux-gnu/libz.so.1.2.8
7f0655956000-7f0655957000 rw-p 00019000 08:01 684747                     /lib/x86_64-linux-gnu/libz.so.1.2.8
7f0655957000-7f0655b08000 r-xp 00000000 08:01 2372228                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3
7f0655b08000-7f0655d07000 ---p 001b1000 08:01 2372228                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3
7f0655d07000-7f0655d0f000 r--p 001b0000 08:01 2372228                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3
7f0655d0f000-7f0655d11000 rw-p 001b8000 08:01 2372228                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3
7f0655d11000-7f0655d12000 rw-p 00000000 00:00 0 
7f0655d12000-7f0655d2a000 r-xp 00000000 08:01 684716                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f0655d2a000-7f0655f29000 ---p 00018000 08:01 684716                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f0655f29000-7f0655f2a000 r--p 00017000 08:01 684716                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f0655f2a000-7f0655f2b000 rw-p 00018000 08:01 684716                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f0655f2b000-7f0655f2f000 rw-p 00000000 00:00 0 
7f0655f2f000-7f0655f32000 r-xp 00000000 08:01 684661                     /lib/x86_64-linux-gnu/libdl-2.23.so
7f0655f32000-7f0656131000 ---p 00003000 08:01 684661                     /lib/x86_64-linux-gnu/libdl-2.23.so
7f0656131000-7f0656132000 r--p 00002000 08:01 684661                     /lib/x86_64-linux-gnu/libdl-2.23.so
7f0656132000-7f0656133000 rw-p 00003000 08:01 684661                     /lib/x86_64-linux-gnu/libdl-2.23.so
7f0656133000-7f0656159000 r-xp 00000000 08:01 684628                     /lib/x86_64-linux-gnu/ld-2.23.so
7f065634a000-7f0656353000 rw-p 00000000 00:00 0 
7f0656357000-7f0656358000 rw-p 00000000 00:00 0 
7f0656358000-7f0656359000 r--p 00025000 08:01 684628                     /lib/x86_64-linux-gnu/ld-2.23.so
7f0656359000-7f065635a000 rw-p 00026000 08:01 684628                     /lib/x86_64-linux-gnu/ld-2.23.so
7f065635a000-7f065635b000 rw-p 00000000 00:00 0 
7ffc6d5ee000-7ffc6d60f000 rw-p 00000000 00:00 0                          [stack]
7ffc6d7e7000-7ffc6d7e9000 r--p 00000000 00:00 0                          [vvar]
7ffc6d7e9000-7ffc6d7eb000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

@zellski
Copy link
Contributor

zellski commented May 1, 2019

Yikes. I’ll investigate as soon as I can. There hasn’t been much time lately; I’m the only maintainer and this is a hobby project. I saw your PR — looking forward to eyeballing that too.

@FreakTheMighty
Copy link
Contributor Author

FWIW things are working at 4bb4bdb, so I think this (7dd8438) was the breaking commit.

@zellski zellski added the bug label May 2, 2019
@zellski zellski self-assigned this May 2, 2019
@zellski
Copy link
Contributor

zellski commented May 3, 2019

Drive-by test under Windows (happened to be booted) shows no memory issues, so I guess it might be OS dependent.

@zellski
Copy link
Contributor

zellski commented May 7, 2019

Hmm... absolutely can't cause this error to happen on any of my regular build environments. I guess it must be related to an old glibc or some similar system level difference? I'll try building & debugging in the Docker environment.

@zellski
Copy link
Contributor

zellski commented May 13, 2019

Fixed in ed43cac.

@zellski zellski closed this as completed May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants