Wings 3D Development Forum
[fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - 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] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 (/showthread.php?tid=2321)

Pages: 1 2


[fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - tkbd - 12-31-2016

This problem is related to compatibility between multiple formats and other 3D Applications.
I focused to the problem to find the minimum necessary fix.
Also chose four 3d DATA formats: dae, obj, 3ds, stl. (Because Blender can export these format.)

The conclusion for this problem solve on Wings3D is narrowed down to two.
  • The first one,in obj import, need fix mojibake of utf8 string in obj format import.
  • The second,in stl and dae import,need prevents crash for during Import.

The following is the findings I did.
At first I exported data(obj , 3ds , dae and stl) by Blender.
(Because Blender can treat UTF8 chrcode in DATA strings)
These data including utf8 character string in material and object name etc.

Then for confirm and comparation, I have imported these files(obj , 3ds , dae and stl) with Wings 3D, Cheetah 3D and Blender.

In Wings3D
Obj and 3ds got mojibake, but I was able to import 3D data.
But in both the case of dae and stl crashed.


In Obj file format,Blender and Cheetah 3D correctly imported the file that contains UTF8 string.
In 3ds file format,Import will succeed.But all 3D software can't indicate name properly.
In dae(Collada) file format only OK at Blender.(Cheetah3D not support .dae).
In Stl file format,Blender and Cheetah 3D, it seems that it has been forcibly renamed to a safe name.

See a following images.
[Image: th_utf8_data_test3_zpsfdw7cqb0.png]

[Image: th_utf8_data_test1_zpssubkkywi.png]

[Image: th_utf8_data_test2_zpsoqubxn6x.png]


And Error logs are here(3ds,Collada(dae) and Stl).

3ds case:
47,85,115,101,114,115,47 means "/Users/"

Code:
wings_wm:821: Dropped Event autosaver: redraw
Using GPU shaders.
badarg
[{io,format,
     [<0.60.0>,"Failed to load \"~s\": ~s\n",
      [[47,85,115,101,114,115,47|...],"unknown POSIX error"]],
     []},
{wings_material,load_map_1,2,[{file,"wings_material.erl"},{line,384}]},
{wings_material,load_map,2,[{file,"wings_material.erl"},{line,366}]},
{wings_material,load_maps,2,[{file,"wings_material.erl"},{line,342}]},
{wings_material,add_materials_1,4,[{file,"wings_material.erl"},{line,294}]},
{wings_import,translate_objects,7,[{file,"wings_import.erl"},{line,43}]},
{wings_import,import,2,[{file,"wings_import.erl"},{line,31}]},
{wpa,'-import/3-fun-0-',3,[{file,"wpa.erl"},{line,118}]},
{wings_file,'-import_filename_1/2-fun-0-',3,
             [{file,"wings_file.erl"},{line,67}]},
{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,[...]},{line,...}]},
{wings,raw_command,4,[{file,...},{...}]},
{wings_wm,handle_event,3,[{...}|...]},
{wings_wm,send_event,2,[...]},
{wings_wm,do_dispatch,2,...},
{wings_wm,dispatch_event,...},
{wings_wm,...},
{...}]


Collada case:
12510,12486,12522,12450,12523 means "マテリアル"
Code:
Version: 2.1.5
Window: geom
Reason: function_clause

Stack trace:
[{wings,command_1,
     [{'EXIT',
          {badarg,
              [{erlang,list_to_atom,[[12510,12486,12522,12450,12523]],[]},
               {collada_import,make_material,3,
                   [{file,"collada_import.erl"},{line,703}]},
               {collada_import,'-make_materials/1-lc$^0/1-0-',3,
                   [{file,[...]},{line,...}]},
               {collada_import,make_file,1,[{file,...},{...}]},
               {collada_import,import,1,[{...}|...]},
               {wpa,do_import,3,[...]},
               {wpa,'-import/3-fun-0-',3,...},
               {wings_file,'-import_filename_1/2-fun-0-',...},
               {wings_develop,...},
               {...}|...]}},
      {st,{1,{1,{we,1,0,"???",{array,18,...},{array,...},{...},...},nil,nil}},
          face,true,[],
          {0,nil},
          none,
          {2,{default,[{...}|...],{...},...}},
          [],undefined,false,2,none,...}],
     [{file,"wings.erl"},{line,737}]},
{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}]}]


