Description: Trying to use the texmaths extension makes LibO 7.2RC1 crash. From my understanding there is no guarantee for extensions to keep working when a new major release of LibO comes out because some interfaces may be changed or removed. Still, an extension should never make the whole application crash, IMHO. Steps to Reproduce: 1. Install the texmaths extension 2. Assure that you have LaTeX installed (e.g. via the TexLive or some other TeX distro or through your linux distribution, etc.) 3. Properly configure texmaths so that it can find the required LaTeX components (i.e., set up the paths of LaTeX, XeLaTeX, dvipng, dvisvgm correctly) 4. Start up draw or impress (but writer should also work) 5. Press the button to insert a texmath equation 6. Write x (the letter x) as the expression 7. Press the LaTeX or XeLaTeX button Actual Results: Libreoffice crashes Expected Results: Libreoffice should not crash. It can be acceptable for the extension to misbehave (the extension may need porting to the new major version of LibO), but the application should not crash. Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: DrawingDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes
Would it be possible you attach a backtrace or do you know another extension with this same pb? Indeed, I had tried once to install LaTeX, it's quite a big new world when you nothing about it like me.
Unfortunately at this time I do not know of other extensions crashing in the same way. What is it needed to get a backtrace? For what concerns LaTeX, it can be rather large to install. Easiest is if you are on a Linux distro, where you can probably just install some package test and then remove it. Alternatively texlive lets you do a completely "portable" install. In any case, I'll try to contact the texmaths author who may be able to identify what is specifically disliked of the extension con in LibO 7.2.
[Automated Action] NeedInfo-To-Unconfirmed
(In reply to sergio.callegari from comment #2) > ... > What is it needed to get a backtrace? >... Sorry, I had forgotten to provide the link: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace
On pc Debian testing updated today x86-64 with master sources updated today too, I've installed texlive and dvipng + TexMaths 0.49 from https://extensions.libreoffice.org/en/extensions/show/texmaths-1, then I've given a try, no crash with gtk3, gen or kf5 rendering. On console, I've noticed these logs: warn:configmgr:122277:122277:configmgr/source/xcuparser.cxx:159: bad set node <prop> member in "file:///home/julien/lo/libreoffice/instdir/program/../program/../user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/lu4mvsa.tmp/Addons.xcu" warn:configmgr:122277:122277:configmgr/source/xcuparser.cxx:904: ignoring modify of unknown set member node "ToolBarItems" in "file:///home/julien/lo/libreoffice/instdir/program/../program/../user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/lu4mvsa.tmp/Addons.xcu" warn:configmgr:122277:122277:configmgr/source/xcuparser.cxx:159: bad set node <prop> member in "file:///home/julien/lo/libreoffice/instdir/program/../program/../user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/lu4mvsa.tmp/Addons.xcu" warn:configmgr:122277:122277:configmgr/source/xcuparser.cxx:904: ignoring modify of unknown set member node "ToolBarItems" in "file:///home/julien/lo/libreoffice/instdir/program/../program/../user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/lu4mvsa.tmp/Addons.xcu" ... warn:stoc:122277:122277:stoc/source/inspect/introspection.cxx:1612: object of type "com.sun.star.awt.XTopWindowListener" lacks XTypeProvider warn:stoc:122277:122277:stoc/source/inspect/introspection.cxx:1612: object of type "com.sun.star.awt.XWindowListener" lacks XTypeProvider warn:stoc:122277:122277:stoc/source/inspect/introspection.cxx:1612: object of type "com.sun.star.awt.XWindowListener" lacks XTypeProvider for gtk3 specifically: (soffice:122277): Gtk-CRITICAL **: 11:14:31.596: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed (soffice:122277): Gtk-CRITICAL **: 11:14:31.619: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed (soffice:122277): GLib-GObject-WARNING **: 11:14:33.281: invalid (NULL) pointer instance (soffice:122277): GLib-GObject-CRITICAL **: 11:14:33.281: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed (soffice:122277): GLib-GObject-WARNING **: 11:14:33.281: invalid (NULL) pointer instance
Created attachment 173714 [details] Basic code for function in TexMaths that crashes LO 7.2 (at line 189)
Hi, I am the author of the TexMaths extension. I was able to isolate the line that crashes LO 7.2: oDispatcher.executeDispatch( oDrawDocCtrl.Frame, ".uno:ChangeBezier", "", 0, Array() ) This line 189 of the attached file ImportGraphicIntoTexMaths.bas. Please note that this line worked in LO 7.1.x.
(In reply to Roland Baudin from comment #7) > Hi, > > I am the author of the TexMaths extension. I was able to isolate the line > that crashes LO 7.2: > > oDispatcher.executeDispatch( oDrawDocCtrl.Frame, ".uno:ChangeBezier", "", 0, > Array() ) > > This line 189 of the attached file ImportGraphicIntoTexMaths.bas. > > Please note that this line worked in LO 7.1.x. I dond't know if it's the same pb as Serge's one but I copied pasted the code in a brand new file, brand new macro. Then I runned the macro and had: at line 21 "cURL_ = cURL" this error message box: "BASIC runtime error. Argument is not optional." Would it be possible you attach a minimum example file so when just running the macro we can reproduce the crash?
Created attachment 173724 [details] Minimal macro + svg file
I have attached a complete example. To reproduce the crash: 1. Download Test.zip and unzip it 2. Copy the Test.bas macro in Module1 and edit the line: cURL = "file:///home/test/tmpfile.svg" to reflect the path to tmpfile.svg. 3. Run the Test macro in LO 7.2 => LO 7.2 crashes 4. Set the variable Group to FALSE at line 11 => LO 7.2 does not crash 5. When the variable Group is set to TRUE, the following code is executed (lines 31-39): Dim oShapes as Variant oShapes = createUnoService("com.sun.star.drawing.ShapeCollection") Dim i as Integer For i = 0 To oDrawPage.getCount()-1 oShapes.add(oDrawPage.getByIndex(i)) Next oDrawPage.group(oShapes) and then LO 7.2 crahes at line 60: oDispatcher.executeDispatch( oDrawDocCtrl.Frame, ".uno:ChangeBezier", "", 0, Array() ) If you set a breakpoint at this line, you will see the Draw document that is opened and you can check that the graphic elements are grouped, as desired. There is no crash in LO 7.1.
I do reproduce it with the svg and the bas script provided in attachment 173724 [details] Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=2ec1dab4693cd45b475f02452114dd96ec0bda1b author Noel <noel.grandin@collabora.co.uk> 2021-02-02 13:24:24 +0200 committer Noel Grandin <noel.grandin@collabora.co.uk> 2021-02-02 16:02:29 +0100 commit 2ec1dab4693cd45b475f02452114dd96ec0bda1b (patch) tree 789e865957c27936d3528989147f182c7a565c20 parent ebf4e535864f98f3b32799596ae16b752132da0a (diff) use unique_ptr in SdrEditView::ImpConvertOneObj Bisected with: bibisect-linux64-7.2 Adding Cc: to Noel Grandin
Created attachment 173725 [details] SVG file Actually the problem is in convert Obj. Steps: 1. Open attached svg file 2. Select it 3. Convert to Curve 4. Convert to Polygon -> Crash
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/58c6fad213024ef8f162984a66af565ac9ad4b97 tdf#143412 CRASH: converting images It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/29df92dc04897796aa47815989c51f59975607fb tdf#143412 CRASH: converting images It will be available in 7.2.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Unittest added for this issue in https://git.libreoffice.org/core/+/d1099ec6220e098b9d7e263c9b7f873997ea9e30%5E%21