Wings 3D Development Forum
[fixed] Save issues after collapsing a hole. - 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: [fixed] Save issues after collapsing a hole. (/showthread.php?tid=2431)



[fixed] Save issues after collapsing a hole. - ajunkala - 03-06-2017

While working around the lack of a boolean functionality I stumbled upon and issue that can in the best, block saves, and in the worst destroys an earlier save file.

To reproduce:
Create a cube.
*
Select one face
Execute 'Hole' command.
Select the 4 edges of the hole
Execute 'Collapse' command.
Attempt to save.

In this case it just refused to save and gave a wings.dump file. If instead you save an initial version (at the *) and continue through the remaining steps then attempt to save again it gives a different message (suggesting a crash in a hot key, even when choosing menu option) AND will destroy the earlier version of the file saved.

The wings.dump in the no original file case:
Dump written 2017-3-7_9-25
Version: 2.1.5
Window: geom
Reason: function_clause

Short stack trace:
[]

Long stack trace:
[{gb_trees,get_1,[-13,nil],[{file,"gb_trees.erl"},{line,243}]},
{wings_we,'-do_renumber/3-lc$^0/1-0-',2,[{file,"wings_we.erl"},{line,678}]},
{wings_we,do_renumber,3,[{file,"wings_we.erl"},{line,678}]},
{wings_we,renumber,3,[{file,"wings_we.erl"},{line,269}]},
{wings_ff_wings,renumber,5,[{file,"wings_ff_wings.erl"},{line,1309}]},
{wings_ff_wings,export,2,[{file,"wings_ff_wings.erl"},{line,1251}]},
{wings_file,save_now,2,[{file,"wings_file.erl"},{line,430}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,73}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,621}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,952}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,918}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,824}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,725}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,646}]},
{wings,init,1,[{file,"wings.erl"},{line,147}]}]


The terminal log in the previous file case:
wings:650: Error: function_clause [{gb_trees,get_1,
[-149,nil],
[{file,"gb_trees.erl"},{line,243}]},
{wings_we,'-do_renumber/3-lc$^0/1-0-',2,
[{file,"wings_we.erl"},{line,678}]},
{wings_we,do_renumber,3,
[{file,"wings_we.erl"},{line,678}]},
{wings_we,do_renumber,2,
[{file,"wings_we.erl"},{line,643}]},
{wings_we,renumber,2,
[{file,"wings_we.erl"},{line,258}]},
{wings_ff_wings,renumber,5,
[{file,"wings_ff_wings.erl"},
{line,1314}]},
{wings_ff_wings,export,2,
[{file,"wings_ff_wings.erl"},
{line,1251}]},
{wings_file,save_now,2,
[{file,"wings_file.erl"},{line,430}]},
{wings,execute_command,3,
[{file,"wings.erl"},{line,647}]},
{wings_develop,time_command,2,
[{file,"wings_develop.erl"},{line,73}]},
{wings,raw_command,4,
[{file,"wings.erl"},{line,621}]},
{wings_wm,handle_event,3,
[{file,"wings_wm.erl"},{line,952}]},
{wings_wm,send_event,2,
[{file,"wings_wm.erl"},{line,918}]},
{wings_wm,do_dispatch,2,
[{file,"wings_wm.erl"},{line,824}]},
{wings_wm,get_and_dispatch,0,
[{file,"wings_wm.erl"},{line,646}]},
{wings,init,1,
[{file,"wings.erl"},{line,147}]}]


I am using Wings 3D 2.1.5 on Ubuntu 16.04.


RE: Save issues after collapsing a hole. - micheus - 03-06-2017

Thanks for report it. Someone else already did that a couple of weeks. I'm going to upload the fix tomorrow.


RE: Save issues after collapsing a hole. - micheus - 03-07-2017

Here is the file to be replaced: wings_we.beam

p.s.: it must be found in a place like this: C:\Program Files\wings3d_2.1.5\lib\wings-2.1.5\ebin


RE: [fixed] Save issues after collapsing a hole. - ajunkala - 03-08-2017

Hmm... that seem to create a new problem. When I go to create a Cube it throws up an error. Here is the wings.dump

Dump written 2017-3-8_16-19
Version: 2.1.5
Window: geom
Reason: function_clause

Short stack trace:
[]

Long stack trace:
[{wings_we,is_open,
[{we,1,0,"Cube1",
{array,12,100,undefined,
{{{edge,0,1,5,1,3,1,2,4},
{edge,0,2,3,5,6,2,0,5},
{edge,0,4,1,3,8,0,1,9},
{edge,1,3,5,2,5,0,4,7},
{edge,1,5,2,1,10,3,0,8},
{edge,2,3,0,5,7,6,1,3},
{edge,2,6,3,0,9,1,5,11},
{edge,3,7,0,2,11,5,3,10},
{edge,4,5,1,4,4,2,9,10},
{edge,4,6,4,3,11,8,2,6}},
{{edge,5,7,2,4,7,4,8,11},
{edge,6,7,4,0,10,9,6,7},
undefined,undefined,undefined,undefined,undefined,
undefined,undefined,undefined},
10,10,10,10,10,10,10,10,10}},
none,none,
{6,
{3,1,
{1,0,{0,5,nil,nil},{2,3,nil,nil}},
{5,0,{4,8,nil,nil},nil}}},
{0,nil},
{array,8,10,undefined,{0,0,1,3,2,4,6,7,undefined,undefined}},
{array,8,10,undefined,
{{-1.0,-1.0,-1.0},
{-1.0,-1.0,1.0},
{-1.0,1.0,-1.0},
{-1.0,1.0,1.0},
{1.0,-1.0,-1.0},
{1.0,-1.0,1.0},
{1.0,1.0,-1.0},
{1.0,1.0,1.0},
undefined,undefined}},
{1,{wings_shape,no_folder,nil,nil}},
default,12,none,none,[]}],
[{file,"f:/unixlike/src/wings/src/wings_we.erl"},{line,179}]},
{wings_draw,prepare_fun,2,[{file,"wings_draw.erl"},{line,73}]},
{wings_dl,update_1,5,[{file,"wings_dl.erl"},{line,249}]},
{wings_draw,invalidate_dlists,1,[{file,"wings_draw.erl"},{line,54}]},
{wings_draw,refresh_dlists,1,[{file,"wings_draw.erl"},{line,48}]},
{wings,main_loop,1,[{file,"wings.erl"},{line,342}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,952}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,918}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,824}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,725}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,646}]},
{wings,init,1,[{file,"wings.erl"},{line,147}]}]


RE: Save issues after collapsing a hole. - micheus - 03-08-2017

Sorry, my bad. I build the beam using the current work in progress instead of the one tagged as v2.1.5.

The file linked was updated. Please download it again.


RE: [fixed] Save issues after collapsing a hole. - ajunkala - 03-13-2017

Not problem, works now! Thank-you!