Blender 3.0 crashes using load/save with python. #93950

Closed
opened 2021-12-10 21:56:04 +01:00 by Bay Raitt · 11 comments

System Information
Windows 10
GTX 970

Blender Version
Broken: 3.0
Worked: 2.93

Short description of error
using python, loading a template.blend file and saving as a new.blend file will crash blender if a camera is present in the template.blend file.

Exact steps for others to reproduce the error
This crash broke my 2.93 comic toolkit addon. I had to write an addon to reproduce the crash. The addon below will load a template file with just a camera in it and then try to save it to a new file. Blender will crash on save. It has something to do with just the presence of a camera in the loaded template scene.

it's not the camera itself (I've rebuilt the camera from scratch) any camera in the loaded scene will cause the assert.

scratching my head. I included a blank new scene (no camera) that works just fine. to toggle between them just comment/uncomment the crashme.blend and crashmenot.blend lines (or add a camera to a blank scene as save over the crashme.blend)

such an odd bug. If I can figure out why this would crash blender 3.0 I can release my addon.

image.png

I'm curious why the presence of a new camera in the template scene causes the crash....

crashme.zip

**System Information** Windows 10 GTX 970 **Blender Version** Broken: 3.0 Worked: 2.93 **Short description of error** using python, loading a template.blend file and saving as a new.blend file will crash blender if a camera is present in the template.blend file. **Exact steps for others to reproduce the error** This crash broke my 2.93 comic toolkit addon. I had to write an addon to reproduce the crash. The addon below will load a template file with just a camera in it and then try to save it to a new file. Blender will crash on save. It has something to do with just the presence of a camera in the loaded template scene. it's not the camera itself (I've rebuilt the camera from scratch) any camera in the loaded scene will cause the assert. scratching my head. I included a blank new scene (no camera) that works just fine. to toggle between them just comment/uncomment the crashme.blend and crashmenot.blend lines (or add a camera to a blank scene as save over the crashme.blend) such an odd bug. If I can figure out why this would crash blender 3.0 I can release my addon. ![image.png](https://archive.blender.org/developer/F12728281/image.png) I'm curious why the presence of a new camera in the template scene causes the crash.... [crashme.zip](https://archive.blender.org/developer/F12728285/crashme.zip)
Author

Added subscriber: @spiraloid-3

Added subscriber: @spiraloid-3
Bay Raitt changed title from Blener crash using load/save with python. to Blender 3.0 crashes using load/save with python. 2021-12-10 21:56:24 +01:00

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Can you provide exact steps to reproduce the issue?

Can you provide exact steps to reproduce the issue?
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58

Added subscriber: @chemicalcrux

Added subscriber: @chemicalcrux

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

I can reproduce this crash on both the current 3.0 release, as well as on a 3.1 alpha build.

I couldn't use the files to test in 2.93; it complains about an unsupported format. However, if I save the default camera+cube scene over crashme.blend and then run the operator, 2.93 does not crash.

Exact steps:

  1. Install the crashme.zip add-on and enable it
  2. Create C:\Documents, if that folder doesn't already exist (the script errors out otherwise)
  3. Run the "Crash me" operator from the F3 menu
  4. Crash

It triggers an access violation in the release build. In the debug build, it produces the following ASan output:

ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000000000d0 at pc 0x7ff745d20b6f bp 0x001a80ffba00 sp 0x001a80ffba08
READ of size 8 at 0x0000000000d0 thread T0
    #0 0x7ff745d20b6e in BKE_screen_find_big_area D:\blender-git\blender\source\blender\blenkernel\intern\screen.c:947

Full output: P2658

It crashes with open_mainfile too.

Removing the save and then saving manually once the operator finishes is fine.

I can reproduce this crash on both the current 3.0 release, as well as on a 3.1 alpha build. I couldn't use the files to test in 2.93; it complains about an unsupported format. However, if I save the default camera+cube scene over `crashme.blend` and then run the operator, 2.93 does not crash. Exact steps: 1. Install the crashme.zip add-on and enable it 2. Create C:\Documents, if that folder doesn't already exist (the script errors out otherwise) 3. Run the "Crash me" operator from the F3 menu 4. Crash It triggers an access violation in the release build. In the debug build, it produces the following ASan output: ``` ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000000000d0 at pc 0x7ff745d20b6f bp 0x001a80ffba00 sp 0x001a80ffba08 READ of size 8 at 0x0000000000d0 thread T0 #0 0x7ff745d20b6e in BKE_screen_find_big_area D:\blender-git\blender\source\blender\blenkernel\intern\screen.c:947 ``` Full output: [P2658](https://archive.blender.org/developer/P2658.txt) It crashes with `open_mainfile` too. Removing the save and then saving manually once the operator finishes is fine.

I see the cause was already found in #93949, so that's good. I'm confused about how this is different from that issue, though.

I see the cause was already found in #93949, so that's good. I'm confused about how this is different from that issue, though.

It's same issue, so I will merge.

It's same issue, so I will merge.

Closed as duplicate of #93949

Closed as duplicate of #93949
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
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#93950
No description provided.