Bug 89612 - Endless "BASIC syntax errors" dialogs when saving document with errors
Summary: Endless "BASIC syntax errors" dialogs when saving document with errors
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-24 09:31 UTC by Zarko Zivanov
Modified: 2015-10-07 22:29 UTC (History)
4 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 Zarko Zivanov 2015-02-24 09:31:27 UTC
I'm working a lot with Calc macros in LibreOffice BASIC, and this is something I didn't have before. When I program in LibreOffice BASIC, I usually save often, or set Autosave to a small interval.

In past LibreOffice versions, saving didn't trigger BASIC checking, it would just save the current state. In version I'm using now, every save (manual or automatic) triggers BASIC check, and if there is an error, a dialog with "BASIC Syntax Error" is displayed. If I click on OK (the only button), the dialog just re-appears with the same error and it is not possible to do anything else than to kill LibreOffice, which means that I lose all my work.

This happened to me several times while in the middle of coding something, when Autosave is triggered. Unfinished code generates Syntax error, this in turn generates endless dialogs and all I was working on was lost.

Please, disable BASIC cheking when saving, I cannot develop anything with this, it constantly destroys everything I'm writing (because I must kill LibreOffice).

I know that I can disable macros when opening document, but debugging this way (open document with macros disabled, edit macros, save document, close document, open document again with macros enabled, test, close document, open document with macros disabled, ...) is tiresome.

I don't know if this is a "blocker" category generally, but for sure is a blocker if someone is programming in LibreOffice BASIC.
Comment 1 Cor Nouws 2015-02-24 13:25:50 UTC
Hi Zarko,

(In reply to Zarko Zivanov from comment #0)

> In past LibreOffice versions, saving didn't trigger BASIC checking, it would
> just save the current state. In version I'm using now, every save (manual or
> automatic) triggers BASIC check, ...

I think I've seen that change too, but I think already quite some time??
What is your 'reference version'

> I don't know if this is a "blocker" category generally, but for sure is a
> blocker if someone is programming in LibreOffice BASIC.

It does not block me, but if you're doing piles of just rough stuff that has lots of errors, it will be annoying indeed..

Thanks,
Cor
Comment 2 Zarko Zivanov 2015-02-24 14:18:52 UTC
> I think I've seen that change too, but I think already quite some time??
> What is your 'reference version'
Sorry, I don't know, it was about a year ago.
 
> > I don't know if this is a "blocker" category generally, but for sure is a
> > blocker if someone is programming in LibreOffice BASIC.
> 
> It does not block me, but if you're doing piles of just rough stuff that has
> lots of errors, it will be annoying indeed..
OK, maybe I was unclear in my bug repport, sorry. You don't need a lots of errors, just one. As I said, if I save (or autosave starts) in the middle of coding, when I just didn't finish all the structures (or if I forgot something as simple as End If), my whole work is lost (since the last successful save), no way to save it, no way to copy it somwhere else, nothing. Recovery after that won't work because saving recovery copy triggers the same behaviour.

I'm really not a sloppy programmer, I'm using Calc and its BASIC for work at faculty for 6-7 years, I even contributed to Andrew Pitonyak's macro collection. I just don't understand the logic behind BASIC check while saving. If I'm in the middle of writing some code, when it is still unfinished, it MUST contain syntax errors, until all the structures are written. My instinct is to save often, even unfinished code, and I don't expect that saving my code trigers behaviour that effectively destroys it.

The main problem is that "BASIC syntax error" dialog keeps poping up endlessly. It would be OK if LO just checks once, lets me know that there were errors, and saves the current work.

I hope that I have explained the problem more accurately.
Comment 3 Zarko Zivanov 2015-02-24 14:31:47 UTC
OK, I tried this on a new calc document, wrote a simple unfinished code and it reports the error just once and saves it. What could be the problem in my document? Why it would keep displaying error dialog endlessly? Do you maybe know what to check?
Comment 4 Cor Nouws 2015-02-24 16:18:23 UTC
(In reply to Zarko Zivanov from comment #3)
> OK, I tried this on a new calc document, wrote a simple unfinished code and
> it reports the error just once and saves it. What could be the problem in my
> document? Why it would keep displaying error dialog endlessly? Do you maybe
> know what to check?

Sounds like an event with a macro? But then still, it would end after 6-10 messages? I wouldn't have another idea. Sorry.
Cor
Comment 5 Julien Nabet 2015-02-24 22:19:22 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.

For example, I typed this nonsense in a Basic macro:
Sub Main
print "4";t=;
print '5";a
End Sub

I could save it without error messages.
I tried also the same thing on LO Debian package 4.3.3, no problem too.
Comment 6 stefan.fiedler 2015-03-04 02:29:30 UTC
I have the same problem, and it only occurs if I use a macro with a syntax error in a formula for conditional formatting of cells. Then, when saving the document, the error dialog pops ups in a seemingly endless loop (I assume once for each cell with an invalid formula). If I remove the formulas for conditional formatting the error dialog does not appear.
Comment 7 stefan.fiedler 2015-03-04 02:33:47 UTC
(In reply to stefan.fiedler from comment #6)

I forgot to mention I am using LibreOffice 3.5.4.2 on Debian Linux 7.8 x86.
Comment 8 Julien Nabet 2015-03-04 06:41:57 UTC
(In reply to stefan.fiedler from comment #7)
> (In reply to stefan.fiedler from comment #6)
> 
> I forgot to mention I am using LibreOffice 3.5.4.2 on Debian Linux 7.8 x86.

3.5.4 is old. Please try with a recent LO version, 4.4.1 and 4.3.6 have been released.
If you use Debian packages with stable repo, you can use 4.3.3 from testing repo.
Declaring a bug on a obsolete version is useless.
Comment 9 Zarko Zivanov 2015-03-07 05:41:55 UTC
Can someone tell me, is it possible to debug something like this, and if it is, how? I'd really like to find what is going on.
Comment 10 Julien Nabet 2015-03-29 16:14:50 UTC
Zarko: before debugging, try with a recent LO version (4.3.6 or 4.4.1 are last versions) + brand new profile (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux)
Comment 11 Zarko Zivanov 2015-04-08 07:09:53 UTC
I still haven't managed to try my document on latest LO, but I tried it with LO version 3 (that comes with Ubuntu 12.04) and it worked as expected, no endless dialog messages.
Comment 12 Robinson Tryon (qubit) 2015-10-07 22:29:06 UTC
Dropping Severity -> critical (we've deprecated the 'blocker' value)
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Severity#Severity_Levels

(In reply to Zarko Zivanov from comment #11)
> I still haven't managed to try my document on latest LO, but I tried it with
> LO version 3 (that comes with Ubuntu 12.04) and it worked as expected, no
> endless dialog messages.

I believe Ubuntu 12.04 comes with LibreOffice 3.5.7. That's still a pretty old version, but at least it's working there, so I'm going to mark this as RESOLVED WORKSFORME, as it sounds like there's a version of LibreOffice available that fixes the data loss.