Bug 32002 - Editing saved document results in loss of defined range
Summary: Editing saved document results in loss of defined range
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
3.3.0 Beta3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Kohei Yoshida
Depends on:
Reported: 2010-11-30 07:10 UTC by Kevin Hunter
Modified: 2011-01-13 04:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Simple 5x2 cell spreadsheet, with a A1:A+inf defined as 'Divisor' (7.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-11-30 07:10 UTC, Kevin Hunter
probable fix (470 bytes, patch)
2010-11-30 09:07 UTC, Caolán McNamara

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Hunter 2010-11-30 07:10:25 UTC
Created attachment 40673 [details]
Simple 5x2 cell spreadsheet, with a A1:A+inf defined as 'Divisor'

This bug is a range definition on a 64-bit machine when reading from a saved file.  Per conversation with Kohei, it does not occur on a 32-bit machine.

Steps to recreate:
1. Create new document normally.

2. Define column as some name, say A1:A1048576 as Divisor

3. Enter some numbers in the Divisor column:
 A1: 1
 A2: 2
 A3: 3
 A4: 4
 A5: 5

4. Enter some formula involving the Divisor column in column B:
 B1: =A1/Divisor   (Should display 1 when you hit return)
 B2: =A2/Divisor   (Should display 1 when you hit return)
 B3: =A3/Divisor   (Should display 1 when you hit return)
 B4: =A4/Divisor   (Should display 1 when you hit return)
 B5: =A5/Divisor   (Should display 1 when you hit return)

5. Save the document, say as test.ods

6. Close LibreOffice
7. Reopen LibreOffice, and open test.ods.
  Observe that the B1:B5 all have a #DIV/0! error

I've attached test.ods in case the above instructions aren't clear.  You should be able to open the document just fine on a 32-bit version of LO, but encounter the error of step 7 on a 64-bit version of LO.

I believe this to be a blocker bug because variable, cell, and range definitions are used heavily in at least the chemistry, physics, and engineering communities in which I dabble.  Having spreadsheets "randomly" stop working is an instant non-starter.
Comment 1 Caolán McNamara 2010-11-30 08:53:57 UTC
When you say it worked on 32bit were you comparing the exact same version of Libreoffice or a older 32bit version to a newer 64bit version
Comment 2 Caolán McNamara 2010-11-30 09:01:52 UTC
What I see in "master" doesn't seem to make much sense. I think the 5c579aec2bbdfec4de0db8faf2176a0879851b52 conflict fix is busted.
Comment 3 Caolán McNamara 2010-11-30 09:07:07 UTC
Created attachment 40676 [details]
probable fix

caolanm->kohei: Can you check this patch for master. Gives the results I expect to see afterwards.
Comment 4 Kohei Yoshida 2010-11-30 09:25:48 UTC
kohei->caolan: Yup, the patch looks right to me.  Please go ahead.
Comment 5 Kevin Hunter 2010-11-30 10:12:50 UTC
Removing blocker status, per list conversation.  This bug crept in rather recently, thanks to the commit that Caolan identified in comment 2.  Thanks Caolan for identifying that, and apologies for the blocker noise.
Comment 6 Kohei Yoshida 2010-11-30 10:19:40 UTC
BTW, I was the one who suggested to make this a blocker.  So no worries. ;-)
Comment 7 Kohei Yoshida 2010-11-30 11:28:35 UTC
Actually I'll do it right now.
Comment 8 Kohei Yoshida 2010-11-30 11:34:49 UTC
Committed on master:


Calling this fixed.
Comment 9 sophie 2011-01-13 04:38:19 UTC
Verified by Jean-Baptiste - closed - Sophie