Collada: meshes without faces raise an out of index exception #31320

Closed
opened 2012-05-05 12:25:31 +02:00 by Gaia Clary · 10 comments
Member

%%%I attached 2 files:

test_primitive_mesh_circle.dae (created by blender)
circle_from_sketchup.dae (created by sketchup)

Both files can not be imported into blender.
The reason seems to be that the data contains no faces.
proof: as soon as i add a face, the object imports to blender.

I have seen this error in revision 46309 (but it's been around since at least bledner 2.62)

AnimationImporter.cpp: line 807 (Index out of bounds) (revision:46309)

A closer look at the differences between the 2 collada files also shows that sketchup uses a
datablock to specify the edges. While Blender only specifies the vertices.

I guess, the correct way for Blender to handle this is to also export and to recognize as input.%%%

%%%I attached 2 files: test_primitive_mesh_circle.dae (created by blender) circle_from_sketchup.dae (created by sketchup) Both files can not be imported into blender. The reason seems to be that the data contains no faces. proof: as soon as i add a face, the object imports to blender. I have seen this error in revision 46309 (but it's been around since at least bledner 2.62) AnimationImporter.cpp: line 807 (Index out of bounds) (revision:46309) A closer look at the differences between the 2 collada files also shows that sketchup uses a <lines> datablock to specify the edges. While Blender only specifies the vertices. I guess, the correct way for Blender to handle this is to also export <lines> and to recognize <lines> as input.%%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%Gaia, maybe you might look into this? Or re-assign to somebody else from collada team. Thanks :)%%%

%%%Gaia, maybe you might look into this? Or re-assign to somebody else from collada team. Thanks :)%%%
Member

%%%Indeed, lines-geometry isn't supported yet :)%%%

%%%Indeed, lines-geometry isn't supported yet :)%%%
Author
Member

%%%I have the exporter part ready. I am still struggling with the importer part.
I have attached a patch. Maybe this patch can even be committed already
as "work in progress" because it already adds some improvement ?

Current state of exporter:

Seems to work for static meshes.
I tested the exported dae files (simple static meshes with some lose edges) with Blender 2.49. There they import with no problems.

Current state of importer:

It does recognize the LINES tag but it currently does not yet import the edges.
I get a couple of errors during import. The model imports but of course
the edges do not yet show up because i dont read
the LINES section.

I am still trying to understand how to fill the edges in :)
Maybe some hints about how the code actually works would be helpful.

Is it correct that loose edges have no normals ?
Then i know how to get rid of the first warning.

Tips and hints are very welcome! But please let me try to finish this work
before you step in :)

thanks,
Gaia%%%

%%%I have the exporter part ready. I am still struggling with the importer part. I have attached a patch. Maybe this patch can even be committed already as "work in progress" because it already adds some improvement ? Current state of exporter: Seems to work for static meshes. I tested the exported dae files (simple static meshes with some lose edges) with Blender 2.49. There they import with no problems. Current state of importer: It does recognize the LINES tag but it currently does not yet import the edges. I get a couple of errors during import. The model imports but of course the edges do not yet show up because i dont read the LINES section. I am still trying to understand how to fill the edges in :) Maybe some hints about how the code actually works would be helpful. Is it correct that loose edges have no normals ? Then i know how to get rid of the first warning. Tips and hints are very welcome! But please let me try to finish this work before you step in :) thanks, Gaia%%%
Author
Member

%%%So, here is the import export patch for loose edges.
I tested it with static meshes. Please review
and comment. and or check it in if appropriate.

Thanks to everyboy who helped me to get it done :)%%%

%%%So, here is the import export patch for loose edges. I tested it with static meshes. Please review and comment. and or check it in if appropriate. Thanks to everyboy who helped me to get it done :)%%%
Author
Member

%%%Nathan networy has pointed me to a problem with Mingw64 and Collada Export.
In fact any Collada export crashes at the same Collada function;:

prepareToAppendValues()

This function is called from several places in the Exporter and every call crashes
when Blender is compiled with Mingw64. I only can verify that mingw64 builds crash,
while builds with visual c++ 2008 express work with no problems.

So i need some help to pinpoint the cause of this problem.
To reproduce the crash:

  • build with mingw64 (i do not know if mingw32 also crashes, to be tested)
  • start blender
  • Export the default cube: File -> export -> COLLADA (selection only)

Now Blender crashes

Any help is appreciated.
%%%

%%%Nathan networy has pointed me to a problem with Mingw64 and Collada Export. In fact any Collada export crashes at the same Collada function;: prepareToAppendValues() This function is called from several places in the Exporter and every call crashes when Blender is compiled with Mingw64. I only can verify that mingw64 builds crash, while builds with visual c++ 2008 express work with no problems. So i need some help to pinpoint the cause of this problem. To reproduce the crash: - build with mingw64 (i do not know if mingw32 also crashes, to be tested) - start blender - Export the default cube: File -> export -> COLLADA (selection only) Now Blender crashes Any help is appreciated. %%%
Author
Member

%%%oups, excuse me Nathan for misspelling your name.%%%

%%%oups, excuse me Nathan for misspelling your name.%%%
Author
Member

%%%Fixed in svn r46691%%%

%%%Fixed in svn r46691%%%

%%%When you fix a bug Gaia, please close the report. :) %%%

%%%When you fix a bug Gaia, please close the report. :) %%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 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#31320
No description provided.