Crash: EXC_I386_DIV (divide by zero) crash on MacOS with custom operator #86711

Closed
opened 2021-03-18 17:01:48 +01:00 by Oliver J. Post · 8 comments

System Information
MacOS systems running AMD gpus with 2GB of video RAM

Blender Version
Broken: 2.92.0

Short description of error
Two users of my add-on have reported it crashes Blender on their MacOS computer when running it's initial operator. This issue seems to only occur on very specific hardware combined with the MacOS operating system, as we have a lot of other MacOS users who do not have this crash occurring.

Exact steps for others to reproduce the error
It is not clear to me what exactly is causing the error. It seems MacOS specific, and the gpus of the two users both have the same amount of 2GB of VRAM.

Both the users describe the crash as happening when running the HG_START_CREATION operator in the HG_CREATION.py file that can be found in the attachments. This operator basically does the following:

  • it imports several objects from an external file using libraries.load and subsequently linking those object to the scene
  • it adds some custom properties to some of these objects
  • it removes two particle systems from one of these objects
  • it loads external images and sets them as the image for several TexImage nodes
  • it deletes one node from one of the material node trees

HG_CREATION.py

As I'm not able to reproduce the crash myself, I have not been able to narrow down what part of this operator is causing the crash. Unfortunately, the MacOS crash reports also do not include a Python stacktrace

The crash log shows the following error codes:Crash_log.txt

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       EXC_I386_DIV (divide by zero)
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Floating point exception: 8
Termination Reason:    Namespace SIGNAL, Code 0x8
Terminating Process:   exc handler [16093]

The above-mentioned operator doesn't do any arithmetic with divisions, so I really am not sure how it's causing this crash.

I would love to get any help or suggestions what direction I should be looking into for resolving this crash, as I'm currently quite unsure what to do about it.
I could imagine the low amount of VRAM (2gb) could be causing a problem when models are being imported by a script, but the add-on was able to run just fine on a very old windows laptop with no dedicated gpu.

I've attached a crash log supplied by one of the users below, with the permission of said user:

**System Information** MacOS systems running AMD gpus with 2GB of video RAM **Blender Version** Broken: 2.92.0 **Short description of error** Two users of my add-on have reported it crashes Blender on their MacOS computer when running it's initial operator. This issue seems to only occur on very specific hardware combined with the MacOS operating system, as we have a lot of other MacOS users who do not have this crash occurring. **Exact steps for others to reproduce the error** It is not clear to me what exactly is causing the error. It seems MacOS specific, and the gpus of the two users both have the same amount of 2GB of VRAM. Both the users describe the crash as happening when running the HG_START_CREATION operator in the HG_CREATION.py file that can be found in the attachments. This operator basically does the following: - it imports several objects from an external file using *libraries.load* and subsequently linking those object to the scene - it adds some custom properties to some of these objects - it removes two particle systems from one of these objects - it loads external images and sets them as the image for several TexImage nodes - it deletes one node from one of the material node trees [HG_CREATION.py](https://archive.blender.org/developer/F9898231/HG_CREATION.py) As I'm not able to reproduce the crash myself, I have not been able to narrow down what part of this operator is causing the crash. Unfortunately, the MacOS crash reports also do not include a Python stacktrace The crash log shows the following error codes:[Crash_log.txt](https://archive.blender.org/developer/F9898228/Crash_log.txt) ``` Exception Type: EXC_ARITHMETIC (SIGFPE) Exception Codes: EXC_I386_DIV (divide by zero) Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Floating point exception: 8 Termination Reason: Namespace SIGNAL, Code 0x8 Terminating Process: exc handler [16093] ``` The above-mentioned operator doesn't do any arithmetic with divisions, so I really am not sure how it's causing this crash. I would love to get any help or suggestions what direction I should be looking into for resolving this crash, as I'm currently quite unsure what to do about it. I could imagine the low amount of VRAM (2gb) could be causing a problem when models are being imported by a script, but the add-on was able to run just fine on a very old windows laptop with no dedicated gpu. I've attached a crash log supplied by one of the users below, with the permission of said user:
Author

Added subscriber: @olepost1

Added subscriber: @olepost1
Author

Some extra information: One of the users who is experiencing the crash indicates that it doesn't crash on 2.83, it just seems to be crashing on his newer 2.92 version.

Some extra information: One of the users who is experiencing the crash indicates that it doesn't crash on 2.83, it just seems to be crashing on his newer 2.92 version.
Author

Some new information: A new user who is experiencing the crash has a 6GB VRAM card, thereby disproving our hypothesis of low VRAM being a correlation between the crashes.

When testing the code one section at a time by one of our users, it can go to line 54 in the Python file without crashing. The next testing section started at line 67 so I presume the origin of the crash is between these lines. I'm going to try to write this section with workaround methods of achieving the same thing and see if this perhaps doesn't trigger the crash.

Some new information: A new user who is experiencing the crash has a 6GB VRAM card, thereby disproving our hypothesis of low VRAM being a correlation between the crashes. When testing the code one section at a time by one of our users, it can go to line 54 in the Python file without crashing. The next testing section started at line 67 so I presume the origin of the crash is between these lines. I'm going to try to write this section with workaround methods of achieving the same thing and see if this perhaps doesn't trigger the crash.
Author

Also, I should note that the users are using both MacOS Catalina and the newest Big Sur. Because MacOS updates GPU drivers with their OS updates one could rule out outdated GPU drivers being the culprit

Also, I should note that the users are using both MacOS Catalina and the newest Big Sur. Because MacOS updates GPU drivers with their OS updates one could rule out outdated GPU drivers being the culprit
Author

Extra information: By one of our users testing the sections even further, it looks like the crash occurs in line 65, where the imported objects are linked to the scene.

    for obj in data_to.objects:
        scene.collection.objects.link(obj)

I assume there is no alternative way to link imported objects to the scene? I'd really like to make a workaround version for our users until more is known about this bug, but I can't think of a way to circumvent this specific line.

Extra information: By one of our users testing the sections even further, it looks like the crash occurs in line 65, where the imported objects are linked to the scene. ``` for obj in data_to.objects: scene.collection.objects.link(obj) ``` I assume there is no alternative way to link imported objects to the scene? I'd really like to make a workaround version for our users until more is known about this bug, but I can't think of a way to circumvent this specific line.
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Member

The crash happens in the GPU driver after doing a draw call, so this is not related to your script or Blender, at least not directly. So there isn't much we can do in this case. This issue should be reported to the GPU driver vendor instead.

The crash happens in the GPU driver after doing a draw call, so this is not related to your script or Blender, at least not directly. So there isn't much we can do in this case. This issue should be reported to the GPU driver vendor instead.
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
2 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#86711
No description provided.