Issue 27529 - Crash when configuring status bar
Summary: Crash when configuring status bar
Status: CLOSED WONT_FIX
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOo 1.1.1
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: carsten.driesner
QA Contact: issues@framework
URL:
Keywords: crash, oooqa
Depends on:
Blocks:
 
Reported: 2004-04-06 18:11 UTC by rayll
Modified: 2006-02-09 08:55 UTC (History)
1 user (show)

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


Attachments
patch from apremchandran posted to ximian's bugzilla (878 bytes, patch)
2004-07-16 18:56 UTC, lohmaier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description rayll 2004-04-06 18:11:20 UTC
using a new 1.1.1 install:

 - open a new text document
 - double click the empty section of the status bar
 - verify that fields dialog appears
 - tools->configure->status bar
 - add check mark beside "Current Time"
 - click OK
 - double click the empty section of the status bar
 - got the following trace

Fatal exception: Signal 11
Stack:
/opt/OpenOffice.org1.1.1/program/libsal.so.3[0x40bd2378]
/opt/OpenOffice.org1.1.1/program/libsal.so.3[0x40bd2502]
/opt/OpenOffice.org1.1.1/program/libsal.so.3[0x40bd25c8]
/lib/libpthread.so.0[0x411301ec]
/lib/libc.so.6[0x412ec3a8]
/opt/OpenOffice.org1.1.1/program/libvcl645li.
so(_Z20ImplHandleMouseEventP6Windowthllmtt+0x105c)[0x40229fd4]
/opt/OpenOffice.org1.1.1/program/libvcl645li.
so(_Z19ImplWindowFrameProcPvP8SalFrametPKv+0x16a)[0x4022ca9e]
/opt/OpenOffice.org1.1.1/program/libvcl645li.
so(_ZN12SalFrameData16HandleMouseEventEP7_XEvent+0x46e)[0x4028b5b8]
/opt/OpenOffice.org1.1.1/program/libvcl645li.
so(_ZN12SalFrameData8DispatchEP7_XEvent+0x123)[0x4028d323]
/opt/OpenOffice.org1.1.1/program/libvcl645li.
so(_ZN10SalDisplay8DispatchEP7_XEvent+0x28f)[0x402b931f]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(_ZN10SalDisplay5YieldEh+0xf1)
[0x402b906d]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so[0x402b5017]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(_ZN7SalXLib5YieldEh+0x39a)
[0x402b3b68]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(_ZN11SalInstance5YieldEh+0x34)
[0x402bc948]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(_ZN11Application5YieldEv+0x61)
[0x400e732d]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(_ZN11Application7ExecuteEv+0x35)
[0x400e723f]
/opt/OpenOffice.org1.1.1/program/soffice.bin(_ZN7desktop7Desktop4MainEv+0x1e6d)
[0x8065a3f]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(_Z6SVMainv+0x49)[0x400ec15b]
/opt/OpenOffice.org1.1.1/program/libvcl645li.so(main+0x4c)[0x402b256c]
/lib/libc.so.6(__libc_start_main+0xc7)[0x412d8857]
/opt/OpenOffice.org1.1.1/program/soffice.
bin(_ZN6Window11RequestHelpERK9HelpEvent+0x31)[0x805e971]
Aborted
Comment 1 lohmaier 2004-04-06 19:45:56 UTC
cannot reproduce here
does it crash every time you double-click the status bar now?
Or does the crash only occur if you follow your description (e.g. only after the
fields-dialog was launched from the status bar and then the status bar has been
configured...)

are you using a localized build?
Comment 2 rayll 2004-04-06 20:06:36 UTC
it only crashes if i follow the description, and is fine on the next startup.

i am using OOo_1.1.1_LinuxIntel_install.tar.gz, size 79899184.  i just
reinstalled from scratch and can still reproduce.  i untarred the
distribution, went into the directory, and did './setup -net' as
root, keeping all defaults.  i am running a SuSE 8.2 box with all updates.
my java RPM is j2re-1.4.2_04-fcs.  Next, as a normal user i typed
'/opt/OpenOffice.org1.1.1/setup' and did a workstation install, keeping all
defaults.  Finally, i did '~/OpenOffice.org1.1.1/soffice' and followed the
previous instructions, and reproduced the crash.

Comment 3 mci 2004-04-07 14:22:10 UTC
Hi rayll,

thanks for using and supporting OpenOffice.org...

I followed your steps on RedHatLinux9 using OOo1.1.1 (from OpenOffice.org) and
didn't get that crash...
Comment 4 rayll 2004-04-07 15:02:47 UTC
ok, maybe a SuSE specific thing then.  it also happens reliably on my home
machine, which is also a SuSE 8.2 machine with all online updates applied.