stl case:
Code:
+---------------------------------------------------------------+
Internal Error
Version: 2.1.5
Window: geom
Reason: function_clause

Stack trace:
[{wings,command_1,
        [{'EXIT',{badarg,[{io,format,[<0.60.0>,"| ~s |\n",[[70,105|...]]],[]},
                          {wpc_stl,print_boxed,1,
                                   [{file,"wpc_stl.erl"},{line,162}]},
                          {wpc_stl,stl_import,1,[{file,[...]},{line,...}]},
                          {wpa,do_import,3,[{file,...},{...}]},
                          {wpa,'-import/3-fun-0-',3,[{...}|...]},
                          {wings_file,'-import_filename_1/2-fun-0-',3,[...]},
                          {wings_develop,time_command,2,...},
                          {wings_plugin,command,...},
                          {wings,...},
                          {...}|...]}},
         {st,{0,nil},
             face,true,[],
             {0,nil},
             none,
             {1,{default,[{...}|...],nil,...}},
             [],undefined,true,1,none,...}],
        [{file,"wings.erl"},{line,737}]},
{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}]}]



RE: (UTF8 DATA Import)Crashed or Mojibaked when import with an data name that contain UTF - dgud - 12-31-2016

Thanks for your thorough tests, Tkdb.

Can you posts the exported models somewhere so we can test the fixes?

The other bugs I think can test myself.


RE: (UTF8 DATA Import)Crashed or Mojibaked when import with an data name - tkbd - 12-31-2016

