OpenGL Render Engine Crash #56940

Closed
opened 2018-09-27 19:30:11 +02:00 by Marcus Papathoma · 11 comments

System Information
Windows 10 x64

Blender Version
Broken: blender-2.80.0-git.6ebe2116446-windows64 from today
Worked: blender-2.80.0-git.c419cb7305f-windows64 from 26.09.2018

Short description of error
When rendering with OpenGL Render Engine Blender Crashes

Exact steps for others to reproduce the error
Open Blender
Switch the Render Engine from Eevee to OpenGL
Hit Crtl+F12 or use the Menu > Render > Render Animation
Blender Crashes

**System Information** Windows 10 x64 **Blender Version** Broken: blender-2.80.0-git.6ebe2116446-windows64 from today Worked: blender-2.80.0-git.c419cb7305f-windows64 from 26.09.2018 **Short description of error** When rendering with OpenGL Render Engine Blender Crashes **Exact steps for others to reproduce the error** Open Blender Switch the Render Engine from Eevee to OpenGL Hit Crtl+F12 or use the Menu > Render > Render Animation Blender Crashes

Added subscriber: @machieb

Added subscriber: @machieb

Added subscriber: @antoniov

Added subscriber: @antoniov

I get the error using the last source code at 10:00 CET 28-Sep-2018

The error is because v3d is NULL in workbench_render() function in the following line:

const bool deferred = (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0;

I get the error using the last source code at 10:00 CET 28-Sep-2018 The error is because v3d is NULL in workbench_render() function in the following line: > const bool deferred = (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0;

I have done a test and checking to NULL v3d avoid the error in the line above, but there are more error after that:

Function workbench_forward_engine_init()

if (draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) {
I have done a test and checking to NULL v3d avoid the error in the line above, but there are more error after that: Function workbench_forward_engine_init() ``` if (draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) { ```

This fix the problem, but not sure if this is the right way:

diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c
index ca8f06c..f6e352c 100644
--- a/source/blender/draw/engines/workbench/workbench_forward.c
+++ b/source/blender/draw/engines/workbench/workbench_forward.c
@@ -365,11 +365,11 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
 	{
 		float blend_threshold = 0.0f;
 
-		if (draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) {
+		if (draw_ctx->v3d && draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) {
 			blend_threshold = 0.75f - XRAY_ALPHA(wpd) * 0.5f;
 		}
 
-		if (draw_ctx->v3d->shading.type == OB_WIRE) {
+		if (draw_ctx->v3d && draw_ctx->v3d->shading.type == OB_WIRE) {
 			wpd->shading.xray_alpha = 0.0f;
 			wpd->shading.xray_alpha_wire = 0.0f;
 		}
diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c
index 67059da..7b0a648 100644
--- a/source/blender/draw/engines/workbench/workbench_render.c
+++ b/source/blender/draw/engines/workbench/workbench_render.c
@@ -137,7 +137,7 @@ void workbench_render(WORKBENCH_Data *data, RenderEngine *engine, RenderLayer *r
 		return;
 	}
 
-	const bool deferred = (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0;
+	const bool deferred = draw_ctx->v3d ? (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0 : false;
 
 	if (deferred) {
 		/* Init engine. */

This fix the problem, but not sure if this is the right way: ``` diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index ca8f06c..f6e352c 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -365,11 +365,11 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata) { float blend_threshold = 0.0f; - if (draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) { + if (draw_ctx->v3d && draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) { blend_threshold = 0.75f - XRAY_ALPHA(wpd) * 0.5f; } - if (draw_ctx->v3d->shading.type == OB_WIRE) { + if (draw_ctx->v3d && draw_ctx->v3d->shading.type == OB_WIRE) { wpd->shading.xray_alpha = 0.0f; wpd->shading.xray_alpha_wire = 0.0f; } diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c index 67059da..7b0a648 100644 --- a/source/blender/draw/engines/workbench/workbench_render.c +++ b/source/blender/draw/engines/workbench/workbench_render.c @@ -137,7 +137,7 @@ void workbench_render(WORKBENCH_Data *data, RenderEngine *engine, RenderLayer *r return; } - const bool deferred = (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0; + const bool deferred = draw_ctx->v3d ? (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0 : false; if (deferred) { /* Init engine. */ ```

Added subscribers: @fclem, @Jeroen-Bakker

Added subscribers: @fclem, @Jeroen-Bakker

@Jeroen-Bakker @fclem could you take a look?

@Jeroen-Bakker @fclem could you take a look?

This issue was referenced by 29c8c6cf4f

This issue was referenced by 29c8c6cf4f8a6d1af19e9c14517928388ed4926a

Added subscriber: @brecht

Added subscriber: @brecht

The more correct solution is to use wpd->shading, which will contain the shading settings from the 3D view or scene as needed.

The more correct solution is to use `wpd->shading`, which will contain the shading settings from the 3D view or scene as needed.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#56940
No description provided.