Issue 70064 - crash on format->alignment and moving outside cell
Summary: crash on format->alignment and moving outside cell
Status: CLOSED DUPLICATE of issue 67990
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: PC (x86_64) Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: niklas.nebel
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-03 13:04 UTC by caolanm
Modified: 2013-08-07 15:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sample document (7.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-10-03 13:04 UTC, caolanm
no flags Details
patch to workaround crash (1.64 KB, patch)
2006-10-03 13:05 UTC, caolanm
no flags Details | Diff
additional part of the patch (719 bytes, patch)
2006-10-03 13:16 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2006-10-03 13:04:17 UTC
1. Take the attached .ods and load
2. triple click on cell B1, i.e. select the text of the full name in that cell
3. Format->Alignment->Center
4. Click in another cell

Crash with stacktrace like ...
0x17be2ecb: /usr/lib64/openoffice.org2.0/program/libsc680lx.so + 0x5e2ecb
(ScPatternAttr::GetNumberFormat(SvNumberFormatter*) const + 0x2b)
0x1780c50b: /usr/lib64/openoffice.org2.0/program/libsc680lx.so + 0x20c50b
0x178656c2: /usr/lib64/openoffice.org2.0/program/libsc680lx.so + 0x2656c2
0x178e5953: /usr/lib64/openoffice.org2.0/program/libsc680lx.so + 0x2e5953
0x178e6aec: /usr/lib64/openoffice.org2.0/program/libsc680lx.so + 0x2e6aec
0xe84d35c: /usr/lib64/openoffice.org2.0/program/libvcl680lx.so + 0x24d35c
(SelectionEngine::SelMouseButtonDown(MouseEvent const&) + 0x1cc)

The problem is that setting the alignment deletes the ScPatternAttr (in
ScColumn::ApplyPattern through pAttrArray->SetPattern) which the inputhdl has a
pLastPattern pointer to. so later the inputhdl uses the invalid pointer.

Attached is a patch which avoids the crash, though more from illustrative
purposes than a "patch" to fix
Comment 1 caolanm 2006-10-03 13:04:49 UTC
Created attachment 39523 [details]
sample document
Comment 2 caolanm 2006-10-03 13:05:52 UTC
Created attachment 39524 [details]
patch to workaround crash
Comment 3 caolanm 2006-10-03 13:16:01 UTC
Created attachment 39525 [details]
additional part of the patch
Comment 4 frank 2006-10-03 13:59:05 UTC
Hi Niklas,

please have a look at this one.

Frank
Comment 5 niklas.nebel 2006-10-04 18:20:32 UTC
This is the same crash as issue 67990. Long-term, pLastPattern should be removed
altogether, but for now the fix from 67990 will suffice.

*** This issue has been marked as a duplicate of 67990 ***
Comment 6 niklas.nebel 2006-10-04 18:21:02 UTC
closing