rajataggarwal91 / webgl-loader

Automatically exported from code.google.com/p/webgl-loader
0 stars 0 forks source link

Segfault on (valid?) OBJ file #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is the stack trace:

{{{
(gdb) run duck.obj duck.utf8
Starting program: /home/jterrace/webgl-loader/bin/objcompress duck.obj duck.utf8

Program received signal SIGSEGV, Segmentation fault.
0x00000000004040e8 in DrawBatch::AddTriangle (this=0x62a3e8, group_line=0, 
indices=0x7fffffffd940) at ../src/mesh.h:325
325         if (flat_index > group.max_index) {
(gdb) bt
#0  0x00000000004040e8 in DrawBatch::AddTriangle (this=0x62a3e8, group_line=0, 
indices=0x7fffffffd940) at ../src/mesh.h:325
#1  0x00000000004052b3 in WavefrontObjFile::ParseFace (this=0x7fffffffdba0, 
line=0x7fffffffda08 "", line_num=8549) at ../src/mesh.h:641
#2  0x0000000000404e5d in WavefrontObjFile::ParseLine (this=0x7fffffffdba0, 
line=0x7fffffffd9e0 "f 235/3272/610 271/3255/825 348/3230/876", line_num=8549)
    at ../src/mesh.h:536
#3  0x0000000000404d58 in WavefrontObjFile::ParseFile (this=0x7fffffffdba0, 
fp=0x627010) at ../src/mesh.h:526
#4  0x0000000000404aa7 in WavefrontObjFile::WavefrontObjFile 
(this=0x7fffffffdba0, fp=0x627010) at ../src/mesh.h:479
#5  0x000000000040242e in main (argc=3, argv=0x7fffffffe1e8) at 
../src/objcompress.cc:30
}}}

Original issue reported on code.google.com by jterr...@gmail.com on 1 Dec 2011 at 8:46

Attachments:

GoogleCodeExporter commented 9 years ago
Hmm, apparently I can't edit my own issue? Well anyway, some more info:
The attached OBJ/MTL file loads fine in other programs, so not sure why it's 
segfaulting. Anything wrong with the OBJ formatting? Nothing pops out at me at 
first glance.

Original comment by jterr...@gmail.com on 1 Dec 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Thanks, I'll take a look. Do you have a deadline? I can't promise anything, but 
I can tell you if the deadline is reasonable :)

Original comment by wonchun on 1 Dec 2011 at 11:04

GoogleCodeExporter commented 9 years ago
Not a critical deadline, but was trying to integrate objcompress into the 
backend of open3dhub.com so that it would automatically export UTF8 versions of 
models. I can't tell what's wrong with the OBJ - if you can tell what's causing 
the error, I can fix the OBJ files instead as a workaround.

Original comment by jterr...@gmail.com on 1 Dec 2011 at 11:06

GoogleCodeExporter commented 9 years ago
FYI, the file works fine on r50

Original comment by jterr...@gmail.com on 2 Dec 2011 at 8:38

GoogleCodeExporter commented 9 years ago
I have this issue with the default .obj (ben_00.obj and hand_00.obj) from the 
repository. weird.

Original comment by vitaliy....@gmail.com on 22 Dec 2011 at 6:06

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r74.

Original comment by wonchun on 22 Dec 2011 at 10:39

GoogleCodeExporter commented 9 years ago
Fixed in r74.

Original comment by wonchun on 22 Dec 2011 at 10:40