Wings 3D Development Forum
Rotate Region causing crash - 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: Rotate Region causing crash (/showthread.php?tid=2318)



Rotate Region causing crash - micheus - 12-30-2016

Just by selecting a face and applying Rotate->Region I'm getting a crash:

Code:
Internal Error
Version: 2.1.5.42.ga564
Window: geom
Reason: badarith

Stack trace:
[{e3d_mat,rotate,2,[{file,"f:/unixlike/src/wings/e3d/e3d_mat.erl"},{line,98}]},
{wpc_region,rotate,5,
             [{file,"f:/unixlike/src/wings/plugins_src/commands/wpc_region.erl"},
              {line,156}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{wings_drag,motion_update_fun,2,
             [{file,"f:/unixlike/src/wings/src/wings_drag.erl"},{line,1288}]},
{wings_dl,map_1,5,
           [{file,"f:/unixlike/src/wings/src/wings_dl.erl"},{line,268}]},
{wings_drag,motion_update,2,
             [{file,"f:/unixlike/src/wings/src/wings_drag.erl"},{line,1270}]},
{wings_drag,handle_drag_event_2,2,
             [{file,"f:/unixlike/src/wings/src/wings_drag.erl"},{line,741}]},
{wings_drag,do_drag,2,
             [{file,"f:/unixlike/src/wings/src/wings_drag.erl"},{line,471}]},
{wings_wm,handle_event,3,
           [{file,"f:/unixlike/src/wings/src/wings_wm.erl"},{line,952}]},
{wings_wm,send_event,2,
           [{file,"f:/unixlike/src/wings/src/wings_wm.erl"},{line,918}]},
{wings_wm,do_dispatch,2,
           [{file,"f:/unixlike/src/wings/src/wings_wm.erl"},{line,824}]},
{wings_wm,dispatch_event,1,[{file,[...]},{line,...}]},
{wings_wm,get_and_dispatch,0,[{file,...},{...}]},
{wings,init,1,[{...}|...]}]



RE: Rotate Region causing crash - ggaliens - 12-30-2016

I tried to recreate the issue with a simple cube. Couple tries and I failed to get the crash. I was maybe going to look at the code for fun.

Can you share the model or simple setup ?


RE: Rotate Region causing crash - micheus - 12-30-2016

I used a box; selected all the Faces; used Inset [LMB] a couple of times on them; the latest selected face (the most inner) was the one a was trying to rotate.

I already now what is causing the crash. It's strange that the angle parameter is a list. Getting its value fix, but I need to check it better since in cases like yours it works.

Thanks for the test and feedback.


RE: Rotate Region causing crash - Fonte Boa - 12-31-2016

I couldnt reproduce the crash here, Micheus...


RE: Rotate Region causing crash - micheus - 12-31-2016

Very strange that.

I'm using 2.1.5 and get it all the time - even for the single face in a cube like ggaliens reported do not have the problem.
I did the same test with the older 1.5.3 I have installed here at work and it works as expected.

Please do a test for me. make a backup of your wpc_rebion.beam and replace it by this one.
It's under ...\plugins\commands folder.

In this situation, I'm expecting you to get a crash since it fixes my crash. Smile


RE: Rotate Region causing crash - tkbd - 12-31-2016

I replaced the file and ,test.
Then I get a following error message.
(When I did the Region command,get error instantly, I could not dragging selection(s). )
Code:
wings_wm:821: Dropped Event autosaver: redraw
Using GPU shaders.
wpc_region:command/3: bad return value: {'EXIT',
                                         {undef,
                                          [{wings_drag,fold,
                                            [#Fun<wpc_region.3.95522133>,
                                             [angle],
                                             {st,
                                              {1,{1,{we,1,...},nil,nil}},
                                              face,true,
                                              [{1,{...}}],
                                              {0,nil},
                                              none,{...},...}],
                                            []},
                                           {wings_develop,time_command,2,
                                            [{file,"wings_develop.erl"},
                                             {line,73}]},
                                           {wings_plugin,command,3,
                                            [{file,"wings_plugin.erl"},
                                             {line,139}]},
                                           {wings,raw_command_1,3,
                                            [{file,"wings.erl"},{line,624}]},
                                           {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,[...]},{line,...}]},
                                           {wings_wm,dispatch_event,1,
                                            [{file,...},{...}]},
                                           {wings_wm,get_and_dispatch,0,
                                            [{...}|...]},
                                           {wings,init,1,[...]}]}}



RE: Rotate Region causing crash - micheus - 12-31-2016

Thanks tkbd.
I need to figure it out, otherwise I cannot try to add the Magnet option to this command - something I was trying to do when stumble on this crash. Sad


RE: Rotate Region causing crash - tkbd - 12-31-2016

I compared about behavior other rotation commands in the magnet mode.
(I use the no modified region_rotate plugin file in v2.1.5.)
Rotate Normal and Regon behaver there is a similar part.

For example Even when these two commands in magnet mode,not instructed for 2ndary selection for magnet boundary set.
Is it a specification or a bug?

And I found another interesting message in other rotation command.
Quote:Make a cube,and all faces select ,and inset x2
Then did Face mode:Rotate > Free (with Magnet mode (use click + Alt key ))
Quote:Message dialog: Magnet Rotate on multiple face regions reguires an explicit rotate origin.

This message may indicate a special condition in the magnet mode.
I wish it will be a hint to the solution of the problem. Sad

Cheers.


RE: Rotate Region causing crash - micheus - 12-31-2016

Guys, my bad.
I'm working in the Dev version and I didn't noticed the recent changes to wings_drag.erl - t's a work in progress. So, I found a future bug. Biggrin


RE: Rotate Region causing crash - tkbd - 12-31-2016

I see Smile .
I look forward to new features.