Grease Pencil render with Cycles fails #57579

Closed
opened 2018-11-02 10:58:10 +01:00 by Antonio Vazquez · 15 comments

Since an undetermined date, when renders a scene with GP objects with cycles, the GP objects don't appear in the final output.

Doing debug, if you add a break point in for example in DRW_render_object_iter() in GPENCIL_render_to_image() funtion, works.

Nothing has been changed in the render pipeline in the grease pencil code, so something related to multi-threading or something else is the reason of the bug.

Since an undetermined date, when renders a scene with GP objects with cycles, the GP objects don't appear in the final output. Doing debug, if you add a break point in for example in DRW_render_object_iter() in GPENCIL_render_to_image() funtion, works. Nothing has been changed in the render pipeline in the grease pencil code, so something related to multi-threading or something else is the reason of the bug.
Author
Member

Added subscriber: @antoniov

Added subscriber: @antoniov
Author
Member

Added subscriber: @brecht

Added subscriber: @brecht
Author
Member

@brecht Could you take a look?

I did a full debug and the grease pencil code is ran as expected, so not sure what is going on here.

@brecht Could you take a look? I did a full debug and the grease pencil code is ran as expected, so not sure what is going on here.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

ba36e901 was still working, bisecting now...

ba36e901 was still working, bisecting now...
Member

just noticed: first render is often OK (at least for me as of f2873b3ce5), however hitting F12 a second time will fail.

@antoniov : looks like this is caused by 541d07045b [not sure if you want to try to fix yourself?]

just noticed: first render is often OK (at least for me as of f2873b3ce5), however hitting F12 a second time will fail. @antoniov : looks like this is caused by 541d07045b [not sure if you want to try to fix yourself?]
Antonio Vazquez was assigned by Philipp Oeser 2018-11-02 14:45:36 +01:00
Member

I'll assign you first

I'll assign you first
Author
Member

@lichtwerk Yes, better I look at 2nd F12 error before

@lichtwerk Yes, better I look at 2nd F12 error before
Author
Member

@lichtwerk If I render using F12 without change of render engine works all the times.

I only got an error when switch to OPenGL render after doing a render using other engine.

The error is when discard the batch.

32: gpu_context_remove_batch - 0x2474D1A0
31: GPU_batch_vao_cache_clear - 0x24767E70
30: GPU_batch_discard - 0x24767D40
29: gpencil_batch_cache_clear - 0x247FAE60
28: gpencil_batch_cache_get - 0x247FA6D0

Do you know what could be the reason?

I have debug an error in this line of gpu_batch.c (batch->context was NULL)

/* Make sure you are not trying to draw this batch in another context. */
		assert(batch->context == GPU_context_active_get());

image.png

@lichtwerk If I render using F12 without change of render engine works all the times. I only got an error when switch to OPenGL render after doing a render using other engine. The error is when discard the batch. ``` 32: gpu_context_remove_batch - 0x2474D1A0 31: GPU_batch_vao_cache_clear - 0x24767E70 30: GPU_batch_discard - 0x24767D40 29: gpencil_batch_cache_clear - 0x247FAE60 28: gpencil_batch_cache_get - 0x247FA6D0 ``` Do you know what could be the reason? I have debug an error in this line of gpu_batch.c (batch->context was NULL) ``` /* Make sure you are not trying to draw this batch in another context. */ assert(batch->context == GPU_context_active_get()); ``` ![image.png](https://archive.blender.org/developer/F5353690/image.png)
Author
Member

@lichtwerk I don't get the error with F12, but I have seen something that maybe can help us.

If you render with the Display Mode in New Window, does not work, but if you render with Image Editor, works. Does this has sense for you?

@lichtwerk I don't get the error with F12, but I have seen something that maybe can help us. If you render with the Display Mode in New Window, does not work, but if you render with Image Editor, works. Does this has sense for you?

Added subscriber: @fclem

Added subscriber: @fclem

The errors says the batch was created for one OpenGL context but is being freed in another context. When it works the context likely happens to be active from an earlier operation (drawing the window, rendering with Eevee, ..).

@fclem probably has a better idea of how OpenGL contexts are supposed to be activated in this case.

The errors says the batch was created for one OpenGL context but is being freed in another context. When it works the context likely happens to be active from an earlier operation (drawing the window, rendering with Eevee, ..). @fclem probably has a better idea of how OpenGL contexts are supposed to be activated in this case.
Member

@antoniov : can only confirm that rendering to a New Window seems to be the cause (otherwise seems fine as you found), but I havent looked deeper...

@antoniov : can only confirm that rendering to a New Window seems to be the cause (otherwise seems fine as you found), but I havent looked deeper...

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This appears to be working now.

This appears to be working now.
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
3 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#57579
No description provided.