Invalid Collada file crash blender #43094

Closed
opened 2015-01-01 19:08:04 +01:00 by Jorge Ortega · 17 comments

System Information
Windows 8.1 x64, nvidia quadro 600 and nvidia GTX-660TI

Blender Version
Blender 2.73 testbuild 1 - hash d7e4944

Short description of error
Open Collada file makes Blender close, no error message, no crash, nothing.

Exact steps for others to reproduce the error
Extract the attached zip file. is a DAE file produced with the FBX converter 2013.3. Try to import the file into Blender -> Blender closes with no error message or whatever.

test3.zip

**System Information** Windows 8.1 x64, nvidia quadro 600 and nvidia GTX-660TI **Blender Version** Blender 2.73 testbuild 1 - hash d7e4944 **Short description of error** Open Collada file makes Blender close, no error message, no crash, nothing. **Exact steps for others to reproduce the error** Extract the attached zip file. is a DAE file produced with the FBX converter 2013.3. Try to import the file into Blender -> Blender closes with no error message or whatever. [test3.zip](https://archive.blender.org/developer/F134590/test3.zip)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @jortega

Added subscriber: @jortega
Aaron Carlisle self-assigned this 2015-01-01 21:51:51 +01:00
Aaron Carlisle removed their assignment 2015-01-01 21:52:19 +01:00
Gaia Clary was assigned by Bastien Montagne 2015-01-01 22:01:12 +01:00

Added subscribers: @Blendify, @mont29

Added subscribers: @Blendify, @mont29

@Blendify: Please do not edit reprot that way when you are not sure… Collada is BF-blender, not addon. And you do not need to claim the task to edit those properties, only adds noise.

@jortega: One thing for sure, this collada file I would consider invalid/corrupted (it only contains two vcol values, instead of one per vertex…).

@Gaia: assigning to you in case you have an idea to avoid crash here? tried investigating a bit, but index_list.getIndicesCount() returns the number of vertices, not '2' as I would expect here… Maybe bug is actually in collada framework itself?

@Blendify: Please do not edit reprot that way when you are not sure… Collada is BF-blender, not addon. And you do not need to claim the task to edit those properties, only adds noise. @jortega: One thing for sure, this collada file I would consider invalid/corrupted (it only contains two vcol values, instead of one per vertex…). @Gaia: assigning to you in case you have an idea to avoid crash here? tried investigating a bit, but `index_list.getIndicesCount()` returns the number of vertices, not '2' as I would expect here… Maybe bug is actually in collada framework itself?
Bastien Montagne changed title from Collada file crash blender to Invalid Collada file crash blender 2015-01-01 22:01:43 +01:00
Member

I tried importing the file two time the first time it crashed the 2nd nothing was new in the view port but many new files in the out-liner

I tried importing the file two time the first time it crashed the 2nd nothing was new in the view port but many new files in the out-liner
Member

This could be a memory bug also since the file contains about 700 objects

This could be a memory bug also since the file contains about 700 objects

As said, this is not a memory bug, and not even a bug at all, this is an invalid collada file that only has two vcol values (RGBA tuples) when it should have one per vertex…

Other report with matching FBX file suffered the same issue, btw, but thanks to py we avoid crash and just get an exception. So just keeping open in case Gaia has a simple idea to avoid crash here too.

As said, this is not a memory bug, and not even a bug at all, this is an invalid collada file that only has two vcol values (RGBA tuples) when it should have one per vertex… Other report with matching FBX file suffered the same issue, btw, but thanks to py we avoid crash and just get an exception. So just keeping open in case Gaia has a simple idea to avoid crash here too.
Member

Added subscribers: @GaiaClary, @JulianEisel

Added subscribers: @GaiaClary, @JulianEisel
Member

@GaiaClary, found the time to look into it?

@GaiaClary, found the time to look into it?
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

Closing this for now, for the reasons given by @mont29. If @GaiaClary comes up with an idea on how we could handle this from Blender's side, we can still reopen (although it might be considered as a todo then)

Closing this for now, for the reasons given by @mont29. If @GaiaClary comes up with an idea on how we could handle this from Blender's side, we can still reopen (although it might be considered as a todo then)
Member

This comment was removed by @GaiaClary

*This comment was removed by @GaiaClary*
Member

So the test file contains:

<source id="_ncl1_65-POSITION">...  <!-- 144 entries -->
<source id="_ncl1_65-Normal0">...     <!-- 144 entries -->
<source id="_ncl1_65-VERTEX_COLOR0">...  <!-- 9 entries -->
<vertices id="_ncl1_65-VERTEX">
  <input semantic="POSITION" source="#_ncl1_65-POSITION"/>
  <input semantic="NORMAL" source="#_ncl1_65-Normal0"/>
  <input semantic="COLOR" source="#_ncl1_65-VERTEX_COLOR0"/>
</vertices>
<triangles count="48">
  <input semantic="VERTEX" offset="0" source="#_ncl1_65-VERTEX"/>
  <p> 0 1 2 3 4 5 6 7 ... 139 140 141 142 143</p>
</triangles>

This means the

element only contains one set of indices
for the set "#_ncl1_65-VERTEX". But the source
"#_ncl1_65-VERTEX" contains definitions for:

POSITION, NORMAL and COLOR.

The problem is which index should be used to access the data (source)
of the 3 lists?

Blender (actually OpenCollada) expects that the 3 sources for
POSITION, NORMAL and COLOR contain the same amount
of entries. So each entry in the

list is an index
that can be used for all 3 sources equally.

But there are only 9 entries in the color source.
Hence Blender creates an exception when trying to read
the color array (because we use indices from 0 up to 143 to access it)


when i compare that to the structure of a Dae file that was
created by blender (for the default cube with vertex colors)
then i see some significant differences:

<source id="Cube-mesh-positions"> <!-- 8 entries -->
<source id="Cube-mesh-normals"> <!-- 12 entries -->
<source id="Cube-mesh-colors-Col" name="Col"> <!-- 36 entries -->
<vertices id="Cube-mesh-vertices">
  <input semantic="POSITION" source="#Cube-mesh-positions"/>
</vertices>
<polylist material="Material-material" count="12">
  <input semantic="VERTEX" source="#Cube-mesh-vertices" offset="0"/>
  <input semantic="NORMAL" source="#Cube-mesh-normals" offset="1"/>
  <input semantic="COLOR" source="#Cube-mesh-colors-Col" offset="2" set="0"/>
  <p> ...</p>
  <vcount>...</vcount>  <!-- loopcount per polygon -->
</polylist>

The main difference is that Blender specifies the input sources within the polylist.
this means the

list contains separate indices for VERTEX, NORMAL and COLOR
and now the sources can have different size but we still get correct results because the
index sets are now specific for each source.

So after analyzing all of this i come to the conclusion that the test file is corrupted.
But then it is easy to fix blender. I just need to check if a used index gets out of bounds.

Could someone please approve or correct my assumptions?
thanks.

So the test file contains: ``` <source id="_ncl1_65-POSITION">... <!-- 144 entries --> <source id="_ncl1_65-Normal0">... <!-- 144 entries --> <source id="_ncl1_65-VERTEX_COLOR0">... <!-- 9 entries --> ``` ``` <vertices id="_ncl1_65-VERTEX"> <input semantic="POSITION" source="#_ncl1_65-POSITION"/> <input semantic="NORMAL" source="#_ncl1_65-Normal0"/> <input semantic="COLOR" source="#_ncl1_65-VERTEX_COLOR0"/> </vertices> ``` ``` <triangles count="48"> <input semantic="VERTEX" offset="0" source="#_ncl1_65-VERTEX"/> <p> 0 1 2 3 4 5 6 7 ... 139 140 141 142 143</p> </triangles> ``` This means the <p> element only contains one set of indices for the set "#_ncl1_65-VERTEX". But the source "#_ncl1_65-VERTEX" contains definitions for: ``` POSITION, NORMAL and COLOR. ``` The problem is which index should be used to access the data (source) of the 3 lists? Blender (actually OpenCollada) expects that the 3 sources for POSITION, NORMAL and COLOR contain the same amount of entries. So each entry in the <p> list is an index that can be used for all 3 sources equally. But there are only 9 entries in the color source. Hence Blender creates an exception when trying to read the color array (because we use indices from 0 up to 143 to access it) ---- when i compare that to the structure of a Dae file that was created by blender (for the default cube with vertex colors) then i see some significant differences: ``` <source id="Cube-mesh-positions"> <!-- 8 entries --> <source id="Cube-mesh-normals"> <!-- 12 entries --> <source id="Cube-mesh-colors-Col" name="Col"> <!-- 36 entries --> ``` ``` <vertices id="Cube-mesh-vertices"> <input semantic="POSITION" source="#Cube-mesh-positions"/> </vertices> <polylist material="Material-material" count="12"> <input semantic="VERTEX" source="#Cube-mesh-vertices" offset="0"/> <input semantic="NORMAL" source="#Cube-mesh-normals" offset="1"/> <input semantic="COLOR" source="#Cube-mesh-colors-Col" offset="2" set="0"/> <p> ...</p> <vcount>...</vcount> <!-- loopcount per polygon --> </polylist> ``` The main difference is that Blender specifies the input sources within the polylist. this means the <p> list contains separate indices for VERTEX, NORMAL and COLOR and now the sources can have different size but we still get correct results because the index sets are now specific for each source. So after analyzing all of this i come to the conclusion that the test file is corrupted. But then it is easy to fix blender. I just need to check if a used index gets out of bounds. Could someone please approve or correct my assumptions? thanks.
Member

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

This issue was referenced by 7f25da6509

This issue was referenced by 7f25da650943aa24d7f851552c1a9741b0ba6891
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit 7f25da6509.

Closed by commit 7f25da6509.
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
Interest: X11
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
6 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#43094
No description provided.