Fix #110908: Crash when scrubbing timeline with sim node #111429

Open
Vitor Boschi wants to merge 4 commits from vitorboschi/blender:fix/geonodes_cache_assert into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Contributor

The caching code was trying to insert cached frames in the wrong order,
making it hit an assert and crash.

The caching code was trying to insert cached frames in the wrong order, making it hit an assert and crash.
Iliya Katushenock added this to the Nodes & Physics project 2023-08-23 14:19:45 +02:00
Iliya Katushenock changed title from Fix crash when scrubbing timeline with sim node to Fix #110908: Crash when scrubbing timeline with sim node 2023-08-23 14:19:53 +02:00
Iliya Katushenock added the
Interest
Geometry Nodes
label 2023-08-23 14:19:58 +02:00
Vitor Boschi requested review from Hans Goudey 2023-08-23 14:28:27 +02:00
Vitor Boschi force-pushed fix/geonodes_cache_assert from 0c1d605d3e to 6e40aa15e4 2023-08-23 14:30:54 +02:00 Compare
Vitor Boschi force-pushed fix/geonodes_cache_assert from 6e40aa15e4 to 58b409d86e 2023-08-23 14:35:53 +02:00 Compare
Hans Goudey requested changes 2023-08-23 15:55:52 +02:00
Hans Goudey left a comment
Member

Thanks, just a couple small comments

Thanks, just a couple small comments
@ -133,0 +130,4 @@
const int64_t i = find_state_at_frame(states_at_frames_, frame);
if (i == -1) {
/* either we have an empty container, or the last frame < than the requested frame
Member

Comment style (https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Comments):

  • start with a capital letter
  • end with a period
  • no need for double ** for comments inside of functions
Comment style (https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Comments): - start with a capital letter - end with a period - no need for double `**` for comments inside of functions
Author
Contributor

Should be fixed now

Should be fixed now
@ -140,3 +150,1 @@
states_at_frames_.last()->frame = frame;
states_at_frames_.last()->state.owner_ = this;
return states_at_frames_.last()->state;
/** no cached frame found. Need to insert it just before #i to keep ordering */
Member

#i ->

`i`
`#i` -> ``` `i` ````
Member

@blender-bot build

@blender-bot build
Vitor Boschi force-pushed fix/geonodes_cache_assert from 58b409d86e to 2cccc3ef9b 2023-08-23 16:00:18 +02:00 Compare
Vitor Boschi force-pushed fix/geonodes_cache_assert from 2cccc3ef9b to 2e2a01006d 2023-08-23 16:01:54 +02:00 Compare
Vitor Boschi requested review from Hans Goudey 2023-08-23 16:02:36 +02:00
Member

In the future, could you use regular non-force pushing when updating a PR branch, i.e. new commit rather than rebase? it makes it hard to see what you've changed compared to last time, and the PRs are squashed when they're committed anyway. Thanks.

In the future, could you use regular non-force pushing when updating a PR branch, i.e. new commit rather than rebase? it makes it hard to see what you've changed compared to last time, and the PRs are squashed when they're committed anyway. Thanks.
Member

@blender-bot build

@blender-bot build
Vitor Boschi added 1 commit 2023-08-23 20:05:34 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
7c321250b5
Enclose identifier in backticks (on comment)
Member

@blender-bot build

@blender-bot build
Author
Contributor

@HooglyBoogly I see the Cycles tests are all failing in the buildbot. Is that some known issue? I find it hard to believe this patch would make (all of) those fail.

@HooglyBoogly I see the Cycles tests are all failing in the buildbot. Is that some known issue? I find it hard to believe this patch would make (all of) those fail.
Member

Sometimes tests fail on the buildbot briefly and are fixed. You can usually fix that for a branch by merging main. Sometimes the test files have been updated too, which can cause failures when the branch is based on an outdated version of main.

Sometimes tests fail on the buildbot briefly and are fixed. You can usually fix that for a branch by merging main. Sometimes the test files have been updated too, which can cause failures when the branch is based on an outdated version of main.
Vitor Boschi added 1 commit 2023-08-25 14:40:26 +02:00
Author
Contributor

Sometimes tests fail on the buildbot briefly and are fixed. You can usually fix that for a branch by merging main. Sometimes the test files have been updated too, which can cause failures when the branch is based on an outdated version of main.

Thanks. I have now updated the PR. Is anyone able to request a build from the bot, or just Blender devs?

> Sometimes tests fail on the buildbot briefly and are fixed. You can usually fix that for a branch by merging main. Sometimes the test files have been updated too, which can cause failures when the branch is based on an outdated version of main. Thanks. I have now updated the PR. Is anyone able to request a build from the bot, or just Blender devs?
Lukas Tönne requested changes 2023-08-29 16:29:18 +02:00
Lukas Tönne left a comment
Member

Insertion logic looks fine, just some cleanup for comments needed.

Insertion logic looks fine, just some cleanup for comments needed.
@ -133,0 +131,4 @@
const int64_t i = find_state_at_frame(states_at_frames_, frame);
if (i == -1) {
/* Either we have an empty container, or the last frame < than the requested frame
in both cases we can just append a new state at the end. */
Member

Add a * in front of comment lines.

Add a `*` in front of comment lines.
Vitor Boschi added 1 commit 2023-08-29 18:08:12 +02:00
Vitor Boschi requested review from Lukas Tönne 2023-08-29 18:09:10 +02:00
This pull request has changes conflicting with the target branch.
  • source/blender/blenkernel/intern/simulation_state.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/geonodes_cache_assert:vitorboschi-fix/geonodes_cache_assert
git checkout vitorboschi-fix/geonodes_cache_assert
Sign in to join this conversation.
No reviewers
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 Assignees
3 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#111429
No description provided.