Crash due to (preview) jobs running during undo step. #56491

Closed
opened 2018-08-22 07:48:14 +02:00 by Garry Watson · 18 comments

System Information
Windows 10, Intel UHD Graphics 620

Blender Version
Broken: blender-2.80-7eaf00bfb09-win64
Worked: (optional)

Grease Pencil Crash with undo

Exact steps for others to reproduce the error
In draw mode, insert a stroke. Draw some lines and shapes in various colours and then try to undo more than 12 times. Results in a crash every time

**System Information** Windows 10, Intel UHD Graphics 620 **Blender Version** Broken: blender-2.80-7eaf00bfb09-win64 Worked: (optional) **Grease Pencil Crash with undo** **Exact steps for others to reproduce the error** In draw mode, insert a stroke. Draw some lines and shapes in various colours and then try to undo more than 12 times. Results in a crash every time
Author

Added subscriber: @Nessie

Added subscriber: @Nessie

#56185 was marked as duplicate of this issue

#56185 was marked as duplicate of this issue

#56084 was marked as duplicate of this issue

#56084 was marked as duplicate of this issue
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

Confirmed on Windows 10 debug build MSVS2017

image.png

Confirmed on Windows 10 debug build MSVS2017 ![image.png](https://archive.blender.org/developer/F4339402/image.png)

Added subscriber: @mont29

Added subscriber: @mont29

Cannot reproduce under linux with latest branch…

Cannot reproduce under linux with latest branch…

Added subscriber: @antoniov

Added subscriber: @antoniov

Cannot reproduce in Windows 10.

@CharlieJolly Do you have a log and/or backtrace?

Cannot reproduce in Windows 10. @CharlieJolly Do you have a log and/or backtrace?

Added subscriber: @zeauro

Added subscriber: @zeauro

I succeeded to obtain a crash on linux.
GP_Lineshape.crash.txt

I succeeded to obtain a crash on linux. [GP_Lineshape.crash.txt](https://archive.blender.org/developer/F4355016/GP_Lineshape.crash.txt)
Member

This may help.

Exception thrown: read access violation.
scene->world was 0xFFFFFFFFFFFFFF37.

blender.exe!preview_prepare_scene(Main * bmain=0x0000020ef630b2f8, Scene * scene=0x0000020e8e712598, ID * id=0x0000000000000000, int id_type=-8739, ShaderPreview * sp=0x0000020e8ead4048) Line 378	C
blender.exe!shader_preview_render(ShaderPreview * sp=0x0000020e8ead4048, ID * id=0x0000020ef6122538, int split=0, int first=0) Line 828	C
blender.exe!shader_preview_startjob(void * customdata=0x0000020e8ead4048, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a) Line 845	C
blender.exe!icon_preview_startjob(void * customdata=0x0000020e8ead4048, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a) Line 1046	C
blender.exe!common_preview_startjob(void * customdata=0x0000020e8ead4048, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a, float * UNUSED_progress=0x0000020e84735670) Line 1061	C
blender.exe!icon_preview_startjob_all_sizes(void * customdata=0x0000020e8e59be68, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a, float * progress=0x0000020e84735670) Line 1148	C
blender.exe!do_job_thread(void * job_v=0x0000020e847355f8) Line 338	C
blender.exe!tslot_thread_start(void * tslot_p=0x0000020ea5446048) Line 254	C
pthreadVC2.dll!00007ffeda8c627b()	Unknown
pthreadVC2.dll!00007ffeda8c8eb7()	Unknown
pthreadVC2.dll!00007ffeda8c9102()	Unknown
kernel32.dll!00007ffef9481fe4()	Unknown
ntdll.dll!00007ffefbffcb31()	Unknown
This may help. Exception thrown: read access violation. scene->**world** was 0xFFFFFFFFFFFFFF37. ``` blender.exe!preview_prepare_scene(Main * bmain=0x0000020ef630b2f8, Scene * scene=0x0000020e8e712598, ID * id=0x0000000000000000, int id_type=-8739, ShaderPreview * sp=0x0000020e8ead4048) Line 378 C blender.exe!shader_preview_render(ShaderPreview * sp=0x0000020e8ead4048, ID * id=0x0000020ef6122538, int split=0, int first=0) Line 828 C blender.exe!shader_preview_startjob(void * customdata=0x0000020e8ead4048, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a) Line 845 C blender.exe!icon_preview_startjob(void * customdata=0x0000020e8ead4048, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a) Line 1046 C blender.exe!common_preview_startjob(void * customdata=0x0000020e8ead4048, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a, float * UNUSED_progress=0x0000020e84735670) Line 1061 C blender.exe!icon_preview_startjob_all_sizes(void * customdata=0x0000020e8e59be68, short * stop=0x0000020e8473566c, short * do_update=0x0000020e8473566a, float * progress=0x0000020e84735670) Line 1148 C blender.exe!do_job_thread(void * job_v=0x0000020e847355f8) Line 338 C blender.exe!tslot_thread_start(void * tslot_p=0x0000020ea5446048) Line 254 C pthreadVC2.dll!00007ffeda8c627b() Unknown pthreadVC2.dll!00007ffeda8c8eb7() Unknown pthreadVC2.dll!00007ffeda8c9102() Unknown kernel32.dll!00007ffef9481fe4() Unknown ntdll.dll!00007ffefbffcb31() Unknown ```

I see now, this is the same bug of #56084 and #56185.

The problem is the preview job is rendering while the undo is done. I'm not sure how fix this.

I see now, this is the same bug of #56084 and #56185. The problem is the preview job is rendering while the undo is done. I'm not sure how fix this.
Campbell Barton was assigned by Bastien Montagne 2018-08-23 22:04:59 +02:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

There is a condition in ed_undo_step, which aborts the operator if any job is running (WM_jobs_test(wm, scene, WM_JOB_TYPE_ANY)). Problem is, it only checks for jobs which owner is current scene, this ignores several jobs I think (including preview render ones).

Also, I find it odd that we abort the operation here, why not rather kill all current jobs with WM_jobs_kill_all()? I’d expect user would rather want to do their undo, aborting background jobs if necessary?

Summoning @ideasman42 here…

There is a condition in `ed_undo_step`, which aborts the operator if any job is running (`WM_jobs_test(wm, scene, WM_JOB_TYPE_ANY)`). Problem is, it only checks for jobs which owner is current scene, this ignores several jobs I think (including preview render ones). Also, I find it odd that we abort the operation here, why not rather kill all current jobs with `WM_jobs_kill_all()`? I’d expect user would rather want to do their undo, aborting background jobs if necessary? Summoning @ideasman42 here…
Bastien Montagne changed title from Grease pencil crash to Grease pencil crash due to jobs running during undo step. 2018-08-23 22:05:29 +02:00
Bastien Montagne changed title from Grease pencil crash due to jobs running during undo step. to Crash due to (preview) jobs running during undo step. 2018-08-23 22:06:00 +02:00

Added subscribers: @candreacchio, @andergrin, @Endeg, @s12a

Added subscribers: @candreacchio, @andergrin, @Endeg, @s12a

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by 9abc2dfa49

This issue was referenced by 9abc2dfa4933266b7f385b75c65527d512441363
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
7 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#56491
No description provided.