regression can't open file in 2.79 (crash) #52816
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#52816
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
Windows x64
Blender Version
Broken: 2.79
Worked: 2.74 to 2.78
Short description of error
Some files get an instant crash when trying to open in 2.79
Exact steps for others to reproduce the error
Try to open this file saved with 2.74
crash visibility layer 274.blend
Changed status to: 'Open'
Added subscriber: @bliblubli
Added subscriber: @mont29
Cannot confirm that here on linux64, with a debug build of current master… can you check if you still get crash with the latest build from our buildbot?
Added subscriber: @LazyDodo
I can repro when i enable the page heap on windows ( don't have time to extract a stackdump now sadly) so i'm pretty sure asan will catch this on linux as well.
allright had some time, here's a stackdump
looptri- [x] is pointing to uninitialized ram.
This smells like threading issues again, pretty sure running with
-t 1
option is enough to get rid of the crash?Will check on this more tomorrow, but could not reproduce the issue even with an debug/asan build here with master code.
Stack dump is from latest master, can confirm -t 1 gets rid of the crash.
Added subscriber: @mano-wii
I made a weird change in the code that seems to solve the problem:
Apparently, since the condition: "
if (dm->looptris.array) {
" of thedm_getLoopTriArray
function is out of the thread's mutex_lock, thedm->looptris.array
can be used before being "fully written".My solution was to leave
dm->looptris.array
NULL
during the entire process of creating the looptris array.(if I avoided malloc within
DM_ensure_looptri_data
would be more correct)Uh… good point didn’t thought about that kind of concurrency issue :P
Will try to find more generic way to do that (including other DM types), but that's clearly the way to go indeed.
This issue was referenced by
9591b5f618
Changed status from 'Open' to: 'Resolved'
Note that
9591b5f618
is tentative fix (based on @mano-wii's work), if one of you guys could confirm it fixes the issue would be great. ;)Added subscriber: @Sergey
Well, it seems @Sergey came across the same bug, and found a workaround for adding another mutex to
dm_getLoopTriArray
->1a4442b3db
But applying only your solution also solves the bug
Tested with latest master, no more crash
Thanks for the quick fix, but maybe only one fix would be enough? Don't know if the 2 fixes together may decrease performance?