Am I the only one with Err 522 problems?

A few spreadsheets of mine, those with a lot of formulas with
references to other cells, sometimes (or rather often in some cases)
throw error 522 (circular reference) at me.
In most cases, Ctrl+Shift+F9 cures the problem. Another way is to look
for the first Err 522 occurance, highlight it, Ctrl+c, then Ctrl+v at
the same cell.

Did anyone else see those false Err 522 messages?
I have seen them for quite a while now, for years, I think. I use
LibreOffice 3.6.5.2 at the moment.

Johnny Rosenberg

Hi :slight_smile:
Are you sure the circular reference errors really are false?
Regards from
Tom :slight_smile:

Another problem with that sheet is that everything takes unbelievable
long time. If I enter something in a cell, then hit Enter, I need to
wait for something like a minute (yes, minute! Not second!) or two
before anything happens, so the whole sheet is just a waste of time.

Today I installed LibreOffice 3.6.6, but my problems with that file persists.
The Ctrl+Shift+F9 thing cures the problem (the Err:522 messages
disappears and are replaced with correct cell values) sometimes, maybe
once out of 5 or 10 in average, but sometimes when I do that,
LibreOffice crash. However, so far, when I ”repair” the file, there
are never any error messages. So I continue entering new values, save
and close. Next day, when I open the file again, those Err:522
messages are back again. That's what my life looks like every day
these days.

Just for fun, I installed Apache OpenOffice 3.4.1 a few minutes ago
and I tried to open the file with it. After fiddling with macro
security (adding the path where the file is located), the spreadsheet
opened, and opened very much faster than LibreOffice. Unfortunately,
the Err:522 messages was there again, but Apache OpenOffice seems a
lot faster than LibreOffice, so it doesn't waste my time as much.
After copying the first one of the Err:522 cells and pasting it to
itself, all the Err:522 messages were gone again. And that also
happened much faster than with LibreOffice.

