Wings 3D Development Forum
OBJ Import fails in Wings - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://www.wings3d.com/forum/forumdisplay.php?fid=12)
+--- Thread: OBJ Import fails in Wings (/showthread.php?tid=895)



OBJ Import fails in Wings - ged - 10-01-2014

Obj file is a old clock captured using the "Structure Sensor" scanner app.

https://drive.google.com/file/d/0B_tysJVYT_ELVkQtcFRiOFZlWk0/view?usp=sharing

Contents of Zip:
Crash - Clock.obj (crashes on import)
Works - Clock.3ds (imported and exported via Blender)
wings_crash.dump (see below)

Dump written 2014-10-1_14-35
Version: 1.5.3
Window: geom
Reason: function_clause

Short stack trace:
[]

Long stack trace:
[{wings,command_1,
[{'EXIT',
{badarg,
[{erlang,list_to_integer,["nan"],[]},
{e3d_obj,str2float_2,2,[{file,"e3d_obj.erl"},{line,400}]},
{e3d_obj,parse,2,[{file,"e3d_obj.erl"},{line,221}]},
{e3d_obj,read_1,4,[{file,"e3d_obj.erl"},{line,195}]},
{e3d_obj,import_1,2,[{file,"e3d_obj.erl"},{line,59}]},
{e3d_obj,import,1,[{file,"e3d_obj.erl"},{line,46}]},
{wpc_obj,'-import_fun/1-fun-0-',2,
[{file,"wpc_obj.erl"},{line,63}]},
{wpa,do_import,3,[{file,"wpa.erl"},{line,121}]}]}},
{st,{0,nil},
face,true,[],
{0,nil},
none,
{1,
{default,
[{maps,[]},
{opengl,
[{ambient,
{0.7898538076923077,0.8133333333333334,
0.6940444444444445,1.0}},
{diffuse,
{0.7898538076923077,0.8133333333333334,
0.6940444444444445,1.0}},
{emission,{0.0,0.0,0.0,1.0}},
{shininess,0.0},
{specular,{0.0,0.0,0.0,1.0}},
{vertex_colors,set}]}],
nil,nil}},
[],undefined,true,1,none,none,
{0,{}},
{1,{wings_shape,{no_folder,[]},nil,nil}},
ignore,none,none,
{ignore,ignore},
{'EXIT',
{badarg,
[{erlang,list_to_integer,["nan"],[]},
{e3d_obj,str2float_2,2,[{file,"e3d_obj.erl"},{line,400}]},
{e3d_obj,parse,2,[{file,"e3d_obj.erl"},{line,221}]},
{e3d_obj,read_1,4,[{file,"e3d_obj.erl"},{line,195}]},
{e3d_obj,import_1,2,[{file,"e3d_obj.erl"},{line,59}]},
{e3d_obj,import,1,[{file,"e3d_obj.erl"},{line,46}]},
{wpc_obj,'-import_fun/1-fun-0-',2,
[{file,"wpc_obj.erl"},{line,63}]},
{wpa,do_import,3,[{file,"wpa.erl"},{line,121}]}]}},
{[],[]},
true,[]}],
[{file,"wings.erl"},{line,703}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,81}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,589}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,826}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,797}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,698}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,612}]},
{wings,init,1,[{file,"wings.erl"},{line,154}]}]


RE: OBJ Import fails in Wings - micheus - 10-01-2014

There is a problem with the .obj file: it has invalid values (these NAN you see bellow)
Quote:vn 0.957995 -0.282981 0.0465506
vn nan nan nan
vn nan nan nan
vn nan nan nan
vn -0.521705 -0.532609 -0.666447
vn nan nan nan
vn -0.538406 -0.662502 -0.520779
vn -0.458482 -0.257618 -0.850545
The .3ds file is consistent. Use File->Import->3D Studio (*.3ds) to load it into Wings3d.