Regression: Crash when executing a certain python script #107168
Labels
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107168
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: AMD Radeon HD 7560D ATI Technologies Inc. 4.5.13399 Core Profile Context 15.200.1062.1004
Blender Version
Broken: version: 3.6
Worked: (3.4.1)
Caused by
6c774feba2
Short description of error
Blender closes when executing a certain python script
Exact steps for others to reproduce the error
run the following script in the text editor:
Hi, thanks for the report. Crash indeed happens in 3.5 build.
But debug build did not result in crash. Instead returns python error:
Can you share crash.txt file?:
C:\Users\Pavel\AppData\Local\Temp\blender.crash.txt
@PratikPB2123 I removed this line of code and blender still closes.
And I don't understand why there are only 'Linear' and 'sRGB' among the options.
Here is the setting:
@PratikPB2123 blender.crash.txt:
Ah, ignore the python traceback then. Results were taken from the lite build
crash.txt doesn't contain any info. Though there is python backtrace of add-on. Issue might be related to add-on.
What error did you get in event viewer after the crash?
what is an eventviewer? eventvwr.msc? There are no blender errors in eventvwr.msc.
blender closes when i call the function mesh.from_pydata(verts, (), faces):
29adfaffa0/io_scene_xray/formats/ogf/imp/lod.py (L78)
But blender 3.4.1 does not have this error. I have imported the same files.
Here are the vertices and polygons that are causing blender to close:
If I remove the faces, blender won't close.
@Pavel_Blend : does this (modified from the shipping template) Addon also cause crashes for you?
It uses the same verts and faces and seems to have no issues here (also mesh.validate() seems to be fine)
-- it does have double faces though (not sure this is intended?)
@lichtwerk script from 107168.blend works without errors. The object is created.
In a mesh, polygons have normals that point in opposite directions. And polygons are built on vertices that have the same coordinates. But technically, these polygons are not double because they have different vertex indices. This is by design so that the object is not transparent when the Backface Culling mode is enabled.
So it does not seem to be that specific geo, can you isolate more which python call(s) cause the crash?
I imported another file and the error appeared elsewhere in the code:
https://drive.google.com/file/d/1toZ70GcRbQTfd6yarCHyKIzggbdQn5aj/view?usp=sharing
Now the closure happens on the bpy.data.objects.new function.
Because blender closes and doesn't print the error details, I can't figure out what's causing the crash. Every time it crashes in different places of the addon.
Here is the crash file:
@lichtwerk I managed to make a small example which causes a crash:
The problem is related to vertex colors.
This one does not crash in 3.6, right?
There were many backports for 3.5.1, can also check if it still crashes with all those backports in...
@lichtwerk 3.5.1 crashes.
3.6.0 sometimes crashes and does not work correctly. Vertices have no color.
Works here if I create the color after
from_pydata
@lichtwerk probably the problem is elsewhere.
I imported this file in 3.6.0 and blender crashed:
https://drive.google.com/file/d/1toZ70GcRbQTfd6yarCHyKIzggbdQn5aj/view?usp=sharing
I would really appreciate if we can pintpoint this down without having to use whole Addon
@lichtwerk I don't know what is causing the crash so I can't create a short example.
From the files blender.crash.txt, blender_debug_output.txt, blender_system_info.txt can you determine where to look for the error?
When I remove the code that creates the vertex colors the error goes away. But when I created the short example using vertex colors the error didn't appear.
I can't reproduce the error without the addon.
Have you tried swapping the order of vertex color creation and me.from_pydata in your Addon as well?
@lichtwerk in the addon without edits everything was already correct. I made this mistake by accident in a short example.
@lichtwerk I was able to create a small example that reproduces the error:
No crash for me in todays 3.6 or 3.5.1 builds...
@PratikPB2123 : yould you re-check if you can now repro in a debug build?
@lichtwerk , can still confirm the crash in today's 3.6 buildbot build (but looks different than the original report) :
@lichtwerk I have an error in two builds:
@PratikPB2123 : should we confirm it then?
(will update the report description to only use the minimal script that causes the crash)
@lichtwerk , I'm not very confident about confirming this.
Initially crash was in the tbb module and now its occurring in
CurveMapPoint_location_set
function.Also: this report involves python script plus different extension file. Its not clear to me at least whether python script is faulty or a function in blender is responsible for the crash.
This was not crashing earlier so maybe we could find the cause from the commit history.
What do you mean by "different extension file"?
.level
I mean.@PratikPB2123 : can you repro with the current repro steps (just that small python script, nothing else)?
In 3.6, yes. (no crash in 3.5)
I'd rather close this and open a new report for the current crash.
tbbmalloc.dll EXCEPTION_ACCESS_VIOLATION 0x00007FFD9CDD832Ato Crash when executing a certain python scriptUpdated the title to match with description, confirming.
I added some assertions of the value of
as_pointer()
into the latest script and have created a simplified script showing what appears to be the issue. I'm on Windows 10 and get the same results in 3.5.1 and 3.6.0a 2023-05-010652945dbda7
for all scripts in this comment.Example prints in the console:
Getting "Col 1" from
uv.name
shouldn't be happening, anduv.as_pointer()
should not equalcol_1.as_pointer()
If you add two uv layers,
uv.name
erroneously gives "Col 1" anduv2.name
erroneously gives "UV":The issue can also be reproduced by using the attributes API directly:
Thx digging deeper @Mysteryem ! Thx to that I can say that the Assert was introduced with
6c774feba2
(assume the same is true for the crash)Indeed, I do believen #107500 has the same roots.
CC @Baardaap
CC @HooglyBoogly
Crash when executing a certain python scriptto Regression: Crash when executing a certain python scriptThis looks like a duplicate of #107500
After looking into it some more I'm fairly certain this is indeed a duplicate of #107500 , so I close this one.