Crash with transform filter
Rafal Lalik
rafallalik at gmail.com
Sun Jul 5 22:15:31 BST 2020
Hi,
I have a weird problem with transform filter. After applying it to an
image, the playback causes abortion of kdenlive. i am able track the
problem back to mlt.
MWE is a project with still image (jpg).
1. Add an image to the track
2. Add transform effect
3. Try to play the clip in the timeline.
For me the kdenlive crashes every time.
I tried that with 20.04.2 and the git master. My mlt is 6.20.0.
From what I was able to find is that the QPainter in filter_qblend.cpp
receives at some point width,height = 0,0, and QPainter fails with error:
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setCompositionMode: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
QPainter::setOpacity: Painter not active
QPainter::end: Painter not active, aborted
in this code (I added my comments to highlight problematic places):
uint8_t *dest_image = NULL;
dest_image = (uint8_t *) mlt_pool_alloc( image_size );
QImage destImage;
// width, height here is (sometimes) 0,0
convert_mlt_to_qimage_rgba( dest_image, &destImage, *width, *height );
// destImage has size of 0x0
destImage.fill( mlt_properties_get_int( properties, "background_color" ) );
QPainter painter( &destImage );
painter.setCompositionMode( ( QPainter::CompositionMode )
mlt_properties_get_int( properties, "compositing" ) );
painter.setRenderHints( QPainter::Antialiasing |
QPainter::SmoothPixmapTransform );
painter.setTransform(transform);
painter.setOpacity(opacity);
// painter breaks after trying painting on image 0x0
painter.drawImage(0, 0, sourceImage);
what is followed with bad image in destImage and an assertion fail from
following code inside:
convert_qimage_to_mlt_rgba( &destImage, dest_image, *width, *height );
ASSERT: "mImg == qImg->constBits()" in file common.cpp, line 63
I was not able to find why width,height are equal to 0,0
Do you have any idea how to trace back the problem to its source?
Regards,
RafaĆ
More information about the kdenlive
mailing list