ID 284323 - Flattening or exporting channels may crash Mari if a mask stack contains an empty paintable layer

Follow

Problem summary
Flattening or exporting channels may crash Mari in extreme circumstances if a mask stack contains an empty paintable layer.

Customer reported version
3.3v1
Customer reported platform
centos7

Steps to reproduce

1) Open the affected archive

Two options:
2) Right click on the Mask Stack and select 'Flatten Mask Stack'.

3) Crash

OR


2) Right click on the diffuseColor channel and select 'Export Channel Flattened'

3) Crash

Workaround
Note that if you remove the layer Group.Mask from the Mask stack, you are able to complete these issues.
You can isolate this issue by attempting to export the single layer where the following error appears:



To work around this you will need to remove this layer and ensure that there are no empty layers.

Reproduced by support
3.3v1, 3.2v1, 3.1v3, 3.1v1, 3.0v4, 3.0v1, 2.6v5
Windows 7, CetnOS6, OSX 10.12.4

*Earliest version tested: 2.6v5*
Not tested further back 

Expected behaviour
The mask stack should flatten without crashing and the channel should export without crashing.

Actual behaviour
Both methods caused Mari to crash and force quit on all applications.

    We're sorry to hear that

    Please tell us why