does anyone else have a SuSE machine to test on?
Comment 5 rayll 2004-04-07 17:05:22 UTC
ok, i dug into this one with gdb and a copy of the source tarball.... it's
my first time touching the ooo code, and my copy has no debugging symbols,
so this might be way out to lunch, but here goes:

it seems that SfxStatusBar_Impl::MouseButtonDown(MouseEvent const&) () is
calling SfxStatusBar_Impl::GetItemAt(MouseEvent const&) () and not liking
what comes back.  i debugged it a few times, and when it crashes, it is the
call to *0x1c(%eax) which craps out, where eax is derived from the return
value of the GetItemAt call.

in GetItemAt, it seems that the aLastItemRect.IsInside(aMousePos) call is
returning true, so the function returns the value of pLastControl, which is
a cached value obtained from pMgr->FindControl_Impl( nId ) a few lines below.

Looking into the pMgr, it seems that it's just an array of pointers.  That is
well and good, but the void SfxPtrArr::Append( void* aElem ) may realloc that
array. if that happens, nobody (apparently) notifies pLastControl to flush
the cached pointer, therefore the next call to GetItemAt will return a
pointer to deleted memory.

sound plausible?
Comment 6 lohmaier 2004-04-07 19:11:08 UTC
No I managed to reproduce.
The trick is not to dismiss the fields dialog!

So here's again the reciepe:
1) Open a new writer document
2) double-click the status bar to bring up the fields dialog (but don't close
it, keep it open)
3) Choose Tools|Configure and check the time to be displayed on the status bar
and confirm the configure-dialog with "OK"
4) With the fields-dialog still open double click the status bar
 -> crash

(normally double clicking the status bar with an open fields-dialog will dismiss
the dialog)
 
Comment 7 rayll 2004-04-07 20:17:25 UTC
interesting... mine crashes whether i dismiss the fields dialog or not...
Comment 8 michael.ruess 2004-04-13 09:52:24 UTC
MRU->ES: please have a look. Perhaps a good 1.1.3 issue...
Comment 9 eric.savary 2004-04-14 11:13:37 UTC
Reproduced on SuSE Linux following the first description
Comment 10 Oliver Specht 2004-04-14 11:16:17 UTC
OS->ES: Could you please create a _valid_ stacktrace.
Comment 11 eric.savary 2004-04-14 11:30:57 UTC
Have a look at crash report 124750
Comment 12 Oliver Specht 2004-04-14 11:42:44 UTC
That looks like a gsl problem.

libpthread.so.0 + 0x912b  --  could not find checksum in database
libc.so.6 + 0x29d68  --  could not find checksum in database
ImplHandleMouseEvent(Window*, unsigned short, unsigned char, long, long,
unsigned long, unsigned short, unsigned short)
/net/jumbo.germany/sol1/SRC680/src.m34/vcl/source/window/winproc.cxx:843
ImplWindowFrameProc(void*, SalFrame*, unsigned short, void const*)
/net/jumbo.germany/sol1/SRC680/src.m34/vcl/source/window/winproc.cxx:2207
X11SalFrame::HandleMouseEvent(_XEvent*)
../../../inc/salframe.hxx:271
.L2696
/net/jumbo.germany/sol1/SRC680/src.m34/vcl/unx/source/window/salframe.cxx:3471
SalDisplay::Dispatch(_XEvent*)
/net/jumbo.germany/sol1/SRC680/src.m34/vcl/unx/source/app/saldisp.cxx:2493
SalX11Display::Yield(unsigned char)
.
Comment 13 stefan.baltzer 2004-05-18 14:11:19 UTC
SBA:This doesn't affect the average user. Those who know about this one are
probably only the ones who read this and they know convenient workarounds. So
nobody's work is in real danger. Target set to "OOo later". 
Comment 14 apremchandran 2004-07-15 11:12:27 UTC
The solution to the problem can be seen in

http://bugzilla.ximian.com/show_bug.cgi?id=59374

The patch can be found in the above URL.
Comment 15 lohmaier 2004-07-16 18:53:46 UTC
setting to type patch...
Comment 16 lohmaier 2004-07-16 18:56:06 UTC
Created attachment 16521 [details]
patch from apremchandran posted to ximian's bugzilla
Comment 17 stephan_schaefer 2005-12-02 15:02:39 UTC
ssa: reassign to hdu
Comment 18 hdu@apache.org 2005-12-21 08:47:19 UTC
HDU->CD: when cleaning up my intray it stumbled over this nice patch to the
framework. Please handle.
Comment 19 carsten.driesner 2006-01-03 10:38:26 UTC
cd: Thanks for the patch and the support. 
OOo 2.0.x doesn't have a status bar configuration anymore. I think we will
rewrite the whole configuration code for the next major. Due to limited
resources we cannot fix every minor bug on OOo 1.1.x, therefore I set this bug
to "WONTFIX".
Comment 20 Mathias_Bauer 2006-02-09 08:55:16 UTC
closing