This bug was filed from the crash reporting server and is br-cc4f9d91-0fb0-4372-9cbd-933b40a8269e. ======================================= Basic macro caused this error. I believe there is simply an un-balanced if/endif. That is, a missing endif.
Would it be possible you attach the file to allow us to reproduce this?
Created attachment 136156 [details] basic macros Attached is the file ("basic macros" causing the bug: It consists of 2 macro 'sets'. The first is "sDoc" (secure Documents). It goes from line 1 to line 1125. It's purpose is to suggest Save/File to the S: disk. It has been in use for a long time with no problems. I added the "PoolColSort" (lines 1126-1365) macro recently, and if you comment out line 1350 (the "endif") (which I inadvertently left out) and hit the "Compile" button, the compiler will loop forever or possibly crash (I'm no longer sure which is the case). Good luck
In Version: 5.4.1.2 Build ID: 1:5.4.1~rc2-0ubuntu0.17.04.1~lo0.1 CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group if I remove the endif in line 1350 I get this error when I try to run the macro: BASIC syntax error. Statement block still open: End Sub missing. Could you please attach the whole document instead of only the macro...
Created attachment 136171 [details] Document loaded when error occurs. This is the document that's loaded when the PoolColSort macro is being editted/compiled
Calc document attached
So, how do I reproduce the crash? In the document attached, the endif is gone, and if I add it and run it, it doesn't crash. BTW, do you reproduce the crash systematically?
1. The 'endif' IS present in the file. It's just above the comment line: ' add majority pick to column header 2. The problem is reproduceable on my machine. 3. To reproduce: Load spreadsheet into LO. Click Tools / Macros / Organize Macros / LibreOffice Basic. Expand My Macros / Standard. Click New. Remove "sub Macro1...end sub" text. Load my .BAS file. Comment-out line 1350 ("endif"), Hit Compile button. Result: My machine hangs for about 15 seconds, then crashes. Paul
Are you able to reproduce this? Paul
(In reply to PaulJayD from comment #7) > 1. The 'endif' IS present in the file. It's just above the comment line: > > ' add majority pick to column header > > 2. The problem is reproduceable on my machine. > > 3. To reproduce: > > Load spreadsheet into LO. > Click Tools / Macros / Organize Macros / LibreOffice Basic. > Expand My Macros / Standard. > Click New. > Remove "sub Macro1...end sub" text. > Load my .BAS file. > Comment-out line 1350 ("endif"), > Hit Compile button. > > Result: My machine hangs for about 15 seconds, then crashes. > > Paul Hi Paul, I've followed all your steps, and when I compile the code i still get the same error: BASIC syntax error. Statement block still open: End Sub missing. Version: 6.0.0.0.alpha1+ Build ID: b73c66597884f03443ee8888cb6c204b78bb6cda CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group nor in Version: 6.0.0.0.alpha1+ Build ID: a7f961ddd88df4117de5f7c199881cf75d2905b5 CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: x11; Locale: ca-ES (ca_ES.UTF-8); Calc: group
Paul: could you give a try to 5.4.3 + use a brand new LO profile (see https://wiki.documentfoundation.org/User_Profile#Windows) Perhaps it could be already fixed?
I want to close this bug. I can reproduce it, however, it's clearly the unbalanced if/endif and all the code accompanying it.
I didn't try to repro it (just came across), but what I wanted to tell is even if it's a crash related to unbalanced if/endifs, such crashes should be fixed (if reproducible), because user errors should be reported as messages, not crash software.