dgud,OK,I uploaded the data to a following URL.
http://brace.client.jp/wings3d_141/file2.html
utf8_test_files.zip
(I made a cushion page,because we can't DL file with the direct linkSad)

There archive has dae,stl,3ds,mtl,obj,mtl and some imagefiles
It also contains wings and blend files.


RE: Crashed or Mojibaked when import with an data name that contain UTF - micheus - 01-31-2017

Fixed crashes for "3ds case", "Collada case" and "stl case". FixesImpUTF8.zip (includes the fix for Image Viewer too)

(UTF8 DATA Export)Crashed when export with an data name that contain UTF8:
In case of export to these formats it's possible to still get some crashing during file writing process. I couldn't find a way to prevent it for .dae files, for instance.


RE: [fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - tkbd - 01-31-2017

Micheus,thanks for files. I installed all them in Wings3D v2.1.5 and tested it immediately.
It seems that STL import and ImageView are fixed.
I got an object which named "STL Object" Smile

But others,when an image generateed by AutoUV for UTF8 name object,when change Material bame, obj and collada input/output these will crash when trying test file.
I think that location of installed files are should be correct.

Tried Import wings case:
Code:
Dump written 2017-1-31_20-3
Version: 2.1.5
Window: geom
Reason: function_clause

Short stack trace:
[]

Long stack trace:
[{wings_we,update_id_bounds,
           [{we,5,0,"Cylinder5",
                {array,48,100,undefined,
                       {{{edge,0,1,17,0,4,2,1,3},
                         {edge,0,15,0,2,29,0,2,31},
                         {edge,0,16,2,17,33,1,0,32},
                         {edge,1,2,16,0,6,4,0,5},
                         {edge,1,17,17,16,32,0,3,34},
                         {edge,2,3,15,0,8,6,3,7},
                         {edge,2,18,16,15,34,3,5,35},
                         {edge,3,4,14,0,10,8,5,9},
                         {edge,3,19,15,14,35,5,7,36},
                         {edge,4,5,13,0,12,10,7,11}},
                        {{edge,4,20,14,13,36,7,9,37},
                         {edge,5,6,12,0,14,12,9,13},
                         {edge,5,21,13,12,37,9,11,38},
                         {edge,6,7,11,0,16,14,11,15},
                         {edge,6,22,12,11,38,11,13,39},
                         {edge,7,8,10,0,18,16,13,17},
                         {edge,7,23,11,10,39,13,15,40},
                         {edge,8,9,9,0,20,18,15,19},
                         {edge,8,24,10,9,40,15,17,41},
                         {edge,9,10,8,0,22,20,17,21}},
                        {{edge,9,25,9,8,41,17,19,42},
                         {edge,10,11,7,0,24,22,19,23},
                         {edge,10,26,8,7,42,19,21,43},
                         {edge,11,12,6,0,26,24,21,25},
                         {edge,11,27,7,6,43,21,23,44},
                         {edge,12,13,5,0,28,26,23,27},
                         {edge,12,28,6,5,44,23,25,45},
                         {edge,13,14,4,0,30,28,25,29},
                         {edge,13,29,5,4,45,25,27,46},
                         {edge,14,15,3,0,31,30,27,1}},
                        {{edge,14,30,4,3,46,27,29,47},
                         {edge,15,31,3,2,47,29,1,33},
                         {edge,16,17,1,17,34,33,2,4},
                         {edge,16,31,2,1,31,2,32,47},
                         {edge,17,18,1,16,35,32,4,6},
                         {edge,18,19,1,15,36,34,6,8},
                         {edge,19,20,1,14,37,35,8,10},
                         {edge,20,21,1,13,38,36,10,12},
                         {edge,21,22,1,12,39,37,12,14},
                         {edge,22,23,1,11,40,38,14,16}},
                        {{edge,23,24,1,10,41,39,16,18},
                         {edge,24,25,1,9,42,40,18,20},
                         {edge,25,26,1,8,43,41,20,22},
                         {edge,26,27,1,7,44,42,22,24},
                         {edge,27,28,1,6,45,43,24,26},
                         {edge,28,29,1,5,46,44,26,28},
                         {edge,29,30,1,4,47,45,28,30},
                         {edge,30,31,1,3,33,46,30,31},
                         undefined,undefined},
                        10,10,10,10,10,10}},
                none,none,undefined,
                {0,nil},
                undefined,
                {array,32,100,undefined,
                       {{{-3.4300012361829575,3.5978341532733245,
                          -10.231035707231984},
                         {-3.5061217036716714,3.5978341532733245,
                          -9.848352274866896},
                         {-3.7228944549964114,3.5978341532733245,
                          -9.523928926045437},
                         {-4.047317803817868,3.5978341532733245,
                          -9.307156174720697},
                         {-4.4300012361829575,3.5978341532733245,
                          -9.231035707231984},
                         {-4.812684668548047,3.5978341532733245,
                          -9.307156174720697},
                         {-5.137108017369505,3.5978341532733245,
                          -9.523928926045437},
                         {-5.353880768694245,3.5978341532733245,
                          -9.848352274866896},
                         {-5.4300012361829575,3.5978341532733245,
                          -10.231035707231984},
                         {-5.353880768694245,3.5978341532733245,
                          -10.613719139597075}},
                        {{-5.137108017369505,3.5978341532733245,
                          -10.93814248841853},
                         {-4.812684668548049,3.5978341532733245,
                          -11.15491523974327},
                         {-4.4300012361829575,3.5978341532733245,
                          -11.231035707231984},
                         {-4.047317803817868,3.5978341532733245,
                          -11.15491523974327},
                         {-3.7228944549964114,3.5978341532733245,
                          -10.938142488418533},
                         {-3.5061217036716714,3.5978341532733245,
                          -10.613719139597075},
                         {-3.4300012361829575,1.597834153273325,
                          -10.231035707231984},
                         {-3.5061217036716714,1.597834153273325,
                          -9.848352274866896},
                         {-3.7228944549964114,1.597834153273325,
                          -9.523928926045437},
                         {-4.047317803817868,1.597834153273325,
                          -9.307156174720697}},
                        {{-4.4300012361829575,1.597834153273325,
                          -9.231035707231984},
                         {-4.812684668548047,1.597834153273325,
                          -9.307156174720697},
                         {-5.137108017369505,1.597834153273325,
                          -9.523928926045437},
                         {-5.353880768694245,1.597834153273325,
                          -9.848352274866896},
                         {-5.4300012361829575,1.597834153273325,
                          -10.231035707231984},
                         {-5.353880768694245,1.597834153273325,
                          -10.613719139597075},
                         {-5.137108017369505,1.597834153273325,
                          -10.93814248841853},
                         {-4.812684668548049,1.597834153273325,
                          -11.15491523974327},
                         {-4.4300012361829575,1.597834153273325,
                          -11.231035707231984},
                         {-4.047317803817868,1.597834153273325,
                          -11.15491523974327}},
                        {{-3.7228944549964114,1.597834153273325,
                          -10.938142488418533},
                         {-3.5061217036716714,1.597834153273325,
                          -10.613719139597075},
                         undefined,undefined,undefined,undefined,undefined,
                         undefined,undefined,undefined},
                        10,10,10,10,10,10,10}},
                {1,{wings_shape,[12390,12377,12392],nil,nil}},
                default,0,none,none,[],[]}],
           [{file,"wings_we.erl"},{line,783}]},
{wings_ff_wings,share_list_2,3,
                 [{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
                  {line,1008}]},
{wings_ff_wings,import_objects,5,
                 [{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
                  {line,753}]},
{wings_ff_wings,import_objects,3,
                 [{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
                  {line,721}]},
{wings_ff_wings,import,2,
                 [{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
                  {line,28}]},
{wings_file,'-confirmed_open/2-fun-0-',3,
             [{file,"wings_file.erl"},{line,348}]},
{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}]}]


Tried Import Collada case:
Code:
Dump written 2017-1-31_19-34
Version: 2.1.5
Window: geom
Reason: function_clause

Short stack trace:
[]

Long stack trace:
[{wings,command_1,
     [{'EXIT',
          {badarg,
              [{erlang,list_to_atom,[[12510,12486,12522,12450,12523]],[]},
               {collada_import,make_material,3,
                   [{file,"collada_import.erl"},{line,703}]},
               {collada_import,'-make_materials/1-lc$^0/1-0-',3,
                   [{file,"collada_import.erl"},{line,681}]},
               {collada_import,make_file,1,
                   [{file,"collada_import.erl"},{line,733}]},
               {collada_import,import,1,
                   [{file,"collada_import.erl"},{line,43}]},
               {wpa,do_import,3,[{file,"wpa.erl"},{line,129}]},
               {wpa,'-import/3-fun-0-',3,[{file,"wpa.erl"},{line,118}]},
               {wings_file,'-import_filename_1/2-fun-0-',3,
                   [{file,"wings_file.erl"},{line,67}]},
               {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,"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}]}]}},
      {st,{0,nil},
          face,true,[],
          {0,nil},
          none,
          {1,
           {default,
               [{maps,[]},
                {opengl,
                    [{ambient,{1.0,1.0,1.0,1.0}},
                     {diffuse,{1.0,1.0,1.0,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_atom,[[12510,12486,12522,12450,12523]],[]},
                   {collada_import,make_material,3,
                       [{file,"collada_import.erl"},{line,703}]},
                   {collada_import,'-make_materials/1-lc$^0/1-0-',3,
                       [{file,"collada_import.erl"},{line,681}]},
                   {collada_import,make_file,1,
                       [{file,"collada_import.erl"},{line,733}]},
                   {collada_import,import,1,
                       [{file,"collada_import.erl"},{line,43}]},
                   {wpa,do_import,3,[{file,"wpa.erl"},{line,129}]},
                   {wpa,'-import/3-fun-0-',3,[{file,"wpa.erl"},{line,118}]},
                   {wings_file,'-import_filename_1/2-fun-0-',3,
                       [{file,"wings_file.erl"},{line,67}]},
                   {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,"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}]}]}},
          {[],[]},
          true,[]}],
     [{file,"wings.erl"},{line,737}]},
{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}]}]

Tried to Rename Material(to UTF8 name)
Code:
Internal Error
Version: 2.1.5
Window: geom
Reason: badarg

Stack trace:
[{erlang,list_to_atom,[[12414,12390,12426,12354,12427]],[]},
{wings_material,rename_1,3,
                 [{file,"f:/unixlike/src/wings/src/wings_material.erl"},
                  {line,141}]},
{wings_dialog,return_result,3,[{file,"wings_dialog.erl"},{line,742}]},
{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}]}]


AutoUV
Code:
Dump written 2017-1-31_19-43
Version: 2.1.5
Window: {autouv,{segment,1}}
Reason: badarg

Short stack trace:
[]

Long stack trace:
[{erlang,list_to_atom,[[12354,12354,95,97,117,118]],[]},
{wpc_autouv,init_show_maps,4,[{file,"wpc_autouv.erl"},{line,177}]},
{auv_seg_ui,seg_map_charts_1,7,[{file,"auv_seg_ui.erl"},{line,394}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,951}]},
{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}]}]


*** Current test progress ***
Code:
Preview for UTF8 image file name :OK
Generate image/material has UTF8 name by AutoUV  : Crash
Reneme Material to UTF8 name :Crash
Import/Export UTF8 file name:
    Import       Export
stl:    OK     Test not yet.
obj:   Crash  Test not yet.
dae:   Crash  Test not yet.
wings: Crush  Test not yet.

Anyway,I will continue testing Smile


RE: [fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - micheus - 02-01-2017

As most of the other UTF8 bugs you reported, every time you read "list_to_atom" in the bug report that error I cannot fix. We need to wait by dgud.

As it's in the Erlang documentation, by now, "atoms are restricted to the same ISO Latin-1 range".


RE: [fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - tkbd - 02-01-2017

I see.
Certainly,it is inescapable from the limited of Erlang specification.


RE: [fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - tkbd - 02-01-2017

Hum...,side effect is occurring.
In Wings which replaced your test plugin files.

I put into "ebin" folder:
wings_ff_wings.beam
wings_image_viewer.beam
wings_material.beam

and put Into "plugin/import_export":
wpc_collada.beam
wpc_stl.beam


When loading a simple wings file saved before, a crash log is output.
Only Latin charactors are used in a data in this file.

Apparently wings_ff_wings.beam seems to be involved.
Crash Log is here.
Quote:Internal Error
Version: 2.1.5
Window: geom
Reason: function_clause

Stack trace:
[{wings_we,update_id_bounds,
[{we,1,0,"Cube1",
{array,12,100,undefined,
{{{edge,0,...},{edge,...},{...},...},
{{edge,...},{...},...},
10,10,...}},
none,none,undefined,
{0,nil},
undefined,
{array,8,10,...},
{1,{...}},
default,0,...}],
[{file,"wings_we.erl"},{line,783}]},
{wings_ff_wings,share_list_2,3,
[{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
{line,1008}]},
{wings_ff_wings,import_objects,5,
[{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
{line,753}]},
{wings_ff_wings,import_objects,3,
[{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
{line,721}]},
{wings_ff_wings,import,2,
[{file,"f:/unixlike/src/wings/src/wings_ff_wings.erl"},
{line,28}]},
{wings_file,'-confirmed_open/2-fun-0-',3,
[{file,"wings_file.erl"},{line,348}]},
{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,[...]},{line,...}]},
{wings_wm,get_and_dispatch,0,[{file,...},{...}]},
{wings,init,1,[{...}|...]}]

Is this crash related to atom limitation? Or is it a simple bug?
If it is related to the limitation, I won't deepen about it. Smile


RE: [fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - micheus - 02-01-2017

(02-01-2017, 10:17 PM)tkbd Wrote: Is this crash related to atom limitation? Or is it a simple bug?
If it is related to the limitation, I won't deepen about it. Smile
Thanks for report this. Was it working without the replaced files, right?

I don't have time to check this until Sunday, so I'm going do delay a little to answer your question. Smile


RE: [fixed] (UTF8 DATA Import)Crashed when import with an data name that contain UTF8 - tkbd - 02-04-2017

Micheus Wrote:Was it working without the replaced files, right?
Yes it was,I tried.
and only replacing wings_ff.beam with the previous file,then Wings3D works fine.
So,I'm currently use material name without UTF8 string for test.

By the way, I found something new about Wings3d collada import.
In Blender doesn't bind a texture file to Collada data unless mapping type is UV.
Previous time,didn't notice it....I'm sorry.

Also,Blender possibly output collada texture file name by percent-encoding when Non Latin(UTF8 ) image file name using.
(Strangely, except for that part, Blender had been successfully encoded all UTF8 strings for collada export.)

For example a part in a collada file that export by Blender
%E7%94%BB%E5%83%8F is a coded string of 画像
Quote: <library_images>
<image id="画像_png" name="画像_png">
<init_from>%E7%94%BB%E5%83%8F.png</init_from>
</image>
</library_images>

About percent-encoding,see a following URL
https://en.wikipedia.org/wiki/Percent-encoding

Wings3D Log when Collada file importing.
Quote:Failed to load "/Users/***/utf8_test_files/%E7%94%BB%E5%83%8F.png": unknown POSIX error

Solving to file name encoding should be also useful in importing other file formats maybe. Smile