Page MenuHome

Crash: When Rendering in Workbench
Closed, ResolvedPublic

Description

System Information
Windows 10 64bit, Intel HD 5500 HD

Blender Version
Broken: blender-2.80.0 4c6e7ef11f3

Short description of error
Activating Freestyle (in Cycles or Eevee) then switching to Workbench and hit F12 crashes Blender.

Exact steps for others to reproduce the error
1- check on Freestyle in Cycles or Eevee render engine
2- Switch to Workbench render engine
3- Hit F12 or "Render Image"

Details

Type
Bug

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Nov 29 2018, 11:16 AM

Confirmed, checking...

scene->world is NULL

1   copy_v3_v3                                    math_vector_inline.c      66   0x288a7b5 
2   workbench_private_data_init                   workbench_data.c          61   0x288accc 
3   workbench_deferred_engine_init                workbench_deferred.c      351  0x2880e98 
4   workbench_render                              workbench_render.c        144  0x2847bc0 
5   workbench_render_to_image                     solid_mode.c              96   0x2847fac 
6   DRW_render_to_image                           draw_manager.c            1850 0x27ffc31 
7   RE_engine_render                              external_engine.c         739  0x22fdf1d 
8   do_render_3d                                  pipeline.c                1101 0x230585c 
9   RE_RenderFreestyleStrokes                     pipeline.c                2052 0x23080e5 
10  Freestyle::BlenderStrokeRenderer::RenderScene BlenderStrokeRenderer.cpp 892  0x2467245 
11  Freestyle::Controller::RenderStrokes          Controller.cpp            907  0x245676c 
12  FRS_do_stroke_rendering                       FRS_freestyle.cpp         632  0x23a56b7 
13  add_freestyle                                 pipeline.c                1337 0x23061b2 
14  RE_RenderFreestyleExternal                    pipeline.c                2088 0x23081f5 
15  RE_engine_render                              external_engine.c         795  0x22fe129 
16  do_render_3d                                  pipeline.c                1101 0x230585c 
17  do_render                                     pipeline.c                1177 0x2305b70 
18  do_render_composite                           pipeline.c                1392 0x2306379 
19  do_render_all_options                         pipeline.c                1659 0x2306fc8 
20  RE_BlenderFrame                               pipeline.c                2013 0x2307ec9

not sure exactly why, here is just a bandaid to prevent a crash

1
2
3diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
4index 522b7d6e8c4..2308dc9cd8f 100644
5--- a/source/blender/draw/engines/workbench/workbench_data.c
6+++ b/source/blender/draw/engines/workbench/workbench_data.c
7@@ -55,13 +55,12 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
8 wd->matcap_orientation = (wpd->shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0;
9 wd->background_alpha = (DRW_state_is_image_render() && scene->r.alphamode == R_ALPHAPREMUL) ? 0.0f : 1.0f;
10
11- if (!v3d || ((v3d->shading.background_type == V3D_SHADING_BACKGROUND_WORLD) &&
12- (scene->world != NULL)))
13+ if ((scene->world != NULL) && (!v3d || (v3d->shading.background_type == V3D_SHADING_BACKGROUND_WORLD)))
14 {
15 copy_v3_v3(wd->background_color_low, &scene->world->horr);
16 copy_v3_v3(wd->background_color_high, &scene->world->horr);
17 }
18- else if (v3d->shading.background_type == V3D_SHADING_BACKGROUND_VIEWPORT) {
19+ else if (v3d && v3d->shading.background_type == V3D_SHADING_BACKGROUND_VIEWPORT) {
20 copy_v3_v3(wd->background_color_low, v3d->shading.background_color);
21 copy_v3_v3(wd->background_color_high, v3d->shading.background_color);
22 }

Also not sure if freestyle should be rendering at all for workbench?
If it should be generally supported, then we should add the panel to the Render tab as well.

@Brecht Van Lommel (brecht), I guess this is for you?

Hello, @Philipp Oeser (lichtwerk) @Brecht Van Lommel (brecht),
As of today, I have compiled blender :

  • version: 2.80 (sub 38), branch: blender2.8, commit date: 2018-12-18 09:44, hash: d3e1b043c37
  • build date: 18/12/2018, 11:22

I can confirm that the crash has been resolved (you can close this report), but I noticed some weird results concerning rendering when "Freestyle" is checked on:

  • On EEVEE: image is entirely black.
  • On Workbench: Shading informations doesn't show up, but freestyle is there.
  • On Cycles: everything is fine except some draw back in the performance (it took 00:02:08 to render the default scene).

Cheers,
elbox01.

Thanks for testing. For the Freestyle issue we have T58669: Freestyle + EEVEE render not working.

OK! no problem and thank you for your hard work.