Page MenuHome

Crash when Render F12 or use Preview Materials
Closed, ResolvedPublic


Windows 10 - Last source code compiled with VS2017 at 07-Jul 12:00

To reproduce:

  1. Start default scene.
  2. Press F12 or use material tab with preview.

I have doing debug and the error is in DRW_render_object_iter() function in draw_manager.c

the line with error is:

const int object_type_exclude_viewport = draw_ctx->v3d->object_type_exclude_viewport;

The problem is v3d is NULL. All draw_ctx pointers are not initializated at this moment.



Event Timeline

I can reproduce this on Linux.
I was able to narrow it down to a48b52d54669. I built the current HEAD with and without it to isolate it.
Probable duplicates of this are: T55833, T55838, T55822

This change fix the problem:

        const int object_type_exclude_viewport = draw_ctx->v3d != NULL ? draw_ctx->v3d->object_type_exclude_viewport : -1;
		if (((object_type_exclude_viewport & (1 << ob->type)) == 0) || (object_type_exclude_viewport < 0)) {
			DST.ob_state = NULL;
			callback(vedata, ob, engine, depsgraph);

I have not sent the commit because I want to know the opinion of @Jeroen Bakker (jbakker)

Antonio Vazquez (antoniov) closed this task as Resolved.Jul 9 2018, 9:56 AM

Fixed by 907dd3d34a2f

Campbell fixed that in 907dd3d34a2f.