Bug 160022 - Crash in: ScTable::HasAttrib(short,long,short,long,HasAttrFlags) when deleting sheet
Summary: Crash in: ScTable::HasAttrib(short,long,short,long,HasAttrFlags) when deletin...
Status: RESOLVED DUPLICATE of bug 159373
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: x86-64 (AMD64) All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sheet Crash
  Show dependency treegraph
 
Reported: 2024-03-04 11:12 UTC by Colin
Modified: 2024-03-04 12:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["ScTable::HasAttrib(short,long,short,long,HasAttrFlags)","ScTable::HasAttrib(short, int, short, int, HasAttrFlags) const"]


Attachments
File that failed the test (694.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-04 11:52 UTC, Colin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin 2024-03-04 11:12:26 UTC
This bug was filed from the crash reporting server and is br-3c100fd3-e028-4ef0-93a1-654a0abb8d82.
=========================================

Created automatically whilst complying with the request on comment #4 on bug 159994 which required the removal of personalised sheets

The first right click delete sheet crashed it.
After recovery i was able to remove all the other non essentil sheets but the crasj left an instance of soffice.bin active in the background processes and prevented all explorer activities against the file
Comment 1 Julien Nabet 2024-03-04 11:19:11 UTC
Could you give a try to LO 7.6.5 + https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile ?

If it still fails, you may also try brand new LO version 24.2.1.
Comment 2 Colin 2024-03-04 11:29:32 UTC
(In reply to Julien Nabet from comment #1)
> Could you give a try to LO 7.6.5 +
> https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile ?
> 
> If it still fails, you may also try brand new LO version 24.2.1.

It all went bandy because I allowed 7.5 to update to 7.6 which immediately borked other aspects of the file.

As almost all my workbooks rely on the failed functionality I was forced to uninstal 7.6 in order to reinstal 7.5.

Oh what a beautifulful morning, Oh what a beautiful day, I got a dreadful feeling..........Nothing was going my way. With aplologies to Gordon McRae
  https://www.youtube.com/watch?v=O5APc0z49wg

Is 24.2.1 any better or is it just a new numbering convention?
Comment 3 Stéphane Guillou (stragu) 2024-03-04 11:40:10 UTC
Any chance you could attach a version of the file which still has the sheet that crashed when deleted? So we can also test and investigate.
Thank you.
Comment 4 Julien Nabet 2024-03-04 11:49:57 UTC
(In reply to Colin from comment #2)
> (In reply to Julien Nabet from comment #1)
> > Could you give a try to LO 7.6.5 +
> > https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile ?
> > 
> > If it still fails, you may also try brand new LO version 24.2.1.
> 
> It all went bandy because I allowed 7.5 to update to 7.6 which immediately
> borked other aspects of the file.
> 
> As almost all my workbooks rely on the failed functionality I was forced to
> uninstal 7.6 in order to reinstal 7.5.
Ok hope you had done a backup before testing this.


> 
> Oh what a beautifulful morning, Oh what a beautiful day, I got a dreadful
> feeling..........Nothing was going my way. With aplologies to Gordon McRae
>   https://www.youtube.com/watch?v=O5APc0z49wg
> 
> Is 24.2.1 any better or is it just a new numbering convention?
I don't know if 24.2.1 will help, it's just for the test.
Yes it's a new numbering convention (see https://blog.documentfoundation.org/blog/2023/08/21/libreoffice-7-6-community/)
Comment 5 Colin 2024-03-04 11:52:11 UTC
Created attachment 192942 [details]
File that failed the test

I right clicked sheet 2 "Results".
The moment I selected "Delete Sheet" it crashed
This was after having had to go to the trouble of uninstalling 7.6 to reinstal 7.5.
After the crash recovery it did permit me to then delete everything to provide a skeletal file for Bug 159994
Comment 6 Colin 2024-03-04 11:55:43 UTC
(In reply to Julien Nabet from comment #4)
> (In reply to Colin from comment #2)
> > (In reply to Julien Nabet from comment #1)

> Ok hope you had done a backup before testing this.
> 
I never go to bed without one;).

BTW I changed the status to UNCONFIRMED - I Hope that's the right thing to do
Comment 7 Stéphane Guillou (stragu) 2024-03-04 12:01:19 UTC
Reproduced with:

Version: 7.6.5.2 (X86_64) / LibreOffice Community
Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

With crash signature "ScTable::HasAttrib(short, int, short, int, HasAttrFlags) const": https://crashreport.libreoffice.org/stats/crash_details/29f232bb-65ac-420a-bf74-3fcdfc298eb3

Also in recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 709866a3b8e073fab4937dcf91dcd33ff1d2bc13
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 8 Julien Nabet 2024-03-04 12:07:32 UTC
I reproduced this and when I saw the bt:
#5  0x00007ff04a2ab773 in std::__debug::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::operator[](unsigned long) const (this=0x56076d9233e8, __n=18446744073709551615) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/debug/vector:450
#6  0x00007ff04a3eddec in ScDocument::HasAttrib(short, int, short, short, int, short, HasAttrFlags) const
    (this=0x56076d923320, nCol1=3, nRow1=4, nTab1=-1, nCol2=16383, nRow2=615, nTab2=-1, nMask=HasAttrFlags::RightOrCenter) at /home/julien/lo/libreoffice/sc/source/core/data/document.cxx:5210
#7  0x00007ff04b2d69c2 in ScDocShell::PostPaint(ScRangeList const&, PaintPartFlags, unsigned short, long) (this=0x56076d6d1c20, rRanges=..., nPart=PaintPartFlags::Grid, nExtFlags=2, nMaxWidthAffectedHint=-1)
    at /home/julien/lo/libreoffice/sc/source/ui/docshell/docsh3.cxx:180
#8  0x00007ff04b764b8b in ScModelObj::RepaintRange(ScRangeList const&) (this=0x56076d419a40, rRange=...) at /home/julien/lo/libreoffice/sc/source/ui/unoobj/docuno.cxx:500
#9  0x00007ff04a3d2d03 in ScDocument::RepaintRange(ScRangeList const&) (this=0x56076d923320, rRange=...) at /home/julien/lo/libreoffice/sc/source/core/data/documen8.cxx:709
#10 0x00007ff04a2f1dfc in ScConditionalFormat::DoRepaint() (this=0x5607720e7a60) at /home/julien/lo/libreoffice/sc/source/core/data/conditio.cxx:1918

it reminded me another bugtracker, just found it.

*** This bug has been marked as a duplicate of bug 159373 ***