Blender 2.80 - Removing second Particle System cache causes crash #59958

Closed
opened 2018-12-29 16:41:12 +01:00 by artem ivanov · 11 comments

System Information
Operating system: Windows 10
Graphics card: GTX 1070

Blender Version
Broken: 2.80, 7c438e5366, 2018-12-28 23:19, as found on the splash screen (from buildbot)

Short description of error
Changing particle system settings after removing second particle system cache causes crash

Exact steps to reproduce the error

  • Open Blender
  • Load Factory Settings
  • On the default cube: Particle System -> New
  • Particles tab -> Cache -> click on the "+" sign
  • Single left click on the added (and therefore selected) cache entry (see screenshot)
  • Cache -> click on the "-" sign
  • Change Particles tab -> Emission -> Frame Start to any value (or basically change any current particle system setting)
  • Crash with EXCEPTION_ACCESS_VIOLATION.

particle_cache.png

Alternative steps

  • Open Blender
  • Load Factory Settings
  • On the default cube: Particle System -> New
  • Particles tab -> Cache -> click on the "+" sign
  • Select the first cache entry
  • Cache -> click on the "-" sign
  • Change Particles tab -> Emission -> Frame Start to any value (or basically change any current particle system setting)
  • Crash with access violation.

Saving file before adding the second cache doesn't affect the crash.

**System Information** Operating system: Windows 10 Graphics card: GTX 1070 **Blender Version** Broken: 2.80, 7c438e5366b2, 2018-12-28 23:19, as found on the splash screen *(from buildbot)* **Short description of error** Changing particle system settings after removing second particle system cache causes crash **Exact steps to reproduce the error** - Open Blender - Load Factory Settings - On the default cube: **Particle System** -> **New** - **Particles** tab -> **Cache** -> click on the "**+**" sign - Single left click on the added (and therefore selected) cache entry (see screenshot) - **Cache** -> click on the "**-**" sign - Change **Particles** tab -> **Emission** -> **Frame Start** to any value (or basically change any current particle system setting) - Crash with `EXCEPTION_ACCESS_VIOLATION`. ![particle_cache.png](https://archive.blender.org/developer/F6107875/particle_cache.png) **Alternative steps** - Open Blender - Load Factory Settings - On the default cube: **Particle System** -> **New** - **Particles** tab -> **Cache** -> click on the "**+**" sign - Select the first cache entry - **Cache** -> click on the "**-**" sign - Change **Particles** tab -> **Emission** -> **Frame Start** to any value (or basically change any current particle system setting) - Crash with access violation. Saving file before adding the second cache doesn't affect the crash.
Author

Added subscriber: @ixd

Added subscriber: @ixd

Added subscriber: @ZedDB

Added subscriber: @ZedDB

I can't seem to reproduce this on my end. Is this still a problem with the latest blender beta?

I can't seem to reproduce this on my end. Is this still a problem with the latest blender beta?
Author

@ZedDB Yep. It still crashes for me. Also tested on a different machine running Ubuntu 18.10 x64 - it crashes. More info:

Win 10 (1d908bffdd)
When running blender.exe --debug-all it crashes more rarily (like in 1 of 3 test runs) but here some useful console output (when blender doesn't crash immediately):
Right after 7. Change Particles tab -> Emission -> Frame Start to any value:

Memoryblock cached frames array: double free

and after closing blender:

Error: Not freed memory blocks: 5, total unfreed memory 0.054276 MB
cached frames array len: 252 0000016A1292E308
Pointcache mem len: 176 0000016A133DF0C8
PTCache Data len: 4004 0000016A12FEEAF8
PTCache Data len: 12012 0000016A12E9DDB8
PTCache Data len: 12012 0000016A25CEA718

Blender quit

Ubuntu 18.10 (7f77961f1c)
It doesn't crash after the aforementioned steps, but it does when running with --debug-memory switch.

Output from blender --debug-memory:

Writing: /tmp/blender.crash.txt
Segmentation fault (core dumped)

Content of blender.crash.txt:

# Blender 2.80 (sub 41), Commit date: 2019-01-23 23:36, Hash 7f77961f1c38
bpy.context.space_data.context = 'PARTICLES'  # Property
bpy.ops.object.particle_system_add()  # Operator
bpy.ops.ptcache.add()  # Operator
bpy.context.object.active_index = 1  # Property
bpy.ops.ptcache.remove()  # Operator
bpy.data.particles["ParticleSettings"].count = 1001  # Property
 
# backtrace
./blender(BLI_system_backtrace+0x1d) [0x1ba3afd]
./blender() [0x1156f99]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f67fa1b3f20]
./blender(BKE_ptcache_free_mem+0x28) [0x197c328]
./blender() [0x196c1f5]
./blender(particle_system_update+0x47e) [0x196d6be]
./blender() [0x163884c]
./blender() [0x184ac92]
./blender() [0x184ba01]
./blender(makeDerivedMesh+0x7b) [0x184db2b]
./blender(BKE_object_handle_data_update+0x128) [0x1947568]
./blender(BKE_object_eval_uber_data+0x2e) [0x1947aee]
./blender() [0x1bc1bbc]
./blender() [0x1ba3ea1]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f67fb75e6db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f67fa29688f]

