Issue 108246 - svx: crash in Appearance config. dialog
Summary: svx: crash in Appearance config. dialog
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOO310m19
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 3.4.1
Assignee: ooo
QA Contact: issues@graphics
URL: http://dl.dropbox.com/u/281158/3.tar.bz2
Keywords:
Depends on:
Blocks: 90439
  Show dependency tree
 
Reported: 2010-01-12 09:05 UTC by dtardon
Modified: 2017-05-20 10:22 UTC (History)
1 user (show)

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


Attachments
avoid the crash (486 bytes, patch)
2010-01-12 09:06 UTC, dtardon
no flags Details | Diff
fix the real cause of the crash this time (4.65 KB, patch)
2010-01-16 08:55 UTC, dtardon
no flags Details | Diff
update patch for 3.3 (4.65 KB, patch)
2010-07-13 11:13 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description dtardon 2010-01-12 09:05:34 UTC
I've encountered a crash in Tools->Configuration->OpenOffice.org->Appearance,
caused by a specific user configuration (maybe corrupted in some way). It
crashes after scrolling the whole way down and back up a little. The crash is
caused by nFirstIndex being -1 at svx/source/dialog/optcolor.cxx:1226, so the
test if(nFirstVisible) is okay. The nFirstVisible is even decremented further
on, becoming -2. Then it's used as index to aScrollWindow.aCheckBoxes array,
with obvious result.

I reproduced the crash only on Fedora 12 distribution installation, not on any
of my devel installations, but the possibility for crash is there too.
Comment 1 dtardon 2010-01-12 09:06:26 UTC
Created attachment 67143 [details]
avoid the crash
Comment 2 dtardon 2010-01-16 08:52:19 UTC
Steps to reproduce:
1. install Sun Report Builder extension
2. deactivate Base (for example by removing
$INSTALLDIR/openoffice.org3/basis-link/share/registry/modules/org/openoffice/Setup/Setup-base.xcu)
3. go to Tools->Options->OpenOffice.org->Appearance
4. scroll to the top of the settings window
5. scroll down
6. crash

The problem is that SQL group is not allowed to be shrunk, thus, when there is
an extension that adds its own color config installed, there is a hole, covering
nearly full height of the visible space, between the last 'regular' group and
the first extension group in the Appearance window. When one scrolls down to
that hole, the range of settings to show that is searched for in
ColorConfigCtrl_Impl::ScrollHdl is empty--the last line of the last 'regular'
group is above the visible area and the first line of the first extension group
(not counting it's title) is still below it--causing the situation described in
comment 0, i.e. nFirstVisible == -1 and nLastVisible == -1.

The following patch removes the 'hole'. The second part of it, modifying
ColorConfigCtrl_Impl::ScrollHdl, is there just to make the code safer.
Comment 3 dtardon 2010-01-16 08:55:33 UTC
Created attachment 67232 [details]
fix the real cause of the crash this time
Comment 4 ooo 2010-02-25 12:15:04 UTC
started
Comment 5 caolanm 2010-07-13 11:13:11 UTC
Created attachment 70595 [details]
update patch for 3.3
Comment 6 caolanm 2010-07-13 11:13:55 UTC
Is this really going to make 3.3 ?, if not, and you're happy with the approach,
feel free to reassign this back to us and we can put it into a workspace of our own
Comment 7 ooo 2010-09-30 17:42:22 UTC
verfied and applied patch to CWS ka101
Comment 8 ooo 2010-10-25 13:42:21 UTC
retargeted to 3.4