Bug 118107 - Assertion failure when playing Fade in and Swivel animation (with OpenGL)
Summary: Assertion failure when playing Fade in and Swivel animation (with OpenGL)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.1
Keywords: haveBacktrace
Depends on:
Blocks: VCL-OpenGL Assert Custom-Animations
  Show dependency treegraph
 
Reported: 2018-06-11 04:19 UTC by Aron Budea
Modified: 2018-08-01 16:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace (4.02 KB, text/plain)
2018-06-11 04:19 UTC, Aron Budea
Details
bt with debug symbols on Linux (11.64 KB, text/plain)
2018-06-11 19:11 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-06-11 04:19:33 UTC
Created attachment 142645 [details]
Backtrace

Use a debug build for repro.

- Enable OpenGL rendering.
- Add animation Fade in and Swivel (among Entrance / Special) to a piece of text.
- Play the presentation.

=> When it finishes, there's the following assertion failure:
"Expression: !OpenGLHelper:isVCLOpenGLEnabled()"
assert(!OpenGLHelper::isVCLOpenGLEnabled());
https://opengrok.libreoffice.org/xref/core/vcl/source/outdev/bitmap.cxx

It seems like something wasn't implemented here, as several other animations are unaffected.
Attaching backtrace.

Observed using LO 6.2 master build (565340d457f41197474a75ba1b036bdc3d569041) / Windows 7.
Comment 1 Julien Nabet 2018-06-11 19:11:50 UTC
Created attachment 142662 [details]
bt with debug symbols on Linux

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2018-06-11 21:25:09 UTC
Unwinding a bit, we got an assert because:
we don't enter if bTryDirectPaint block (see https://opengrok.libreoffice.org/xref/core/vcl/source/outdev/bitmap.cxx#661)

659 bool bTryDirectPaint(!pDisableNative && !bHMirr && !bVMirr);

and gdb indicates bHMirr = true (whereas the others are false)

bHMirr = true because
637  const bool bHMirr = aOutSz.Width() < 0; (width = -1)

some frame above in the stack, we find:
    285                     rTargetSurface.DrawBitmapEx( aOutPos, aOutputSize,
    286                                                  BitmapEx( maContent->GetBitmap(),
    287                                                            aAlpha ) );
see https://opengrok.libreoffice.org/xref/core/canvas/source/vcl/spritehelper.cxx#285

To be continued because I should add some traces to be sure.
Comment 3 Miklos Vajna 2018-07-20 12:21:35 UTC
I'll take care of this.
Comment 4 Commit Notification 2018-07-20 13:47:17 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=76b43425d764fbc9bf4dac52054b1d94344f26b0

tdf#118107 canvas opengl: avoid assertion failure with negative widths

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2018-07-27 15:47:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a44843e8e324e00995dd4be0bd3244c85d91bd85&h=libreoffice-6-1

tdf#118107 canvas opengl: avoid assertion failure with negative widths

It will be available in 6.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Aron Budea 2018-08-01 16:38:15 UTC
Verified, thanks for the fix, Miklos!

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 59187f1b539a36ae78bc07aaeebe71cd830317be
CPU threads: 4; OS: Windows 6.1; UI render: GL; 
Locale: en-US (en_US); Calc: CL