Obj importer broken #44016

Closed
opened 2015-03-16 18:11:10 +01:00 by mathieu menuet · 27 comments

System Information
Win7 x64

Blender Version
Broken: 2.74 RC1
Worked: 2.73

Short description of error
When importing a mesh, that imports properly in 2.73, it doesn't work on 2.74. Memory usage is much higher than on 2.73 and memory is not released. After failed import, the default scene needs 1.8Gb of memory.

Exact steps for others to reproduce the error
I can't attach the obj as it is a commercial one, maybe on a trustable way, I could deliver it for debugging purpose only.
Here is the log from blender:

Warning Cannot scanfill, fallback on a triangle fan.
Warning Cannot scanfill, fallback on a triangle fan.
...
***User note: the console was filled with it so it happened many times***
...
Warning Cannot scanfill, fallback on a triangle fan.
Warning Cannot scanfill, fallback on a triangle fan.
Traceback (most recent call last):
  File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\__init__.py", line 144, in execute
    return import_obj.load(self, context, **keywords)
  File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\import_obj.py", line 1098, in load
    dataname,
  File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\import_obj.py", line 629, in create_mesh
    edges = [get((verts[vidx1], verts[vidx2])) for vidx1, vidx2 in fgon_edges]
  File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\import_obj.py", line 629, in <listcomp>
    edges = [get((verts[vidx1], verts[vidx2])) for vidx1, vidx2 in fgon_edges]
ValueError: edges.get(...): found the same (BMVert) used multiple times

location: <unknown location>:-1

location: <unknown location>:-1
**System Information** Win7 x64 **Blender Version** Broken: 2.74 RC1 Worked: 2.73 **Short description of error** When importing a mesh, that imports properly in 2.73, it doesn't work on 2.74. Memory usage is much higher than on 2.73 and memory is not released. After failed import, the default scene needs 1.8Gb of memory. **Exact steps for others to reproduce the error** I can't attach the obj as it is a commercial one, maybe on a trustable way, I could deliver it for debugging purpose only. Here is the log from blender: ``` Warning Cannot scanfill, fallback on a triangle fan. Warning Cannot scanfill, fallback on a triangle fan. ... ***User note: the console was filled with it so it happened many times*** ... Warning Cannot scanfill, fallback on a triangle fan. Warning Cannot scanfill, fallback on a triangle fan. Traceback (most recent call last): File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\__init__.py", line 144, in execute return import_obj.load(self, context, **keywords) File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\import_obj.py", line 1098, in load dataname, File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\import_obj.py", line 629, in create_mesh edges = [get((verts[vidx1], verts[vidx2])) for vidx1, vidx2 in fgon_edges] File "D:\blender-2.74-rc1-windows64\2.74\scripts\addons\io_scene_obj\import_obj.py", line 629, in <listcomp> edges = [get((verts[vidx1], verts[vidx2])) for vidx1, vidx2 in fgon_edges] ValueError: edges.get(...): found the same (BMVert) used multiple times location: <unknown location>:-1 location: <unknown location>:-1 ```
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

does this happen with all files?

does this happen with all files?
Aaron Carlisle self-assigned this 2015-03-16 18:18:46 +01:00
Aaron Carlisle removed their assignment 2015-03-16 18:19:15 +01:00
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

@ideasman42 you did some work on this between 2.74 and 2.73 could this be caused by that?

@ideasman42 you did some work on this between 2.74 and 2.73 could this be caused by that?
Campbell Barton was assigned by Aaron Carlisle 2015-03-16 18:25:02 +01:00
Author

no but with many of them.

no but with many of them.
Author

Bastien did the work on the new obj importer I think.

Bastien did the work on the new obj importer I think.
Member

ones with alot of geometry?

ones with alot of geometry?
Campbell Barton was unassigned by Aaron Carlisle 2015-03-16 18:27:11 +01:00
Bastien Montagne was assigned by Aaron Carlisle 2015-03-16 18:27:11 +01:00
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

sorry miss read the commit re assigning to @mont29

sorry miss read the commit re assigning to @mont29
Member

does it crash mostly with files with alot of geometry?

does it crash mostly with files with alot of geometry?

As usual, please attach here (or on googledocs/dropbox/whatever) a file to reproduce the issue.

