Bug Hunting Session
Bug 85856 - Copying sheet with formulas containing Nameranges destroys the sheet being copied REGRESSION
Summary: Copying sheet with formulas containing Nameranges destroys the sheet being co...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.3.1 rc
Hardware: All All
: medium critical
Assignee: Markus Mohrhard
URL:
Whiteboard: target:4.5.0 target:4.4.0.0.beta3 tar...
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2014-11-04 12:22 UTC by Nikos
Modified: 2015-12-17 08:38 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
To be used for reproduction (13.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-04 12:22 UTC, Nikos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos 2014-11-04 12:22:36 UTC
Created attachment 108884 [details]
To be used for reproduction

Steps to reproduce:
Open attached file
select sheet 2 --> Move/copy sheet --> copy before sheet 1
select sheet 1 cell D13 change value to 4
select sheet 2
Actual result:
result on sheet 2 wrong
result on sheet 9 correct
Expected result:
Both results should be correct

It is a regression compared to 4.1.6, (will test on 4.2.6.3 (from Ubuntu in the Evening). It took a lot of effort to identify, as named ranges are used in rather complex documents, and it rendered them useless. That is why I wrote severity critical.

Thanks for taking a look.
Comment 1 Nikos 2014-11-04 12:29:16 UTC
Sheet 9 should read Sheet2_2
Comment 2 Cor Nouws 2014-11-04 13:15:29 UTC
Hi Mikos,

Thanks for the clear report. 

I can confirm the bug > New

It's also a problem in 4.3.3.2 and in Version: 4.4.0.0.alpha1+
Build ID: d9473f25380c627966b4406cc4cdfaafcf44bc37
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-11-03_04:23:39

Cheers
Cor
Comment 3 Cor Nouws 2014-11-04 13:15:45 UTC
Sorry: Nikos
Comment 4 GerardF 2014-11-04 15:06:19 UTC
Can also reproduce with 4.2.5.

Editing the formula (F2, type space, backspace, enter) show correct result.
Hard recalc (Ctrl+Shift+F9) does nothing.
Comment 5 Terrence Enger 2014-11-05 04:26:14 UTC
I notice as well that the value in Sheet2 goes immediately to zero
when the sheet is copied.


Working in the 43all bibisect repository, I see from `git bisect good`:

    There are only 'skip'ped commits left to test.
    The first bad commit could be any of:
    2e9435770d673b5f2ab59bc2f53d7709c4bd3650
    08d5ea8e996493ba7371a6cf954fbc0469d9042a
    We cannot bisect more!

and from `git bisect log`:

    # bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
    # good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
    git bisect start 'latest' 'oldest'
    # good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
    git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
    # bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
    git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
    # skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
    git bisect skip a043626b542eb8314218d7439534dce2fc325304
    # skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
    git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
    # skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
    git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
    # skip: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
    git bisect skip c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
    # bad: [9771d0c212cfa71b07742ff3dc5c05df22d600eb] source-hash-a9a0933ec67eab0ec31c8fadb60fb8e8e3e90485
    git bisect bad 9771d0c212cfa71b07742ff3dc5c05df22d600eb
    # bad: [a01d436b1ebb5cb163e7216a1e232000f4f0a87a] source-hash-9499df9f8c73ac6370c389683ce2028e6432441e
    git bisect bad a01d436b1ebb5cb163e7216a1e232000f4f0a87a
    # good: [55ecbc9a293276f2506a41e364da2331b22535ab] source-hash-b1f7dd66b898b03cb4bd8d434b6370310ea95946
    git bisect good 55ecbc9a293276f2506a41e364da2331b22535ab
    # good: [b39f384b5baf459aa0bd37c20d5886b040293086] source-hash-f0833d965d20594c0f2d74ffca95589a572e012c
    git bisect good b39f384b5baf459aa0bd37c20d5886b040293086
    # bad: [66426e60b06c075436eaa9640140d3a263dc173c] source-hash-7e07a45500dcbb891a85f0bc9b7049cf4d50bba1
    git bisect bad 66426e60b06c075436eaa9640140d3a263dc173c
    # bad: [08d5ea8e996493ba7371a6cf954fbc0469d9042a] source-hash-a38f09fec16f24886414c3e9f9574a06b56d8077
    git bisect bad 08d5ea8e996493ba7371a6cf954fbc0469d9042a
    # skip: [2e9435770d673b5f2ab59bc2f53d7709c4bd3650] source-hash-31ab7f0c7d20f1d7be5ce818d0d99b6bd5a8edde
    git bisect skip 2e9435770d673b5f2ab59bc2f53d7709c4bd3650
    # good: [b886825d7eb2550ab40d7b4cd16de8096c57d6eb] source-hash-b46688a663b8709e0e0795f25ef8961db1f46cba
    git bisect good b886825d7eb2550ab40d7b4cd16de8096c57d6eb
    # only skipped commits left to test
    # possible first bad commit: [08d5ea8e996493ba7371a6cf954fbc0469d9042a] source-hash-a38f09fec16f24886414c3e9f9574a06b56d8077
    # possible first bad commit: [2e9435770d673b5f2ab59bc2f53d7709c4bd3650] source-hash-31ab7f0c7d20f1d7be5ce818d0d99b6bd5a8edde
Comment 6 Markus Mohrhard 2014-12-07 04:15:40 UTC
Ok, simple fix. This only affects references to range names in the copied sheet.
Comment 7 Commit Notification 2014-12-07 04:44:24 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c8ada4d81b5ff06c98b238e016b183fdca05c0b

we need the original context that contains the data, fdo#85856

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2014-12-07 04:44:29 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c0533a4694e63959bc198dfb190511a223d521c0

add test for fdo#85856

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-12-07 04:45:50 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=27cd91f4355ce7de5e89e5097246ee25882ba3ab&h=libreoffice-4-4

we need the original context that contains the data, fdo#85856

It will be available in 4.4.0.0.beta3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Nikos 2014-12-07 14:29:56 UTC
Hello all,

first of all:
thank you!
to everybody involved in fixing this.

Would it be possible to make this available in 4.3.5 or .6?
Comment 11 Commit Notification 2015-01-08 12:23:19 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c9770b4fc95e87e1f56f01b7b448d20e57277d50&h=libreoffice-4-3

we need the original context that contains the data, fdo#85856

It will be available in 4.3.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Robinson Tryon (qubit) 2015-12-17 08:38:31 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]