Bug 112466 - Cannot import libreoffice 5.2 basic macro library into libreoffice 5.3
Summary: Cannot import libreoffice 5.2 basic macro library into libreoffice 5.3
Status: RESOLVED DUPLICATE of bug 109381
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3.6.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-09-18 11:37 UTC by Frederic Bron
Modified: 2017-11-07 12:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Bron 2017-09-18 11:37:54 UTC
I created basic libraries that work with LibreOffice Calc 5.2.(7.2). When I import tem in LibreOffice Calc 5.3.6.1. it fails.

1. encrypted libraries: after typing the password, LibreOffice Calc freezes with 100% of CPU. I have to kill it.

2. non encrypted libraries: import works but the modules are empty.

This happens always. Tested with 5.3 on Linux Fedora x86_64 and Windows. Back to 5.2 works.
Comment 1 Frederic Bron 2017-09-18 11:49:11 UTC
I wanted to make a minimal example so I created 2 libraries with 1 module each with a simple Sub inside. One library encrypted, the other not. However when I do that on LibreOffice 5.2, I can read them without any issue with 5.3. So I do not know what's wrong with my macros... My libraries have just Subs and Functions, no dialogs.
Comment 2 raal 2017-09-18 19:21:56 UTC Comment hidden (obsolete)
Comment 3 Frederic Bron 2017-10-15 17:13:56 UTC
OK, I have found something to reproduce the bug. Apparently it is not related to the encrypted macros:

Tools/Macros/Manage macros/Libreoffice Basic.../Manage.../Libraries/New...
Type Library1 as name
Then click on Edit

and replace
"Sub Main

End Sub"

By

Option Explicit
Option Base 0

Private Function foo(dates() as Double, amounts() as Double, dateN as Double, day_q as Double) as Double
	foo=0#
	Dim k as Long
	For k=0 To UBound(dates())
		If amounts(k)<>0. Then
			foo=foo+amounts(k)*day_q^(dateN-dates(k))
		End If
	Next
End Function

If you have time, you can click Save. Otherwise, it will be the same: this makes libreoffice use 100% of CPU forever.
Comment 4 Frederic Bron 2017-10-19 04:48:21 UTC
These are the versions on F25 where the macros work:
- kernel: x86_64, 4.12.14.200.fc25
- java-1.8.0-openjdk: x86_64, 1.8.0.144.7.b01.fc25
- libreoffice: x86_64, 5.2.7.2.12.fc25

Versions on F26 where the macros do no work:
- kernel: x86_64, 4.12.14.300.fc26
- java-1.8.0-openjdk: x86_64, 1.8.0.144.7.b01.fc26
- libreoffice: x86_64, 5.3.6.1.6.fc26
Comment 5 raal 2017-10-19 20:53:34 UTC
This seems to have begun at the below commit.
Adding Cc: to Eike Rathke; Could you possibly take a look at this one? Thanks
 2541ab7f82d0b51b11086a3cd3d8a387b02ae3c6 is the first bad commit
commit 2541ab7f82d0b51b11086a3cd3d8a387b02ae3c6
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Jul 8 19:18:12 2016 -0700

    source 9a6527a98fb968b3fe6bc293ff7520a9480d43d0
author	Eike Rathke <erack@redhat.com>	2016-06-27 19:54:59 (GMT)
committer	Eike Rathke <erack@redhat.com>	2016-06-27 19:57:52 (GMT)
commit 9a6527a98fb968b3fe6bc293ff7520a9480d43d0 (patch)
tree 69e8bc1768eca1dcd4fcf783f799e122a2e47a54
parent 1511f5c399182c003c19cc18b316f2fdaac0501d (diff)
stringToDouble() do not parse separator without digit as 0.0
Comment 6 Frederic Bron 2017-11-03 21:15:20 UTC
Anything I can change in my macros to make it work? I am completely blocked with no macros working.
Comment 7 Katarina Behrens (Inactive) 2017-11-07 12:35:41 UTC

*** This bug has been marked as a duplicate of bug 109381 ***
Comment 8 Frederic Bron 2017-11-07 12:39:58 UTC
Thanks a lot. At least, I now have a way to make it work by changing my macros.