So now I started to enter new values. As I said above, from hitting
Enter until LibreOffice stop freezing (it works with something, I
don't have a clue what) it typically takes a minute or two, maybe
more. With Apache OpenOffice it took way less than a second.

I realise that nobody will ever even move a finger to investigate what
could possible be wrong with the combination ”My Err:522-file” and
LibreOffice, so I will just run away from the problem and use Apache
OpenOffice for that particular spreadsheet (and maybe all other office
documents in the future, but that's too early to say after trying out
Apache OpenOffice for only half an hour or so…).

Solved. At least for now.

One difference between my installations of Apache OpenOffice and
LibreOffice, is that I didn't ”import” my LibreOffice settings to
Apache OpenOffice yet (settings of different kinds), so it's quite
possible, I guess, that when I do that, I will experience the same
problems with Apache OpenOffice. The only thing I iknow right now, is
that with the settings I have now and with those two office suites, I
just don't have time to wait for LibreOffice doing weird things in the
background, freezing for minutes for every cell entry.

Johnny Rosenberg

Hi :slight_smile:
That has all sounded like a tfn tbh.  I've never heard of the Err 522 before.  I was hoping it was something trivial such as memory or something.  I guess you have already posted a bug-report and just got nothing back yet?  It's going to be a tad weird here if you do go over to AOO completely. 
Apols and regards from
Tom :slight_smile:

Hi :slight_smile:
That has all sounded like a tfn tbh. I've never heard of the Err 522
before.

It means circular references, but in my case it probably means
something else, because I have more than double checked: There are no
circular references! Well, I said that before, didn't I? I think so.

I was hoping it was something trivial such as memory or something.
I guess you have already posted a bug-report and just got nothing back yet?
It's going to be a tad weird here if you do go over to AOO completely.
Apols and regards from
Tom :slight_smile:

I always used to file bug reports, but since I switched to LibreOffice
they are just too many. I wouldn't have time for anything else if I
wrote a bug report every time I found a new bug. Maybe I file every
tenth bug or so, so it's not that I'm doing absolutely nothing, but
no, I don't think I filed this particular one. I was going to, but I
would need to attach that particular document, with a lot of data that
I need to rename first and so on, just too much work, especially at
that speed…

Anyway, now that I saved the document with Apache OpenOffice,
LibreOffice opened it much faster and that several minutes wait after
every cell entry was suddenly gone, it now takes approximately one
second. Maybe Apache OpenOffice fixed it somehow?

And even funnier, Apache OpenOffice now takes a few seconds coffee
break for every cell entry in that file (at least it's not minutes)!
If I am going to file a bug report, I am not really sure what to
write, I'm just too confused right now, I don't know what happens;
maybe I'm just dreaming all this…

Johnny Rosenberg

Hi :slight_smile:
Lol, that does sound a tad weird.  Have you made a copy and tried opening it with Gnumeric? 
Regards from
Tom :slight_smile:

Hi Johnny,
Just a few thoughts in an attempt to narrow down the problem :

- which version of OpenOffice.org did you originally use to create the file ?
- the cells that show Err 522, do they have a particular formula that requires recalculation ?
- if there is a formula in these cells, does it involve calculating strings with en empty, NULL or Zero value ?

Alex

Hi Johnny,
Just a few thoughts in an attempt to narrow down the problem :

- which version of OpenOffice.org did you originally use to create the file
?

I am not sure, but I have four of these files, one for each year (one
year is about 3000 rows in average and the whole thing were just too
slow for using the same file for many years), so the first one was
made in 2010, and I think it was LibreOffice, but I'm not sure. If
LibreOffice, it must have been one of the first versions, which one
was that? 3.2?

- the cells that show Err 522, do they have a particular formula that
requires recalculation ?

I'll open it and have a look…
Okay, it's open and now I can see that all my formatting of column A
is… gone?? Thank you, LibreOffice, or maybe Apache OpenOffice? I
fiddled with the file with both suites yesterday, but I think I used
LibreOffice last time I opened it…
I'll open it with Apache OpenOffice… Done. Column A formatted OK. Strange…

I know I have had that problem before with LibreOffice, that some
formatting (conditional formatting) are suddenly gone, so I guess I
should stay with Apache OpenOffice for at least that file…

Anyway, back to your question…
The first cell with Err:522 when I open the file now, is G320. The
formula is (translated to English):
=IF($E320="";"";IF($B320=G$1;$C320+G319+STYLE("Time");IF(INTEGER($A320)>INTEGER($A319);0+STYLE("Hide");G319+STYLE("Hide"))))
    ”Hide” is a style that hides the text with white characters and
white background. It just make it look a lot better and easier to
follow.
    ”Time” is for displaying time correctly, in this case H:MM:SS. All
other settings are the same as the default style, I think.

All rows looks the same (except maybe the first one), here are the
rest of its columns, in this case one row 320:
A320: 2013-02-07 11:40:33
    Just date and time following ISO-8601, which is very close to the
Swedish date- and time format.
B320: =WORK(A320;B319)
    WORK looks like this:

REM ***** Basic *****
Option Explicit

Function Work(CurrentTime As Date,PrevWork As String) As String
    If CurrentTime=0 Then
        Work=""
    ElseIf TimeValue(CurrentTime)<TimeValue("07:00:00") And _
        PrevWork<>"Arrival" Then
        Work="Arrival"
    ElseIf TimeValue(CurrentTime)>TimeValue("10:40:00") And _
    TimeValue(CurrentTime)<TimeValue("11:50:00") And _
    PrevWork<>"Lunch" Then
        Work="Lunch"
    ElseIf TimeValue(CurrentTime)>TimeValue("15:40:00") Then
        Work="Going home"
    ElseIf PrevWork<>"Transport" Then
        Work="Transport"
    Else
        Work="Enter customer, supplier or place"
    EndIf
End Function
REM ***** End of code *****

C320: =IF(OR(A321=0;A321<A320);"";IF(INTEGER(A321)>INTEGER(A320);"";A321-A320))
D320: <Empty>
    The D column is for comments only, so most of the rows are empty,
the rest are pure text, no formulas.
E320: =IF(E319="";C320;IF(OR(DAY(A321)>DAY(A320);C320="");"";IF(OR(B320="Lunch";B320="Doctor's
appointment");E319;C320+E319)))
F320: =IF($E320="";"";IF($B320=F$1;$C320+F319+STYLE("Time");IF(INTEGER($A320)>INTEGER($A319);0+STYLE("Hide");F319+STYLE("Hide"))))
    And finally, the already mentioned formula, in which the first
Err:522 occurs this time (not the same cell every time I open the
document):
G320: =IF($E320="";"";IF($B320=G$1;$C320+G319+STYLE("Time");IF(INTEGER($A320)>INTEGER($A319);0+STYLE("Hide");G319+STYLE("Hide"))))

Now, I select G320, Ctrl+ Ctrl+v. Poff – all error messages are gone…
(and replaced with the expected values).

Well, that's probably just about it.

- if there is a formula in these cells, does it involve calculating strings
with en empty, NULL or Zero value ?

I try to prevent that with the IF(SomeCell="";"";DoSomething), see the
formulas above. I think I covered all possible situations, but I'm not
100 % sure, of course.

Alex

Thank you, for trying to help.

Johnny Rosenberg

Hi Johnny,

Thanks for the detailed input. I'm afraid I don't have the solution to
your woes, but if I have understood correctly G320, where your error
appears, relies on B320 which in turn relies on execution of a macro in
order to update its value and commit that to B320 ?

This may be where things are going cumulatively wrong in terms of
performance, as LO's behaviour was modified (some time after 3.3.x and
during 3.4.x development, I seem to recall) not to automatically update
cell calculations. So, and this is just a hypothesis, your reference to
the macro for the calculation may be causing the error message to
display until the sheet is either recalculated, or receives a redraw
call, which still always seems to happen whenever you copy/paste the
cell contents.

Note that you are not the first person to notice a degradation in Calc
performance/updating, so you are not alone, but the conditions under
which this can happen seem to vary quite widely.

Alex

Hi.

Hi Johnny,
Just a few thoughts in an attempt to narrow down the problem :

- which version of OpenOffice.org did you originally use to create the file
?

I am not sure, but I have four of these files, one for each year (one
year is about 3000 rows in average and the whole thing were just too
slow for using the same file for many years), so the first one was
made in 2010, and I think it was LibreOffice, but I'm not sure. If
LibreOffice, it must have been one of the first versions, which one
was that? 3.2?

- the cells that show Err 522, do they have a particular formula that
requires recalculation ?

I'll open it and have a look…
Okay, it's open and now I can see that all my formatting of column A
is… gone?? Thank you, LibreOffice, or maybe Apache OpenOffice? I
fiddled with the file with both suites yesterday, but I think I used
LibreOffice last time I opened it…
I'll open it with Apache OpenOffice… Done. Column A formatted OK. Strange…

I know I have had that problem before with LibreOffice, that some
formatting (conditional formatting) are suddenly gone, so I guess I
should stay with Apache OpenOffice for at least that file…

Anyway, back to your question…
The first cell with Err:522 when I open the file now, is G320. The
formula is (translated to English):
=IF($E320="";"";IF($B320=G$1;$C320+G319+STYLE("Time");IF(INTEGER($A320)>INTEGER($A319);0+STYLE("Hide");G319+STYLE("Hide"))))
     ”Hide” is a style that hides the text with white characters and
white background. It just make it look a lot better and easier to
follow.
     ”Time” is for displaying time correctly, in this case H:MM:SS. All
other settings are the same as the default style, I think.

All rows looks the same (except maybe the first one), here are the
rest of its columns, in this case one row 320:
A320: 2013-02-07 11:40:33
     Just date and time following ISO-8601, which is very close to the
Swedish date- and time format.
B320: =WORK(A320;B319)
     WORK looks like this:

REM ***** Basic *****
Option Explicit

Function Work(CurrentTime As Date,PrevWork As String) As String
     If CurrentTime=0 Then
         Work=""
     ElseIf TimeValue(CurrentTime)<TimeValue("07:00:00") And _
         PrevWork<>"Arrival" Then
         Work="Arrival"
     ElseIf TimeValue(CurrentTime)>TimeValue("10:40:00") And _
     TimeValue(CurrentTime)<TimeValue("11:50:00") And _
     PrevWork<>"Lunch" Then
         Work="Lunch"
     ElseIf TimeValue(CurrentTime)>TimeValue("15:40:00") Then
         Work="Going home"
     ElseIf PrevWork<>"Transport" Then
         Work="Transport"
     Else
         Work="Enter customer, supplier or place"
     EndIf
End Function
REM ***** End of code *****

C320: =IF(OR(A321=0;A321<A320);"";IF(INTEGER(A321)>INTEGER(A320);"";A321-A320))
D320: <Empty>
     The D column is for comments only, so most of the rows are empty,
the rest are pure text, no formulas.
E320: =IF(E319="";C320;IF(OR(DAY(A321)>DAY(A320);C320="");"";IF(OR(B320="Lunch";B320="Doctor's
appointment");E319;C320+E319)))
F320: =IF($E320="";"";IF($B320=F$1;$C320+F319+STYLE("Time");IF(INTEGER($A320)>INTEGER($A319);0+STYLE("Hide");F319+STYLE("Hide"))))
     And finally, the already mentioned formula, in which the first
Err:522 occurs this time (not the same cell every time I open the
document):
G320: =IF($E320="";"";IF($B320=G$1;$C320+G319+STYLE("Time");IF(INTEGER($A320)>INTEGER($A319);0+STYLE("Hide");G319+STYLE("Hide"))))

Now, I select G320, Ctrl+ Ctrl+v. Poff – all error messages are gone…
(and replaced with the expected values).

Well, that's probably just about it.

- if there is a formula in these cells, does it involve calculating strings
with en empty, NULL or Zero value ?

I try to prevent that with the IF(SomeCell="";"";DoSomething), see the
formulas above. I think I covered all possible situations, but I'm not
100 % sure, of course.

Alex

Thank you, for trying to help.

Johnny Rosenberg

--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems?
http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted

I am sure you have tried, but did F9 or Shift+Ctrl+F9 do the trick. A quick search shows some discussion on failure to recalculate.
Steve