Bug 97190 - BaseURL assertion when using Import MathML from clipboard
Summary: BaseURL assertion when using Import MathML from clipboard
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: high major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-16 16:45 UTC by V Stuart Foote
Modified: 2016-10-25 19:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
drror dialog when importing MathML formula from clipboard (15.39 KB, image/png)
2016-01-16 16:46 UTC, V Stuart Foote
Details
WinDbg stack trace when receiving error (35.47 KB, text/plain)
2016-01-16 16:52 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2016-01-16 16:45:28 UTC
Receive an error dialog when using the new Tool -> Insert MathML from clipboard feature. Screen clip and a WinDbg ST attached.
Comment 1 V Stuart Foote 2016-01-16 16:46:51 UTC
Created attachment 122002 [details]
drror dialog when importing MathML formula from clipboard
Comment 2 V Stuart Foote 2016-01-16 16:52:11 UTC
Created attachment 122005 [details]
WinDbg stack trace when receiving error

When dialog presents-- the Abort will close/recover document. Ignore allows formula saved to clipboard from MS Math Input Panel to be written.

Program: C:\LODev520_x86_20160113_TB39\program\smlo.dll
File: C:/cygwin/home/tinderbox/master/star.../mathmlimport.cxx
Line: 145

Expression: !baseURI.isEmpty()
Comment 3 V Stuart Foote 2016-01-16 16:54:11 UTC
@Regina ?
Comment 4 Regina Henschel 2016-01-16 21:34:21 UTC
@ V Stuart Foote: Can you please describe, what you have done. Which Windows do you use?

I have used LibreOffice
Version: 5.2.0.0.alpha0+
Build ID: e413549dc8b5669a806eeabc30c7d6f92723a882
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-28_23:26:49
Locale: de-DE (de_DE)
on Windows 7.
I do not get an assertion, when I use the Math Input Panel.

@ Michael, you have introduced this assert. I have no idea why it was necessary. It is http://cgit.freedesktop.org/libreoffice/core/commit/?id=291f55edf3d5c1d443cbd9a06bc6f7fd773884e5
Comment 5 V Stuart Foote 2016-01-17 00:08:06 UTC
On Windows 10 Pro 64-bit en-US with
Version: 5.2.0.0.alpha0+
Build ID: c71b5b4d2ec76c0a204f9515dece1e0e0689ce3c
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-13_00:15:52
Locale: en-US (en_US)

Open the Math Input Pannel in Windows and enter the sample formula as from the 5.1.0 Release notes. Ignore the error dialog, and filter import of the MathML insert results in StartMath text of:

{ sum csub {{ "." i} = 1} csup n i^2}

Or, with 
Version: 5.1.0.2 (x64)
Build ID: ecd3574d51754b043f865cf5bafee286d24db7cc
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
Locale: en-US (en_US)
on the same system get the same MathML conversion to StartMath ML, but no Assert error.
Comment 6 Buovjaga 2016-01-25 08:36:03 UTC
Repro.

In Formula editor - Tools - Import MathML from clipboard.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 6b65a0e83c4798f117be61af91dbaebdc85e94b7
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-21_03:41:08
Locale: fi-FI (fi_FI)
Comment 7 Michael Stahl (allotropia) 2016-02-03 13:24:29 UTC
sorry about that, the problem that these assertions were trying to discover in all applications is that a missing base URL means we can't convert relative URLs in the document to absolute URLs, but that seems to be a non-issue with Math currently, especially if you insert from the clipboard.

also, i hope the automated import/export tests have found all cases that trigger these assertions by now anyway.

so disabling the Math assertion, fixed on master.
Comment 8 Commit Notification 2016-02-03 13:25:49 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4a2824e72aae407f5f2a86e6ef45278ef864d437

starmath: tdf#97190: don't assert on missing base URL

It will be available in 5.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.