Bug 129107 - Objects in Array and Other Variables Disappear After Redimensioning
Summary: Objects in Array and Other Variables Disappear After Redimensioning
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.1.6.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6....
Keywords: bibisected, bisected, dataLoss, regression
Depends on:
Blocks: Macro-StarBasic
  Show dependency treegraph
 
Reported: 2019-11-29 22:54 UTC by AndyG
Modified: 2019-12-05 13:39 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Description of bug that Objects in Array and Other Variables Disappear After Redimensioning (19.85 KB, application/vnd.oasis.opendocument.text)
2019-11-29 22:54 UTC, AndyG
Details
testcase (10.18 KB, application/vnd.oasis.opendocument.text)
2019-11-30 09:17 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AndyG 2019-11-29 22:54:13 UTC
Created attachment 156195 [details]
Description of bug that Objects in Array and Other Variables Disappear After Redimensioning

The problem occurs in LibreOffice, both on Windows and in OpenSUSE Linux. I've tested it in Calc, but am not interfacing with Calc, so it may not be specific to Calc.

The problem seems to relate to redimensioning (with preserve) arrays of class objects in compatible mode, and perhaps there is some memory leak - but that is speculation.

I include a detailed description in the attached document, which gives the content of a module and a class module, and describes the observed behavior.

AndyG
Comment 1 Oliver Brinzing 2019-11-30 09:17:44 UTC
Created attachment 156198 [details]
testcase
Comment 2 Oliver Brinzing 2019-11-30 09:19:33 UTC
reproducible with:

Version: 6.1.6.3 (x64)
Build-ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: 

but *not* reproducble with:

Version: 6.0.7.3 (x64)
Build-ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc:
Comment 3 Oliver Brinzing 2019-11-30 12:53:54 UTC
this seems to have started with:

https://gerrit.libreoffice.org/plugins/gitiles/core/+/263d7325691f4b0a1bda155f1c53bbcf712e9f09

commit	263d7325691f4b0a1bda155f1c53bbcf712e9f09	[log]
author	Noel Grandin <noel.grandin@collabora.co.uk>	
Tue Jan 16 14:41:21 2018 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	
Fri Jan 19 08:58:46 2018 +0200
tree	024ca8d5fd98d09053faa6c4b22afb91098890d2
parent	9653ac69f8c9fdfcd353a1b15c701139dd541e9b [diff]

loplugin:useuniqueptr in SbModule

Change-Id: I20525bd69c91ff35c9e569525a0d4556bc184982
    basic/source/classes/sb.cxx[diff]
    basic/source/classes/sbxmod.cxx[diff]
    basic/source/comp/codegen.cxx[diff]
    basic/source/runtime/runtime.cxx[diff]
    include/basic/sbmod.hxx[diff]


/cygdrive/d/sources/bibisect/bibisect-win32-6.1
$ git bisect good
289e6fe588848cb3b2ef26666a98ad037ad863d0 is the first bad commit
commit 289e6fe588848cb3b2ef26666a98ad037ad863d0
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Jan 19 01:38:35 2018 -0800
    source sha:263d7325691f4b0a1bda155f1c53bbcf712e9f09
    source sha:263d7325691f4b0a1bda155f1c53bbcf712e9f09

:040000 040000 87bff4e488ff63c225bafac9dee05b13a8b9628c 2d044ec32ba5b60433a3d9df7d4b5666960c2c7e M      instdir

