Wings 3D Development Forum

Full Version: [patched] (2.2.7) Wings 3D crash when import obj. in Win 10
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hy there,

I need to report a crash of Wings 3D 2.2.7
I used OS Win 10 64 bit

built Windows 10 Home 20H2

My spec.
AMD Ryzen 5 1600 Six-Core Processor 3.20 GHz
8,00 GB DDR4
AMD R7 370 2GB
motherboard - GIGABYTE B450M DS3H V2

When I import the model in .obj format to Wings - crashed down
no crash report generated

import setup:
Swap Y and Z Axes


Thanks
olve11

Is this file available for download somewhere?

I'm asking because the .obj files I have (even some problematics ones that someone shared with me) are still loading without any problem.
It should be something in this file.
Hi micheus,

Link ↓
https://ulozto.net/file/hSKeBpodbTU9/hab...FF01HGH5Zj==

In Wings version 2.2.6.1 I have no problem with this
No problem here...
[Image: haban-bell-tower.png]

Just in case, here is it in wings format.
I've just downloaded 2.2.7 and am having the same crash. Based on a message in the log about textures I've done a quick test :
To test, in another program I've created a single cube and saved as an obj. This opens fine in 2.2.7. I then applied an image texture to the cube and saved again. This one crashes. The log is below.

Log below:
Dump written 2021-11-12_9-22
Version: 2.2.7
Window: geom
Reason: function_clause

Short stack trace:
[{wings,command_1,2,[{file,"wings.erl"},{line,767}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,87}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,643}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,1032}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,998}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,890}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,799}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,685}]},
{wings,init_part2,3,[{file,"wings.erl"},{line,108}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

Long stack trace:
[{wings,command_1,
[{'EXIT',
{{{badarg,none},
[{string,casefold,1,[{file,"string.erl"},{line,387}]},
{wings_image,'-handle_call/3-fun-6-',2,
[{file,"wings_image.erl"},{line,332}]},
{wings_image,'-handle_call/3-lc$^8/1-0-',2,
[{file,"wings_image.erl"},{line,337}]},
{wings_image,handle_call,3,[{file,"wings_image.erl"},{line,336}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,715}]},
{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,744}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]},
{gen_server,call,
[wings_image,
{find_image,"c:/Users/shane/Desktop","Marbl24l.jpg"},
infinity]}}},
{st,{0,nil},
face,true,[],
{0,nil},
none,
{1,
{default,
[{maps,[]},
{opengl,
[{diffuse,
{0.7898538076923077,0.8133333333333334,
0.6940444444444445,1.0}},
{emission,{0.0,0.0,0.0,1.0}},
{metallic,0.1},
{roughness,0.8},
{vertex_colors,set}]}],
nil,nil}},
[],undefined,true,1,none,none,
{0,{}},
{1,{wings_shape,{no_folder,[{no_folder,{open,{0,nil}}}]},nil,nil}},
ignore,none,none,
{ignore,ignore},
{'EXIT',
{{{badarg,none},
[{string,casefold,1,[{file,"string.erl"},{line,387}]},
{wings_image,'-handle_call/3-fun-6-',2,
[{file,"wings_image.erl"},{line,332}]},
{wings_image,'-handle_call/3-lc$^8/1-0-',2,
[{file,"wings_image.erl"},{line,337}]},
{wings_image,handle_call,3,
[{file,"wings_image.erl"},{line,336}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,715}]},
{gen_server,handle_msg,6,
[{file,"gen_server.erl"},{line,744}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,226}]}]},
{gen_server,call,
[wings_image,
{find_image,"c:/Users/shane/Desktop","Marbl24l.jpg"},
infinity]}}},
{[],[]},
true,[]}],
[{file,"wings.erl"},{line,767}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,87}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,643}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,1032}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,998}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,890}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,799}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,685}]},
{wings,init_part2,3,[{file,"wings.erl"},{line,108}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

Argument #2:
Quote:To test,
1) in another program I've created a single cube and saved as an obj.
2) This opens fine in 2.2.7.
3) I then applied an image texture to the cube and saved again. This one crashes.
Please, can you detail the step 3:
- Was the .obj UV mapped in the other app?
- if not, was UV mapped in Wings3D before you assign the image?
- How did you assigned the image? you have loaded from HD or created it in Wings3D just for test(like one of those patterns, checkers, horiz line, vert line);
- Does the object has any material assigned to it or were you using the default one and attached the image to its Base Color property?

