Page MenuHome

Bug: grease pencil objects cause command-line render to fail (2.82,2.90)
Closed, ArchivedPublic

Description

System Information
Operating system: Ubuntu Server 18.04.4 LTS
Graphics: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
CPU: Intel(R) Pentium(R) CPU G3220 @ 3.00GHz
Memory: 4GB DDR3

Blender Version
Broken:
2.82a headless built from Git (https://git.blender.org/blender.git)
2.90 headless built from Git (https://git.blender.org/blender.git)
2.82a portable build (https://www.blender.org/download/Blender2.82/blender-2.82a-linux64.tar.xz/)
2.90 portable build (https://builder.blender.org/download/blender-2.90-55a2682348df-linux64.tar.xz)

Short description of error
Rendering anything with a Grease Pencil object from the command line fails
On headless builds, produces a crash file and “Segmentation fault” message after a single frame has ‘Finished’ rendering
On full portable builds, produces a “Unable to open a display" and "Aborted” message after a single frame has ‘Finished’ rendering

Exact steps for others to reproduce the error
To build the headless blender, follow the steps on https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu, inserting:

git checkout blender-v2.82-release

or

git checkout blender-v2.90-release

directly after

git clone https://git.blender.org/blender.git

and using

make headless

in place of

make

Using the following .blend file, which only contains a single Grease Pencil object (plus light and camera), and set to use Cycles


run:
For full portable blender:

sudo ./blender -b -noaudio /”path to .blend file”/render-fail.blend -o /”path for output file”/render-fail -f 1

or for headless build:

sudo ./blender /”path to .blend file”/render-fail.blend -o /”path for output file”/render-fail -f 1

In all circumstances when rendering the files with Grease Pencil objects, the render completes but does not save. For headless built versions, it prints the error “Segmentation fault” and a crash report


For portable full versions, it prints the error “Unable to open a display” then “Aborted” without a crash report

Thanks for your help!

Event Timeline

For portable full versions, it prints the error “Unable to open a display” then “Aborted” without a crash report

Then I suppose it would crash for even default cube. After the render is complete, the app icon appears in the dock & goes back. So there seems to be a problem with opening Blender at that time ? (though I'm using make since I got a linking error in headless. )

Then I suppose it would crash for even default cube.

Default cube should render and does for me, it seems to only fail on renders with Grease Pencil objects. It doesn't show those errors for

After the render is complete, the app icon appears in the dock & goes back. So there seems to be a problem with opening Blender at that time ?

With the -b and -noaudio arguments used, Blender should never try to open and that's the issue with full builds. It's trying to open graphical blender but isn't allowed to nor told to.

(though I'm using make since I got a linking error in headless. )

I also had an error initially in headless that I thought was fixed by using make update but you may have to edit the CMakeCache.txt file and enable headless through there and then do make update and make help to list the available build types.

Headless OpenGL rendering with a regular build and OpenGL rendering with a headless build are not currently supported. Both Eevee and Grease Pencil use OpenGL and so will not work in those cases.

It would be good to print more informative error messages about this.

There is some information on how to work around this limitation here (for regular builds, not headless):
https://devtalk.blender.org/t/blender-2-8-unable-to-open-a-display-by-the-rendering-on-the-background-eevee/1436/12

The file is set to use Cycles though - not Eevee. When using Eevee, the render stops before any rendering begins. I also tested using the -E argument to set the engine to Cycles and a workaround for the issue discussed in https://devtalk.blender.org/t/blender-2-8-unable-to-open-a-display-by-the-rendering-on-the-background-cycles/8607/12, using a python script to set every scene to use Cycles.

Do Grease pencil objects require OpenGL when using Cycles, therefore headless rendering of them is not supported?

Are there plans to support headless rendering of Grease Pencil objects?

I'm not very experienced in Blender, but I'm using this to build a render farm as a project for my school which is to be used by others. I would prefer to use headless builds as there won't be monitors on the nodes of the farm, but I could use desktop Linux and therefore follow the steps on https://devtalk.blender.org/t/blender-2-8-unable-to-open-a-display-by-the-rendering-on-the-background-eevee/1436/12 if headless support is not available in the near future.

Grease Pencil always requires OpenGL. We would like to support headless rendering, and if we do it would be for both Eevee and Grease Pencil.

T54638: OpenGL headless rendering is the task for that, but it's not high priority at the moment, so it will likely be a while before it happens.

Ankit Meel (ankitm) closed this task as Archived.Apr 25 2020, 7:50 AM
Ankit Meel (ankitm) claimed this task.

Closing as Feature Request. @Daniel (Majestic) you may subscribe there to get updates, if any.

Headless OpenGL rendering with a regular build and OpenGL rendering with a headless build are not currently supported. Both Eevee and Grease Pencil use OpenGL and so will not work in those cases.

It would be good to print more informative error messages about this.

Hi Brecht, I know this is not the proper place for feature requests but...

Please, please add a proper and more informative error message in the log.

It would have saved me a lot of headache :)