/cygdrive/d/sources/bibisect/bibisect-win32-6.1
$ git bisect log
# bad: [75d131082ce51ed5a898d97bdc2b7a9fe5ddb340] source sha:5b3765f4d881e7ddefd0c4aad6886a46f000b4fc
# good: [29d08f54c2f71ffee4fe12dbb24c5f5cbedecfd2] source sha:6eeac3539ea4cac32d126c5e24141f262eb5a4d9
git bisect start 'master' 'oldest'
# bad: [6227e15df9be101688e37cd891817cd858b49e03] source sha:b8b7f8a8f8d97088181d287bb75e74facece16c6
git bisect bad 6227e15df9be101688e37cd891817cd858b49e03
# good: [f73e8407e9dd38ee6588002e02c30e29880abdca] source sha:27938e1bbd5f3405c47b9933be7489eeb03920f3
git bisect good f73e8407e9dd38ee6588002e02c30e29880abdca
# bad: [7849bdd9f2acfe1179f0cf835616bc58ad741b86] source sha:8bd6f83741a44509921b9b0fd14611815f6a4dc6
git bisect bad 7849bdd9f2acfe1179f0cf835616bc58ad741b86
# bad: [8f3f2d39a30f8f22aa247257a90244d34a7dc98d] source sha:faa499cf6c9ccc0503fdc889727e1affcca8e930
git bisect bad 8f3f2d39a30f8f22aa247257a90244d34a7dc98d
# bad: [11d3e290a5a3edf4976623c1355ddcaf6d6ed0a0] source sha:ad9871a5d1119593068f7e3a01d4249b4dff982a
git bisect bad 11d3e290a5a3edf4976623c1355ddcaf6d6ed0a0
# bad: [044abcd0831b06ea36a978862464202f0c70cde7] source sha:06bf579a007f33a1726197c92125b7475836e3ef
git bisect bad 044abcd0831b06ea36a978862464202f0c70cde7
# bad: [4884ea4a9a1522a77ffb02b58236374fe1b1d89c] source sha:000fa4c4952cdc3d63f91a63eb4b3da83e5990ca
git bisect bad 4884ea4a9a1522a77ffb02b58236374fe1b1d89c
# good: [8231917b5c6e5149af06ba0d83a3bde78810e529] source sha:49421d41f0dea1fb977f9d0f5e38e548ba25e0a5
git bisect good 8231917b5c6e5149af06ba0d83a3bde78810e529
# good: [b393affdbe72dafcbe7d2641d5301b0dbd6cf928] source sha:d4440ce6b5964d08be1e5841ed301112b260823d
git bisect good b393affdbe72dafcbe7d2641d5301b0dbd6cf928
# good: [346c424425a0a5c07236234fb382ea47f230b8cb] source sha:2b63eea0d4e43ffa23c889519011c870a9a55e58
git bisect good 346c424425a0a5c07236234fb382ea47f230b8cb
# good: [c531e299e6e99d9caf970e1d15adca30cb03385e] source sha:fb3091bfc73cb321017f47d87dc8cb782b9a58d8
git bisect good c531e299e6e99d9caf970e1d15adca30cb03385e
# bad: [289e6fe588848cb3b2ef26666a98ad037ad863d0] source sha:263d7325691f4b0a1bda155f1c53bbcf712e9f09
git bisect bad 289e6fe588848cb3b2ef26666a98ad037ad863d0
# good: [78b32f4cb620b48f94eab7a832fd40be8afb68c5] source sha:9653ac69f8c9fdfcd353a1b15c701139dd541e9b
git bisect good 78b32f4cb620b48f94eab7a832fd40be8afb68c5
# first bad commit: [289e6fe588848cb3b2ef26666a98ad037ad863d0] source sha:263d7325691f4b0a1bda155f1c53bbcf712e9f09
Comment 4 AndyG 2019-11-30 19:40:39 UTC
Apart from bug 127592, could it also be related to 123025 and 124008?
Comment 5 Commit Notification 2019-12-04 08:00:44 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/30c707666dbe810c577dc14bc995dc91c2293b17

tdf#129107 objects in basic disappear

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Xisco Faulí 2019-12-04 16:38:23 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: 8f7010eb47119a2428b77f5d79fc8577d9914958
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Noel, thanks for fixing this issue!
Comment 7 Commit Notification 2019-12-04 18:46:02 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/0dcfe46be095a0bd570e37d4dcbf569766957fe7

tdf#129107 objects in basic disappear

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-12-04 18:46:27 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/87d6a410e7676babc5475c2d7c05cde4d36d86c5

tdf#129107 objects in basic disappear

It will be available in 6.3.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2019-12-05 09:51:38 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3-4":

https://git.libreoffice.org/core/commit/eaf92eca088736d132bd9467423e8a251b8cfb54

tdf#129107 objects in basic disappear

It will be available in 6.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 AndyG 2019-12-05 13:39:30 UTC
(In reply to Commit Notification from comment #9)
> Noel Grandin committed a patch related to this issue.
> It has been pushed to "libreoffice-6-3-4":
> 
> https://git.libreoffice.org/core/commit/
> eaf92eca088736d132bd9467423e8a251b8cfb54
> 
> tdf#129107 objects in basic disappear
> 
> It will be available in 6.3.4.
> 
> The patch should be included in the daily builds available at
> https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> https://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.

I'm in awe! Thank you so much, Noel! I never dared to hope it could be addressed this quick.

Andy