As usual, please attach here (or on googledocs/dropbox/whatever) a file to reproduce the issue.
Author

I really tried to find another file which I'm allowed to upload on a public website, no luck. So we will just keep a copy of 2.73a until someone find a file that can be made public.

I really tried to find another file which I'm allowed to upload on a public website, no luck. So we will just keep a copy of 2.73a until someone find a file that can be made public.

You can also send me a private link to my mail (montagne29 at/chez wanadoo.fr)…

You can also send me a private link to my mail (montagne29 at/chez wanadoo.fr)…
Author

Just a sidenote, it maybe nice to provide safe ways of transmitting sensible datas if you really want Blender to be used in studios and want studios to report bugs. Most studios don't own their own work when working for clients.

Just a sidenote, it maybe nice to provide safe ways of transmitting sensible datas if you really want Blender to be used in studios and want studios to report bugs. Most studios don't own their own work when working for clients.
Author

did you receive an Email?

did you receive an Email?

Yes, got the mail, thanks :)

Yes, got the mail, thanks :)
Author

No problem, was not happy with the lawyer part, but we have to...

No problem, was not happy with the lawyer part, but we have to...

Ok, that mesh is actually full of invalid data (edges using the same vertex, and so on). Literally thousands of such!

Will try to make new code more robust to that, but really… which app exports that crap?

Note excess mem after import is precisely due to the 'addon crash', which precisely seems to prevent python from releasing his 'working' mem…

As for mem usage, it’s not that much higher than 2.73 - a bit more in this specific case, due to utterly broken .obj, but typically new code is way faster and lighter than previous version (memory increasing is also partly due to the fact we are now reading normals in obj files, if present).

Ok, that mesh is actually full of invalid data (edges using the same vertex, and so on). Literally thousands of such! Will try to make new code more robust to that, but really… which app exports that crap? Note excess mem after import is precisely due to the 'addon crash', which precisely seems to prevent python from releasing his 'working' mem… As for mem usage, it’s not that much higher than 2.73 - a bit more in this specific case, due to utterly broken .obj, but typically new code is way faster and lighter than previous version (memory increasing is also partly due to the fact we are now reading normals in obj files, if present).
Author

Thanks Bastien,

One of the most used 3D package, 3DSmax exports that... no comment, but it's not funny for the artists either.

Thanks Bastien, One of the most used 3D package, 3DSmax exports that... no comment, but it's not funny for the artists either.

Yeah… reminds me of a well known format starting by F and ending by X… :P

Anyway, fixed in master. :)

Yeah… reminds me of a well known format starting by F and ending by X… :P Anyway, fixed in master. :)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

grrr, typo in commit message, so fixed in 2f35b08beb.

grrr, typo in commit message, so fixed in 2f35b08beb.
Author

after comparing the 2.73 version and the 2.74, the new version is missing 1 vertex, 2 edges, 1 face and 2 triangles. It's really not a problem on the model I sended you, but could be a big problem on a character for example.
By the way, to test which version was correct, I compared with the original and the obj imported in Accutrans3D. The original has 518579 vertecies (511869 in Blender), 852490 Edges (842297 in Blender), 381638 Faces (376551 in Blender), 750470 Triangles (745382 in Blender). You can compare it with Accutrans which reports the same numbers as in the original.

after comparing the 2.73 version and the 2.74, the new version is missing 1 vertex, 2 edges, 1 face and 2 triangles. It's really not a problem on the model I sended you, but could be a big problem on a character for example. By the way, to test which version was correct, I compared with the original and the obj imported in Accutrans3D. The original has 518579 vertecies (511869 in Blender), 852490 Edges (842297 in Blender), 381638 Faces (376551 in Blender), 750470 Triangles (745382 in Blender). You can compare it with Accutrans which reports the same numbers as in the original.

Yes, but I do not really care here, you cannot expect us to support 100% of such broken mess. We can only try to avoid py crash here, that’s all (Blender 2.73 also removed some geometry, maybe not exactly the same thing, but that's because of changes in tessellation algo).

Yes, but I do not really care here, you cannot expect us to support 100% of such broken mess. We can only try to avoid py crash here, that’s all (Blender 2.73 also removed some geometry, maybe not exactly the same thing, but that's because of changes in tessellation algo).
Author

ok, thank you for your fix.

ok, thank you for your fix.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#44016
No description provided.