Apache OpenOffice (AOO) Bugzilla – Issue 127646
Base crashes with macro autoexec
Last modified: 2020-10-11 20:34:59 UTC
Created attachment 86312 [details] Database with macro autoexec Can anyone test this macro inserted as autoexec in a Base file? With version 4.1.5 on Mac, it crashes Base at each boot. With version 4.1.3 on Mac it works regularly. With version 4.1.5 on Windows 7 it works regularly. With version 4.1.5 for on Linux (Ubuntu 64 bit) it works regularly. REM ***** BASIC ***** Sub autoexec Dim InteractionHandler As Object InteractionHandler = createUnoService("com.sun.star.sdb.InteractionHandler") ThisDatabaseDocument.CurrentController.connect("","") ThisDatabaseDocument.FormDocuments.getByName ( "Formulario1" ).open End Sub
I confirm the issue also on Mac 4.1.4.
What is your setup? Empty file? Have you content?
(In reply to Peter from comment #2) > What is your setup? > Empty file? Have you content? It is not a problem of database content or set up, but it happens if in Tools > Customize > Events > Open document there is an autoexec macro that opens a form automatically. It happens also with this macro (that isn't mine, I found it in AOO Italian Forum): REM ***** BASIC ***** Sub AutoExec On Error Goto HandleError Dim LastFrame As Object Dim NumFrames As Integer Static FormDocs As Object Dim DBDoc As Object Dim ImpName As String Dim DataSource As Object Dim Conn As Object Dim Args(1) As New com.sun.star.beans.PropertyValue Dim FormName As String Dim FormDoc As Object FormName="Riepilogo" REM CHANGE TO YOUR FORM NAME ImpName="com.sun.star.comp.dba.ODatabaseDocument" NumFrames=StarDesktop.Frames.Count LastFrame=StarDesktop.Frames.getByIndex(NumFrames-1) If LastFrame.Frames.Count>1 Then Exit Sub End If If Not (LastFrame.Controller.Model.ImplementationName=ImpName) Then Exit Sub REM not a db doc End If DataSource=LastFrame.Controller.DataSource DBDoc=DataSource.DatabaseDocument FormDocs=DBDoc.FormDocuments Conn=DataSource.getConnection("","") REM no user/password Args(0).Name="ActiveConnection" : Args(0).Value=Conn if FormDocs.hasByName(FormName) Then FormDoc=FormDocs.loadComponentFromURL(FormName,"_self",2,Args() ) FormDoc.CurrentController.Frame.ContainerWindow.setFocus() End If HandleError: If Err<>0 Then Exit Sub End If End Sub
Created attachment 86314 [details] Another file with autoexec macro
I don't get you. Is the form the macro is looking for available or not? I do not think it is a problem of autostart but of condition that the document does not provide the information it is looking for. However it should not crash. Please let's focus on your script first. Then we can check if the other scripts are the same issue or another one.
(In reply to Peter from comment #5) > I don't get you. Is the form the macro is looking for available or not? > > I do not think it is a problem of autostart but of condition that the > document does not provide the information it is looking for. > However it should not crash. > > Please let's focus on your script first. Then we can check if the other > scripts are the same issue or another one. It is not a script problem (see my second attach, different from the first). The searched form is always available. I repeat that only with AOO 4.1.5 and 4.1.4 on Mac (Sierra 10.12.6 is my o.s.)an autoexec macro registered in Tools > Customize > Events > Open document causes Open Office to crash on startup. The same files with the same macros works well with Mac AOO 4.1.3 (yes 4.1.3). The same files with the same macros works well with Windows 7 AOO 4.1.5. The same files with the same macros works well with Linus AOO 4.1.5. Did you try my files on your o.s.? Which is your o.s.? Thanks.
One of the types of change between 4.1.3 and 4.1.4 is to add throw an exception if parsing certain forms of corrupt input file that could cause access beyond allocated memory. An over-detection error in that code could cause crashes in 4.1.4 and 4.1.5 on files that are accepted in 4.1.3 and earlier. However, it is in code that is used for all operating systems, so if it were that I would expect 4.1.5 to crash on Windows and Linux as well as Mac.
Confirmed by users on french forum This regression is MacOS system only
Information from the French AOO forum: the problem is confirmed with High Sierra 10.13.2; instead it does not happen with El Capitan 10.11.x.
But El Capitan is an old o.s. ....
Created attachment 86315 [details] Crash on macOS 10.12.6 Macro security is Medium. JRE is Oracle 1.8.0_151
Everybody that reported this issue could to test future 4.2.0 dev-build? http://home.apache.org/~jim/AOO-builds/4.3.0-dev-r1827250/ And give feedback about it.
Hi, Just tested a data base filed on the french forum : https://forum.openoffice.org/fr/forum/viewtopic.php?p=310906#p310906 After opening and macros enabling, OpenOffice 4.2 crashes. Without macros enabling : no crash. Regards
Is there something new about this problem ? It's a big trouble for mac users...
I am sorry, not that I know of. I will have a look in the next 2 weeks. But I am learner. So don't expect to much
Thanks Peter, I hope you will success
Also in development version 4.1.6 the problem remains
we did not fix anything in this direction. So no surprise that there is no change. This issue needs more deeper analysis.
Unfortunately I have to confirm this issue with v. 4.1.6 RC1 (osMac 10.12.6)
Hi, Problem remains with 4.1.6 final (MacOS 10.13.6) Rgds
Is there any other info available other than it crashes? Is there a log in ~/Library/Logs/CrashReporter or ~/Library/Logs/DiagnosticReports
Created attachment 86631 [details] Crash automatic report
(In reply to Jim Jagielski from comment #21) > Is there any other info available other than it crashes? Is there a log in > ~/Library/Logs/CrashReporter or ~/Library/Logs/DiagnosticReports I attached a report
Thanks for the efforts for solving this issue, preventing the update of Java software... jpc4
Closing as fixed due to ommment #24
Sorry to contradict comment#25 : to my knowledge, the problem is not fixed. My comment #24 has been misunderstood, probably due to my poor english. I wanted to say : thanks in advance to those who will solve this issue, which actually prevents to update Java :-( jpc4
Reopened according to comment #26. Can you try with AOO 4.1.7? Some code for Java detection was changed, but I doubt that it fixes the problem. In which way does this issue prevent you from updating Java?
Maybe the 2 issues are not linked. Regarding Java, there is a notification on the document attached to the release of AOO 4.1.7 informing of a well-know bug : attached screenshot. /Users/JPC/Desktop/Capture d’écran 2019-10-14 à 14.09.36.png I have downloaded AOO 4.1.7 and will try it. I'll keep you informed.
Created attachment 86749 [details] Screenshot Notification concerning a Java bug on macOS system.
Hi, Config : AOO 4.1.7 / macOS 10.15. / JDK 8-u201 + JRE 8u-221 I checked the document joined by charlie.it on 2018_01_06 21:04:38 (first post) with all AOO and OS versions since 10.13.6. 10.14.1,2,3,4,5,6 until 10.15 today. No change : No macros : no crash. With macros : crash For your information : Same results on LibO Regards
Tested with AOO 4.1.7 os 10.14.6 (Mojave) : crash confirmed with macros.
(In reply to jpc4 from comment #29) > Created attachment 86749 [details] > Screenshot > > Notification concerning a Java bug on macOS system. Thanks, but my French is not good enough to understand the translation. ;-) Looking at the English Release Notes, there is nothing that speaks against updating Java. Some people might need to install legacy Java 6 additionally, some people reported that even Java 11 was detected without a problem. BTW: AOO 4.1.7 can now use AdoptOpenJDK [1] It would be nice if someone could test it on macOS. [1] https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=hotspot#x64_mac
It seems that the Java bug notified on the french release of AOO has been solved since I could install its last update (Java 8_221), while my data base on AOO 4.1.3 with macro autoexec still works. But crash with AOO 4.1.7 as mentioned earlier.
I confirm that my attached file causes crash with macOS (Sierra 10.12.6) version AOO 4.1.7 - Java 8_221. Regards.
*** Issue 128248 has been marked as a duplicate of this issue. ***
Hi, No change with macOS 10.15.2 and Adoptopenjdk-8jre / 1.8.0_232 Rgds
(In reply to tintin60 from comment #36) > Hi, > > No change with macOS 10.15.2 and Adoptopenjdk-8jre / 1.8.0_232 > > Rgds Confirmed, same try, failed. Had to go back to OO 4.1.3
Confirmed with 4.2.0-DEV: still occurs.
Hi, No change with macOS 10.15.7 and AOO 4.1.8 Rgds
(In reply to tintin60 from comment #39) > Hi, > > No change with macOS 10.15.7 and AOO 4.1.8 > > Rgds AOO 4.1.8 is not released yet. If you tested with AOO418-RC2 be more specific. Thank you!
Created attachment 86979 [details] Launch&crash
(In reply to tintin60 from comment #41) > Created attachment 86979 [details] > Launch&crash I apologize. I took advantage of the availability of AOO 4.1.8-RC2. The test was therefore performed with AOO 4.1.8-RC2 on macOS 10.15.7 and 10.13.6 under the same conditions as above with the file uploaded by charlie.it: attachment 86312 [details]. The file opens without activating the macros . But as soon as the macros are activated, OpenOffice crashes.