Sorry, but I need these information in order to try replicate the issue, because I couldn't.

Eventually, you can share this problematic file (as a .wings files) and then I try to export it here and see if I can get the issie.
Hi @micheus,
I didn't explicitly UV map the cube in the .obj file - all I did was change the default material to use the image as the base colour. It was created in the other program, Wings was only used when I tried to import it. I only have the .obj file as a result.

obj
https://drive.google.com/file/d/1Rompxed...sp=sharing
mtl file
https://drive.google.com/file/d/1BjQCV25...sp=sharing

Okay, I have reproduced it in wings.
Create a texture externally (256x256 png)
Create a standard cube.
Import the image
Assign the image to the default material. Cube now has the texture.
Save as obj
File new
File import

Dump written 2021-11-12_13-16
Version: 2.2.7
Window: geom
Reason: function_clause

Short stack trace:
[{wings,command_1,2,[{file,"wings.erl"},{line,767}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,87}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,643}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,1032}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,998}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,890}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,799}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,685}]},
{wings,init_part2,3,[{file,"wings.erl"},{line,108}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

Long stack trace:
[{wings,command_1,
[{'EXIT',
{{{badarg,none},
[{string,casefold,1,[{file,"string.erl"},{line,387}]},
{wings_image,'-handle_call/3-fun-6-',2,
[{file,"wings_image.erl"},{line,332}]},
{wings_image,'-handle_call/3-lc$^8/1-0-',2,
[{file,"wings_image.erl"},{line,337}]},
{wings_image,handle_call,3,[{file,"wings_image.erl"},{line,336}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,715}]},
{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,744}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]},
{gen_server,call,
[wings_image,
{find_image,"c:/Users/shane/Desktop","Untitled.png"},
infinity]}}},
{st,{0,nil},
edge,false,[],
{0,nil},
none,
{1,
{default,
[{maps,[]},
{opengl,
[{diffuse,
{0.7898538076923077,0.8133333333333334,
0.6940444444444445,1.0}},
{emission,{0.0,0.0,0.0,1.0}},
{metallic,0.1},
{roughness,0.8},
{vertex_colors,set}]}],
nil,nil}},
[],undefined,true,1,none,none,
{0,{}},
{1,{wings_shape,{no_folder,[{no_folder,{open,{0,nil}}}]},nil,nil}},
{face,{plane_cut,y}},
{1.0,0.0,0.0},
none,
{ignore,ignore},
{'EXIT',
{{{badarg,none},
[{string,casefold,1,[{file,"string.erl"},{line,387}]},
{wings_image,'-handle_call/3-fun-6-',2,
[{file,"wings_image.erl"},{line,332}]},
{wings_image,'-handle_call/3-lc$^8/1-0-',2,
[{file,"wings_image.erl"},{line,337}]},
{wings_image,handle_call,3,
[{file,"wings_image.erl"},{line,336}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,715}]},
{gen_server,handle_msg,6,
[{file,"gen_server.erl"},{line,744}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,226}]}]},
{gen_server,call,
[wings_image,
{find_image,"c:/Users/shane/Desktop","Untitled.png"},
infinity]}}},
{[],[]},
true,[]}],
[{file,"wings.erl"},{line,767}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,87}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,643}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,1032}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,998}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,890}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,799}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,685}]},
{wings,init_part2,3,[{file,"wings.erl"},{line,108}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

Argument #2:

Here's a zip containing the png, wings file, obj, mat, and crash dump
https://drive.google.com/file/d/16dkUg0B...sp=sharing
Thanks for a more detailed steps.
I repeat them and I couldn't get the crash. Which would be strange, if I haven't remembered I made a path for it. Smile

Sorry for not remember before. Please check the Patches/Fixes for Wings3D and apply the ones for your version.
I applied the tar and beam file for 2.2.7 and I'm not seeing any crashes with the files I was having crashes with earlier. Thanks for the help @micheus!
Nice. Thanks for the feedback.