cycles bake crashes with motionblur on #45537

Closed
opened 2015-07-23 11:09:43 +02:00 by Vilem Duha · 15 comments
Member

System Information

Blender Version
Broken: 2b5e150
Worked: (optional)

Short description of error
crash when hitting bake and having motion blur on.

Exact steps for others to reproduce the error

enable motion blur, add some object with uvs and image in material nodes, try to bake.

**System Information** **Blender Version** Broken: 2b5e150 Worked: (optional) **Short description of error** crash when hitting bake and having motion blur on. **Exact steps for others to reproduce the error** enable motion blur, add some object with uvs and image in material nodes, try to bake.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @VilemDuha

Added subscriber: @VilemDuha
Author
Member

Just a comment - of course it's not very logical to have mblur supported with bake ( or woud it ever be?), but crashes shouldn't happen..

Just a comment - of course it's not very logical to have mblur supported with bake ( or woud it ever be?), but crashes shouldn't happen..

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

Please try with a more recent version of Blender to see if the crash is still present and if so, attach a file demonstrating the issue.

Please try with a more [recent version of Blender ](https://builder.blender.org/download/) to see if the crash is still present and if so, attach a file demonstrating the issue.
Author
Member

well the version I reported with isn't that old(2 weeks maximum?) , especially considering Cycles bake isn't being worked on.
so it happens also to yesterdays build.

MBLURCRASH.blend

tested with:
7ae44e8

I didn't post a file this time, I thougth it's so simple to recreate that It actually takes longer time to write this comment than it took to create this file :)

well the version I reported with isn't that old(2 weeks maximum?) , especially considering Cycles bake isn't being worked on. so it happens also to yesterdays build. [MBLURCRASH.blend](https://archive.blender.org/developer/F212134/MBLURCRASH.blend) tested with: 7ae44e8 I didn't post a file this time, I thougth it's so simple to recreate that It actually takes longer time to write this comment than it took to create this file :)

A file is always required, even for simple bugs. As a matter of fact bugs should be reproducible with the default cube (depending on the area, e.g. it doesn't really make sense for the compositor). Also, people (mostly developers) don't necessarily have time to recreate the issue to check on the bug.

Anyway, the segfault seems to happen in the camera motion synchronization code in Cycles' Blender API. I don't have a debug build with Cycles at the moment to confirm or infirm this.

A file is always required, even for simple bugs. As a matter of fact bugs should be reproducible with the default cube (depending on the area, e.g. it doesn't really make sense for the compositor). Also, people (mostly developers) don't necessarily have time to recreate the issue to check on the bug. Anyway, the segfault seems to happen in the camera motion synchronization code in Cycles' Blender API. I don't have a debug build with Cycles at the moment to confirm or infirm this.

Added subscriber: @brecht

Added subscriber: @brecht

It's crashing because there is no camera in the scene, it should be a simple NULL pointer check to fix this so that we're not trying to synchronize motion from a non-existing camera.

It's crashing because there is no camera in the scene, it should be a simple NULL pointer check to fix this so that we're not trying to synchronize motion from a non-existing camera.

Oh, well, I could have spent a few more seconds checking on that file :) Thanks @brecht. For now I have to get the module owner's approval to commit to master, would you approve of this patch?

diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 432c4aa..d866ddf 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -670,6 +670,10 @@ void BlenderSync::sync_motion(BL::RenderSettings b_render,
 
 	/* get camera object here to deal with camera switch */
 	BL::Object b_cam = b_scene.camera();
+
+	if(!b_cam)
+		return;
+
 	if(b_override)
 		b_cam = b_override;
 

@VilemDuha, that's yet another reason to always link a file, if I had to recreate it with the default startup file there would have been a camera in there ;)

Oh, well, I could have spent a few more seconds checking on that file :) Thanks @brecht. For now I have to get the module owner's approval to commit to master, would you approve of this patch? ``` diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 432c4aa..d866ddf 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -670,6 +670,10 @@ void BlenderSync::sync_motion(BL::RenderSettings b_render, /* get camera object here to deal with camera switch */ BL::Object b_cam = b_scene.camera(); + + if(!b_cam) + return; + if(b_override) b_cam = b_override; ``` @VilemDuha, that's yet another reason to always link a file, if I had to recreate it with the default startup file there would have been a camera in there ;)

@kevindietrich, I would add if(!b_ob) return in sync_camera_motion() instead, no need to abort sync_motion() entirely. If you do that and it fixes the crash, you can commit it. Thanks!

@kevindietrich, I would add `if(!b_ob) return` in `sync_camera_motion()` instead, no need to abort `sync_motion()` entirely. If you do that and it fixes the crash, you can commit it. Thanks!

That works too, will commit in a minute, thanks for the input/review!

That works too, will commit in a minute, thanks for the input/review!

This issue was referenced by 7c5c7b5ef6

This issue was referenced by 7c5c7b5ef6c3a77411b9e197152d5754943a034d

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by blender/cycles@5196f9309b

This issue was referenced by blender/cycles@5196f9309b1d7a1ac8444c39495abc3474d1b642
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#45537
No description provided.