bpy_prop_collection internal error #43332

Closed
opened 2015-01-20 17:32:52 +01:00 by tamachan · 26 comments

System Information
Win 8.1 (64 bit)

Blender Version
Broken: Blender 2.7 (32 bit)

Short description of error
80% fail, 20% success.
RuntimeError: bpy_prop_collection[index]: internal error, valid index 2 given 12 sized collection but value not found
Blender\2.73\scripts\addons\vrm.py, line 2611, in _doLighting

  1. install vrm.py to addons.
  2. open untitled.blend (or blender's default scene)
  3. fill output's path in "Vector Rendering Method" panel in Render tab.
  4. press "Render" button in VRM panel.
  5. 80% fail, 20% success.

Exact steps for others to reproduce the error
untitled.blend untitled.blend
vrm.py vrm.py

**System Information** Win 8.1 (64 bit) **Blender Version** Broken: Blender 2.7 (32 bit) **Short description of error** 80% fail, 20% success. RuntimeError: bpy_prop_collection[index]: internal error, valid index 2 given 12 sized collection but value not found Blender\2.73\scripts\addons\vrm.py, line 2611, in _doLighting 1. install vrm.py to addons. 2. open untitled.blend (or blender's default scene) 3. fill output's path in "Vector Rendering Method" panel in Render tab. 4. press "Render" button in VRM panel. 5. 80% fail, 20% success. **Exact steps for others to reproduce the error** untitled.blend [untitled.blend](https://archive.blender.org/developer/F138457/untitled.blend) vrm.py [vrm.py](https://archive.blender.org/developer/F138458/vrm.py)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @tamachan

Added subscriber: @tamachan
Author

If an error doesn't show, please retry from 2.

If an error doesn't show, please retry from 2.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2015-01-20 19:24:22 +01:00

VRM addon is not distributed with blender, please do not report bugs about third party addons here.

VRM addon is not distributed with blender, please do not report bugs about third party addons here.
Author

This bug is an internal error of blender. It isn't the add-on bug.

This bug is an internal error of blender. It isn't the add-on bug.

In this case, please provide a simple, reproducible case that does not depend on the addon. If issue is internal to Blender, it should be easy to reproduce it with a few lines in a mere 'py' textblock.

In this case, please provide a simple, reproducible case that does not depend on the addon. If issue is internal to Blender, it should be easy to reproduce it with a few lines in a mere 'py' textblock.
Author

vrm.py The file which slimmed
This is the bug of the blender's memory manuplation.(I think in a buffer overrun of Blender) So a script won't be any more small. A failure probability went down to 20-30% by slimming of a script.

[vrm.py](https://archive.blender.org/developer/F138536/vrm.py) The file which slimmed This is the bug of the blender's memory manuplation.(I think in a buffer overrun of Blender) So a script won't be any more small. A failure probability went down to 20-30% by slimming of a script.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

Uhhhh… Ok, could reproduce that (on the 17th attempt) on my win7 VM - tried over 30 times on linux with no issue.

Further more, I've had a similar issue with my 'preview object generation' script (asset-experiment branch), where it works perfectly on linux and throws odd absurd errors under WIndows.

I have the feeling there is something fishy going on either with the way our py code is compiled on windows, or (more likely ?) with our pre-compiled py libs for win. After all, we are not using 'official' py compiler here. :|

Uhhhh… Ok, could reproduce that (on the 17th attempt) on my win7 VM - tried over 30 times on linux with no issue. Further more, I've had a similar issue with my 'preview object generation' script (asset-experiment branch), where it works perfectly on linux and throws odd absurd errors under WIndows. I have the feeling there is something fishy going on either with the way our py code is compiled on windows, or (more likely ?) with our pre-compiled py libs for win. After all, we are not using 'official' py compiler here. :|

Added subscribers: @ideasman42, @MartijnBerger

Added subscribers: @ideasman42, @MartijnBerger

Uhhhh… Ok, could reproduce that (on the 17th attempt) on my win7 VM - tried over 30 times on linux with no issue.

Further more, I've had a similar issue with my 'preview object generation' script (asset-experiment branch), where it works perfectly on linux and throws odd absurd errors under WIndows.

I have the feeling there is something fishy going on either with the way our py code is compiled on windows, or (more likely ?) with our pre-compiled py libs for win. After all, we are not using 'official' py compiler here. :|

Uhhhh… Ok, could reproduce that (on the 17th attempt) on my win7 VM - tried over 30 times on linux with no issue. Further more, I've had a similar issue with my 'preview object generation' script (asset-experiment branch), where it works perfectly on linux and throws odd absurd errors under WIndows. I have the feeling there is something fishy going on either with the way our py code is compiled on windows, or (more likely ?) with our pre-compiled py libs for win. After all, we are not using 'official' py compiler here. :|
Bastien Montagne removed their assignment 2015-01-21 14:52:25 +01:00

Added subscriber: @mont29

Added subscriber: @mont29
Member

@mont29 did you reproduce using 2.73a ?

@mont29 did you reproduce using 2.7**3**a ?

@MartijnBerger no, using own build of latest master (with up-to-date svn repo and MSVC2013 express/CMake).

@tamachan which version of blender do you use exactly (please give us also the 'git hash' shown in start popup)?

@MartijnBerger no, using own build of latest master (with up-to-date svn repo and MSVC2013 express/CMake). @tamachan which version of blender do you use exactly (please give us also the 'git hash' shown in start popup)?
Author

git hash: b4d8fb5
date: 2015-01-07 13:17

git hash: b4d8fb5 date: 2015-01-07 13:17
Author

err.py

I debug my debug build by VC2013. ( git f7e8da6f5a5353c20a229e74d768384b5b1e5794 )

err.py@75

      for f in mesh.polygons:
        backface[f.index].value = 1 # !!!!!!!!!!exception here!!!!!!!!!!!
        #rlayer[f.index].value = 2
blender/makesrna/intern/rna_mesh_gen.c@6610

void MeshIntProperty_value_set(PointerRNA *ptr, int value)
{
	MIntProperty *data = (MIntProperty *)(ptr->data);
	data->i = value; // <--- 0xC0000005: Access violation reading location 0xfeeefeee.  ptr->data == 0xfeeefeee
}

http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_debug_values
FEEEFEEE "Fee fee", Used by Microsoft's debug HeapFree() to mark freed heap memory.

[err.py](https://archive.blender.org/developer/F140131/err.py) I debug my debug build by VC2013. ( git f7e8da6f5a5353c20a229e74d768384b5b1e5794 ) ``` err.py@75 for f in mesh.polygons: backface[f.index].value = 1 # !!!!!!!!!!exception here!!!!!!!!!!! #rlayer[f.index].value = 2 ``` ``` blender/makesrna/intern/rna_mesh_gen.c@6610 void MeshIntProperty_value_set(PointerRNA *ptr, int value) { MIntProperty *data = (MIntProperty *)(ptr->data); data->i = value; // <--- 0xC0000005: Access violation reading location 0xfeeefeee. ptr->data == 0xfeeefeee } ``` http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_debug_values FEEEFEEE "Fee fee", Used by Microsoft's debug HeapFree() to mark freed heap memory.
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

@mont29, @MartijnBerger, Wazzup with this one? Any news?

@mont29, @MartijnBerger, Wazzup with this one? Any news?

This issue was referenced by blender/blender@a7855f81d4

This issue was referenced by blender/blender@a7855f81d43c4204f0470dcdee6f2ab5bc3f5e83

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit blender/blender@a7855f81d4.

Closed by commit blender/blender@a7855f81d4.

The access violation is likely caused by layer reallocation. This will fix it.

Unfortunately the RNA API is low-level enough that it wont track re-allocated memory.

    mesh.polygon_layers_int.new("rlayer")
    mesh.polygon_layers_int.new("glayer")
    mesh.polygon_layers_int.new("blayer")
    mesh.polygon_layers_int.new("alayer")
    backface = mesh.polygon_layers_int["backface"].data
    rlayer = mesh.polygon_layers_int["rlayer"].data
    glayer = mesh.polygon_layers_int["glayer"].data
    blayer = mesh.polygon_layers_int["blayer"].data
    alayer = mesh.polygon_layers_int["alayer"].data
The access violation is likely caused by layer reallocation. This will fix it. Unfortunately the RNA API is low-level enough that it wont track re-allocated memory. ``` mesh.polygon_layers_int.new("rlayer") mesh.polygon_layers_int.new("glayer") mesh.polygon_layers_int.new("blayer") mesh.polygon_layers_int.new("alayer") ``` ``` backface = mesh.polygon_layers_int["backface"].data rlayer = mesh.polygon_layers_int["rlayer"].data glayer = mesh.polygon_layers_int["glayer"].data blayer = mesh.polygon_layers_int["blayer"].data alayer = mesh.polygon_layers_int["alayer"].data
Author

I get is still the same error.

RuntimeError: bpy_prop_collection[index]: internal error, valid index 2 given 6 sized collection but value not found

Blender(Daily build x86 win): afa8a0a
Script: F138536

I get is still the same error. > RuntimeError: bpy_prop_collection[index]: internal error, valid index 2 given 6 sized collection but value not found Blender(Daily build x86 win): afa8a0a Script: [F138536](https://archive.blender.org/developer/F138536/vrm.py)

@tamachan, the attached script isnt grouping assignments as noted my my last pose - line 180-187.

@tamachan, the attached script isnt grouping assignments as noted my my last pose - line 180-187.
Author

@ideasman42 Thank you for your help. :)

@ideasman42 Thank you for your help. :)
Sign in to join this conversation.
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-addons#43332
No description provided.