4.1 Crashes when loading 4.0 settings. #119931
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119931
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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: Macbook
Graphics card: M3 Max
Blender Version
Broken: (4.1)
Worked: (4.0.2)
Short description of error
When I load my 4.0 settings into 4.1 on start up Blender crashes.
Exact steps for others to reproduce the error.
I just download Blender 4.1 and click on load 4.0 settings
Notes from later comments:
The issue is caused by the addon RBD Lab. When enabling it in 4.1, Blender will crash (And it was installed and enabled in 4.0.2, so it gets installed and enabled as the settings are imported into 4.1). This issue probably isn't limited to this add-on, but it this add-on is impacted.
The crash log from Blender is:
Alaska found that the issue occurs on at least ARM macOS and x86 Linux when importing the RBD Lab addon. The issue occurs when trying to load a
.so
file compiled with Python 3.10 that comes bundled with the add-on. Python just crashes and Blender crashes with it. On Windows when loading the equivalent.pyx
file, Python provides an error that appears in the Blender user interface, and Blender doesn't crash.I simplified the RBDLab add-on down to just the part that's required for crashing.
The steps to reproduce are as follows:
Blender 4.0 on all platforms:
An error message will pop up about a missing
regester()
function. This is expected, I removed it.Blender 4.1:
Just for reference, the simplified add-on consists of just a few parts:
I am personally unable to reproduce the issue. This likely means there is some preference that you've adjusted in 4.0.2 that's causing crashes when trying to import it into 4.1.
Can you remember what preferences you adjusted in 4.0.2?
The most likely culprit is probably an add-on that you've enabled and/or installed. To get a list of add-ons enabled in Blender 4.0.2, do this:
Help -> Save System Info
and save the file somewhere.System Information
Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Pro 1.2
Blender version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash:
40a5e739e270
4.1 Crashes on startup. Unable to load 4.0 settings.to 4.1 Crashes when loading 4.0 settings.Thanks for the reply! I actiually found out what the issue was earlier. It was an addon that was causing the crash. Through process of elimination I started removing addons until Blender 4.1 opened without crashing. The addon that caused the crash was RBD Lab. I know that addon is very popular in the community so you may see more people writing about the same issue. In fact I just replied on another post with someone that had the same problem. I also contacted the developers of the addon to let them know.
Thank you for the reply. The issue could be occuring in two places. Inside Blender during the transistion process. Or something going wrong inside the add-on during the transition process (I don't know enough about this area of Blender to know which parts of the addon get run during the import process).
Sadly I don't own the RBD Lab add-on to test with. Can you test something for me? Can you open Blender 4.1 and try to install, enable, and use the RBD Lab add-on and report back with the results? Does Blender crash when doing this?
Sure. No problem. I just tried it out. As soon as I I try to enable RBD Lab in 4.1 it immediately crashes.
Thanks for the info. Do you get the pop-up like this after Blender crashes:
If so, can you click on the
Report
button and share all the text in the next window with us?Yup. That's the pop up I get.
Can you share the text from the report window?
No problem. Do you want all the text from the report window?
Yes please.
Unable to confirm the crash either. Could be that some add-on included in 4.0 causing the crash.
Heres' the crash log.
Thanks for the crash log. Sadly I don't know enough about this area, and couldn't extract enough information from the crash log to identify if the add-on is doing something wrong, or Blender is handling it incorrectly. I will change this back to
Needs Triage
in the meantime since you've provided all the relevant information you can.No problem. Thank you!
I do have problems with blender migrating user preference from earlier versions, here it would almost always crash, but after restarting, the settings are all correctly migrated. And I do not have other 3rd party addons. So I'm not sure what exactly is causing the problem.
In the crash log, it seems to be crashed right at the button click for
PREFERENCES_OT_copy_prev
, but it doesn't give python traceback.Is the preference correctly copied after restarting blender? If so then the copy part isn't the issue, but likely in the
bpy.ops.wm.read_homefile()
part.I purchased the RBDLab add-on to investigate this issue. The issue probably isn't limited to this add-on, but it's an add-on known to have issues, so I decided to use it for testing.
On Windows with Blender 4.1, an error message pops up when trying to enable the RBD Lab add-on, but Blender doesn't crash.
On ARM macOS and x86 Linux with Blender 4.1, Blender crashes.
The issue occurs in Python when trying to load the file
distances_mac_arm.so
(A file included with and imported by the addon) with the error message:RuntimeWarning: compiletime version 3.10 of module 'distances_mac_arm' does not match runtime version 3.11
This warning means the file was compiled with Python 3.10, while the version of Python that Blender is using is 3.11. The file was compiled with Python 3.10 because that's what 4.0.2 used, but Blender 4.1 now uses Python 3.11.
The fact the file is incompatible is expected. The fact Python crashes on at least ARM macOS is not expected. But I believe that's a issue with Python, not Blender.
@PratikPB2123 Do you have thoughts on this? Or know the right person to contact for a proper comment on this?
Example questions are:
Hi, don't think this is mac specific (#119944 on windows). I'm not sure the reason behind testing with RDBLab addon 🙂
From call stack, crash seems to occur in main thread in python after
rna_operator_exec_cb
.cc @brecht
I believe Blender should in a way breakout from after finding out the
.so
being incompatible than to go ahead.@Maurice-Boone reported that the issue occurs with the RDBLab addon for them. So I got RDBLab to test with.
I believe Python is supposed to do this. But it doesn't appear to be working properly on at least ARM macOS and x86 Linux (I could not reproduce this issue on Windows).
The fact I can't reproduce the crash on Windows with RDBLab suggests the issue @ChengduLittleA is experiencing may be a different one (Comes from a different add-on?, caused by a different issue?).
@ChengduLittleA Are you able to provide a crash log for us? To do this follow these instructions:
blender_debug_log.cmd
blender_debug_output.txt
in it. Upload that file here for us to look at.oh, okay. Yiming is on linux so
blender_debug_log.cmd
won't work for him :)Sorry, got a bit confused. I was thinking of @Rayyan-Aziz from #119944
@PratikPB2123 I can give it a try on windows in a bit, but I'm not sure it will be the same crash pattern.
Just confirming, we have a few issues here.
.so
(or.pyd
file in the case of Windows) compiled with a older version of Python, then Python and Blender will crash instead of providing a error message (What Windows does). This issue plagues some add-ons, and can cause issues as these add-ons are imported from 4.0.2 to 4.1.I just wanted to give an update on my end. The developers of RBD Lab have updated their addon with python 3.11 and it's working with no issues.
I simplified the RBDLab add-on down to just the part that's required for crashing.
The steps to reproduce are as follows:
Blender 4.0 on all platforms:
An error message will pop up about a missing
regester()
function. This is expected, I removed it and basically everything else from the add-on.Blender 4.1:
Just for reference, the simplified add-on consists of just a few parts:
cython
,sys
,cpython.mem
forPyMem_Malloc
andPyMem_free
,libc.stdio
forprintf
,llibc.math
forsqrt
andhypot
,numpy
).I suspect there is not a lot we can do in the Blender code. This is crashing when Python loads a Python module, no Blender code involved.
It's difficult to tell why it properly reports an error Windows, and not other operating systems. It may be something about the way this Python module was compiled, maybe there is a issue in Cython (which I think was used here based on the stacktrace), maybe there really is a bug in Python.
I could be useful to try reproducing this with a regular Python install, to completely eliminate the possibility of this being a Blender issue.
@ideasman42, do you happen to remember anything like this? I couldn't find known Python/Cython bugs about this.
I tested Python 3.11.6 standalone on Linux (This version of Python was obtained from the Ubuntu repository).
Using the simplifed add-on attached above, I get this output:
If I use Blender 3.11.7 from Blender outside of Blender, I get the same error (Tested on Linux and macOS). But if I use Python 3.12.2 standalone, then there is no crash and I get this in the commandline:
Ah, that points to an issue in Python itself then.
I found this topic, where it seems they intentionally broke stable ABI compatibility for
PyCode_New
in Python 3.11. And instead of replacing the symbol that would give a graceful error as in Python 3.12, they changed the signature which causes a crash.https://www.mail-archive.com/python-dev@python.org/msg113439.html
This is annoying, but I don't see how we could solve this in Blender.
I'm guessing windows does better here since we build python shared there, and extensions are actively looking for a python310.dll /python311.dll etc, if you try to load a py310 module into py311 it just won't make it past the OS shared lib loader since python310.dll just won't be available, while on linux/mac where we link statically it seemingly is making the best of it, maps whatever symbols it can and hopes for the best. The struct layout of some of the core types like PyObject are drastically different in 3.11 compared to 3.10, and things go very very badly at runtime.
Starting python 3.2 there is a limited / stable api that should work on all 3.x+ versions (housed in python3.dll) that maybe could have been used here, no idea, i don't know what rdllab is using the api for.
RBDLab uses compiled cython, RBDLab version 1.5.2 does not work in Blender 4.1, because now blender 4.1 uses new version of python 3.11.7. RBDLab 1.5.3 with support for python 3.11.7 recompiled has just been released today.
I think we can close this then.