Issue 63452

Summary: Err: 522 if "Save Autorecovery information" occurs during recalculation
Product: Calc Reporter: gfim <graham>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: gercokees, issues
Version: OOo 2.0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Spreadsheet that causes Err:522 during hard recalculate
none
OO.o Basic function definitions to go with spreadsheet
none
Basic function definitions as a text file (for pasting into OOo)
none
please ignore previous attachment and use this one instead!!!
none
set autosave on 1 minute, then, press {ctrl}+{shift}+{f9} until error occurs none

Description gfim 2006-03-22 03:12:22 UTC
I have a largish spreadsheet (10000 cells) which uses formulae containing calls
to user defined functions (I don't know if that is relevant). When I change the
function definitions, I force the spreadsheet to recalculate using Ctrl-Shift-F9
(Hard recalculate). It takes about 30secs to do the recalculation. If a "Save
Autorecovery information" occurs during the recalculation, I get one cell that
has "Err:522".
Comment 1 Joost Andrae 2006-03-22 14:49:13 UTC
It's a circular reference...but that's not a reason to crash the application.
Please attach your calc file if you like to help us to get this crash fixed. Did
you send an error report ? Maybe you got a report ID from the error report tool
by email ? If you got such an email then it would help to provide the error
report ID here.
Comment 2 gfim 2006-03-27 04:48:43 UTC
Firstly, it's not a crash, it's "Err: 522", so there is no error report tool
invoked. Secondly, there is no error if the autorecovery save doesn't happen
during the recalculate. So I don't believe there really is any circular reference.

However, I'll attach a file that demonstrates it. In order to reproduce it
easily, I reduced the save interval to 1 minute
(Tools->Options->Load/save->General->Save Autorecovery information every 1 Minutes).
Comment 3 gfim 2006-03-27 05:40:46 UTC
Created attachment 35279 [details]
Spreadsheet that causes Err:522 during hard recalculate
Comment 4 gfim 2006-03-27 05:42:18 UTC
Created attachment 35280 [details]
OO.o Basic function definitions to go with spreadsheet
Comment 5 gercokees 2006-11-29 10:18:19 UTC
Hi,
I Tried to open your xba-file, but i could not get it to work.
Can you please explain the steps for me (sometimes i feel like a novice...)
Comment 6 gfim 2006-11-29 21:52:33 UTC
I don't think you should "open" the file using OOo. You either:
- put it in the right place (in my case, it came from "C:\Documents and
Settings\zgm\Application Data\OpenOffice.org2\user\basic\Standard" (on Windows
obviously, and my login name is "zgm"), or
- paste most of it (everything except the XML header and footer) into the OOo 
Basic macro window (Tools menu -> Macros -> Organize macros -> OpenOffice.org
Basic then Edit).
Comment 7 gercokees 2006-11-30 08:16:18 UTC
hmm,
I tried both your solutions to the .xba file, but could not get the job done. I
had to restart my computer three times now :-(
Is it possible to add the functions to your .ods-file?
When i do it myself there is always a missing "<" or "then" statement wich
causes ooo to freeze my computer...

(Tools menu -> Macros -> Organize macros -> OpenOffice.org
Basic then Edit)
Comment 8 gfim 2006-11-30 22:04:18 UTC
I don't know how to add function definitions to the ODS file. If OOo is crashing
your computer, then that sounds like something you should report as a bug!! The
copy/paste method seems like the easiest to me. The functions definitions should
start with "Function SlideDisp(slides, volume, profile)" and end with
"PM_CONFIRM_REAGENT_VOLUME = 0" follwed on the next line by "end function". I'll
upload the contents of the function definitions to the issue as a text file.
Comment 9 gfim 2006-11-30 22:06:26 UTC
Created attachment 41028 [details]
Basic function definitions as a text file (for pasting into OOo)
Comment 10 gfim 2006-11-30 22:10:26 UTC
Created attachment 41029 [details]
please ignore previous attachment and use this one instead!!!
Comment 11 gercokees 2007-03-19 11:55:55 UTC
hi, im busy with this one...
Comment 12 gercokees 2007-03-20 09:15:52 UTC
Hi,

I can confirm this behavour. To reproduce follow the following procedure (force
frequent autorecovery saving, toggle a simple basic function, use the function a
lot in the sheet and recalculate, so that an autorecovery-saving is done in the
end of the calculation...)

0) Start a worksheet, save it somewhere
1) Goto: Tools > Options > Load/Save > General > Check autorecoveryinformation
and choose: 1 minute.
2) Goto: Tools > Macros > Organize macros > OpenOfice.Org Basic > New and enter
the following function:
Function test(one, two)
	tmp = iif(one <> 0, 1, 2)
	test = 0 + tmp * two
End Function

3) In your sheet, in cell a3 enter: =test(0;1)
4) Copy cell a3 down until cell 1003
5) In cell a1 enter: sum(a3:a1003)

Now, force a recalculation a few times (use {ctrl}+{f9}
when an autosave is performed during a recalculation, one of the 1000 cells
contains an error: Err522. You can see that in cell a1 ofcourse.

The workaround for this is to save the sheet, just before recalculating it, so
that no autosaving is performed during the calculatingproces (ofcourse set
autosaving to 15 minutes then...)
Greetz,
Comment 13 frank 2007-03-20 11:05:55 UTC
Hi,

have tried the operations outlined by gercokees with OOo2.2rc3 and was not able
to reproduce.

Gercokees have you tried it with the latest rc too ?

Frank
Comment 14 frank 2007-03-27 13:25:26 UTC
could not reproduce using OOo2.2rc4 therefore closed wfm
Comment 15 frank 2007-03-27 13:26:38 UTC
closed wfm
Comment 16 gercokees 2007-03-27 13:28:40 UTC
i give this one a try as soon as version 2.2 is available. (I need a stable
version of OOo because of production). I will then post my conclusions here...
Comment 17 gercokees 2007-03-30 10:13:14 UTC
I reopen this issue, because in my opinion the problem still persists in OOo 2.2
i think it has to do something with vb-functions calling other functions.
I submit an attachment where the error occurs.
use the vb-functions below, and be sure to use {ctrl}+{shift}+{f9}. Then, when a
"save autorecovery information" occurs during the recalculation, on cell gets an
error "Err:522"
greetz...


Function Test(one, two, three)
	Test = one * (1 + int(two / 0.4 / test2(three) + 0.999))
End Function

Function test2(three)
	velocities = Array(-1, 3000, 1200, 3000, 3000, 240, 120, 1250, 240, 1250, 1250,
240, 600, 170, 25, 999, 999, 999, 999, 999, 999)
	test2=velocities(three)
End Function
Comment 18 gercokees 2007-03-30 10:14:49 UTC
Created attachment 44052 [details]
set autosave on 1 minute, then, press {ctrl}+{shift}+{f9} until error occurs
Comment 19 frank 2007-04-12 11:14:01 UTC
Hi Niklas,

I'm not sure if it's yours, but if not please re-assign.

Frank
Comment 20 Marcus 2017-05-20 11:13:45 UTC
Reset assigne to the default "issues@openoffice.apache.org".