Output from blender --debug-all:

# <click to increase particles count>
Memoryblock PTCacheID: double free
...
# <closing blender>
Error: Not freed memory blocks: 1, total unfreed memory 0.000008 MB
cached frames array len: 4 0x7f4abbb288a8
 
Blender quit

Also clicking on the freshly added cache item increases reported memory consumption:

(e.g.) zero clicks = 18.7 MB
1 click = 18.8 MB
2 = 19.0 MB
3 = 19.1 MB
4 = 19.3 MB

How to reproduce (click to view gif):
ptcache.gif

@ZedDB Yep. It still crashes for me. Also tested on a different machine running Ubuntu 18.10 x64 - it crashes. More info: **Win 10 (1d908bffddb4)** When running `blender.exe --debug-all` it crashes more rarily (like in 1 of 3 test runs) but here some useful console output (when blender doesn't crash immediately): Right after ***7. Change Particles tab -> Emission -> Frame Start to any value***: ``` Memoryblock cached frames array: double free ``` and after closing blender: ``` Error: Not freed memory blocks: 5, total unfreed memory 0.054276 MB cached frames array len: 252 0000016A1292E308 Pointcache mem len: 176 0000016A133DF0C8 PTCache Data len: 4004 0000016A12FEEAF8 PTCache Data len: 12012 0000016A12E9DDB8 PTCache Data len: 12012 0000016A25CEA718 Blender quit ``` **Ubuntu 18.10 (7f77961f1c38)** It doesn't crash after the aforementioned steps, but it does when running with `--debug-memory` switch. Output from `blender --debug-memory`: ``` Writing: /tmp/blender.crash.txt Segmentation fault (core dumped) ``` Content of `blender.crash.txt`: ``` # Blender 2.80 (sub 41), Commit date: 2019-01-23 23:36, Hash 7f77961f1c38 bpy.context.space_data.context = 'PARTICLES' # Property bpy.ops.object.particle_system_add() # Operator bpy.ops.ptcache.add() # Operator bpy.context.object.active_index = 1 # Property bpy.ops.ptcache.remove() # Operator bpy.data.particles["ParticleSettings"].count = 1001 # Property # backtrace ./blender(BLI_system_backtrace+0x1d) [0x1ba3afd] ./blender() [0x1156f99] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f67fa1b3f20] ./blender(BKE_ptcache_free_mem+0x28) [0x197c328] ./blender() [0x196c1f5] ./blender(particle_system_update+0x47e) [0x196d6be] ./blender() [0x163884c] ./blender() [0x184ac92] ./blender() [0x184ba01] ./blender(makeDerivedMesh+0x7b) [0x184db2b] ./blender(BKE_object_handle_data_update+0x128) [0x1947568] ./blender(BKE_object_eval_uber_data+0x2e) [0x1947aee] ./blender() [0x1bc1bbc] ./blender() [0x1ba3ea1] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f67fb75e6db] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f67fa29688f] ``` --- Output from `blender --debug-all`: ``` # <click to increase particles count> Memoryblock PTCacheID: double free ... # <closing blender> Error: Not freed memory blocks: 1, total unfreed memory 0.000008 MB cached frames array len: 4 0x7f4abbb288a8 Blender quit ``` --- Also clicking on the freshly added cache item increases reported memory consumption: ``` (e.g.) zero clicks = 18.7 MB 1 click = 18.8 MB 2 = 19.0 MB 3 = 19.1 MB 4 = 19.3 MB ``` --- How to reproduce (click to view gif): ![ptcache.gif](https://archive.blender.org/developer/F6395412/ptcache.gif)

I can reproduce this on 7f77961f1c.

However, I couldn't yesterday and not today either with the latest commit. So I'm guessing this was fixed sometime yesterday (and my build that I tested with was new enough to have this fix in).

Could you see if you can reproduce this again (on both linux and windows) with the current builds from the build bot?

I can reproduce this on 7f77961f1c38. However, I couldn't yesterday and not today either with the latest commit. So I'm guessing this was fixed sometime yesterday (and my build that I tested with was new enough to have this fix in). Could you see if you can reproduce this again (on both linux and windows) with the current builds from the build bot?

Wait, now I'm getting this still on the latest commit :S
Why couldn't I trigger this before I rolled back to the commit you listed...

Ugh, anyways. I can reproduce this on my side with the latest commit.

Wait, now I'm getting this still on the latest commit :S Why couldn't I trigger this before I rolled back to the commit you listed... Ugh, anyways. I can reproduce this on my side with the latest commit.
Bastien Montagne was assigned by Sebastian Parborg 2019-01-25 11:59:02 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

Feel free to reassign if this is not for you @mont29

Feel free to reassign if this is not for you @mont29

Just missing a DEG tagging, fix incoming.

Just missing a DEG tagging, fix incoming.

This issue was referenced by ea5326df86

This issue was referenced by ea5326df86cba7bb235f623d59cec87bdf9e41b6

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#59958
No description provided.