Importing large STL (~5GB) seg faults with empty backtrace produced from --debug-all #113380
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#113380
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: RHEL 7, Win10
Graphics card: N/A
Blender Version
Broken: 3.4.1, 3.5
Worked: N/A
Short description of error
I am trying to import an STL and export it as 3MF which is a compressed file format for 3D models. Some of my models are very large and over 5GB in size. When I import a large STL that is 5GB in size, Blender will crash after/during importing. The crash.txt that Blender writes has sections for backtrace but the section is empty.
My suspicion is Blender is using a variable type that is too small to keep track of the points in this large object. The import prints a message saying import finished but seg faults in the update phase right after. Or there is an internal memory limit for objects in Blender that I don't know about.
I am running Blender like so:
~/blender-3.4.1-linux-x64/blender -b -noaudio --debug-all --python-console
File import crashes in both normal and headless console mode in both Windows (64GB ram, RTX3060TI) and Linux (1024GB ram, no GPU). Blender 3.4 is the latest I can run on the linux machine due to older GLIBC on the machine. Blender does not appear to use up all the memory on either machine and crashes before the machine is physically out of memory. I have been able to successfully import and export STLs over 2GB in size. I would cut up the file if there is an internal memory limit on Blender but I would need to import it first which is a chicken and egg problem...
system memory screenshots:
I am using the 3MF blender addon (https://github.com/Ghostkeeper/Blender3mfFormat) to export the object after import but Blender never gets to that part as it crashes during the update phase? after printing a message saying the file was imported.
Exact steps for others to reproduce the error
I can share an actual 5GB STL file that crashes if needed. Please let me know if I should upload a 7z of the STL file.
Console log of the blender debug output right after the import command. The empty blender.crash.txt file is in the right pane of the bottom image.
Windows builds have much better luck when printing their crash stack traces. Can you check there again? Additionally, is there anything you can tell us about the file in question like maybe the maximum number of vertices that will be in a single mesh that you'll be importing? Blender does have limits in that area that could be at play.
@deadpin I ran the import again in Windows 10 and got the below console log and attached crash report. It looks like there's more debug data in Windows.
I estimate the 5GB file having 300,000,000 - 500,000,000 vertices in 1 object. There is only one object in the STL.
This STL (a relief map) was generated programmatically and I successfully used it in a meshboolean operation using libigl. The meshboolean (subtract) operation produced a valid STL that was a small size of 1.3GB (71729262 vertices) and I was able to open it and confirm that the boolean output file had the correct results so the original 5GB file should be valid. I can't open the 5GB file to get an exact vertex count, so my estimate is based on file size which has been more or less accurate based on other files I have.
Windows 11 console log with --debug-all (ran in GUI mode)
Yes, that looks the same as #111575 (and to a lesser extent #110334) as this is crashing inside
BLO_memfile_chunk_add
.If a single mesh contains more than 178,956,970 verts, this will trigger. That will total just over 2gb worth of vertex coordinate data (12 bytes / vertex) which needs to be stored and, as you suspected, the field describing the length is too small to handle the value. This is a current limitation of Blender with no easy workaround.
I'll close this bug as a duplicate but feel free to subscribe to #111575 for updates on the matter.