Issue 333 - crash in tools->options->filter settings
Summary: crash in tools->options->filter settings
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 614
Hardware: PC Linux, all
: P2 Trivial (vote)
Target Milestone: ---
Assignee: Oliver Specht
QA Contact: issues@www
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-26 16:54 UTC by sander_traveling
Modified: 2003-12-06 14:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sander_traveling 2001-01-26 16:54:19 UTC
The following reproducably causes a crash on Linux:
	tools
	options
	expand filter settings
	select html
	click to collapse filter settings
Comment 1 khendricks 2001-01-26 17:36:27 UTC
Re: [porting-dev] Anyone else getting this abort on 614?
Date: Fri, 26 Jan 2001 12:30:57 -0500
From: Kevin B. Hendricks <khendricks@ivey.uwo.ca>
To: Sander Vesik <Sander.Vesik@ireland.sun.com>,  dev@porting.openoffice.org
Cc: khendricks@ivey.uwo.ca
Reply to: khendricks@ivey.uwo.ca


Hi Sander,

> This is now the 'number of the half-beast' (333) issue in framework.


This should be an easy fix.  It seems to be caused by some out-of-sync-ness 
of two structures.

Here is the problem code in question:

(gdb) info frame
Stack level 3, frame at 0x7fffded0:
 pc = 0xee6b088 in OfaTreeOptionsDialog::ShowPageHdl_Impl(SvTreeListBox *)
    (/src2/openoffice-614/offmgr/source/offapp/dialog/treeopt.cxx:616); 


(gdb) list
611                      for(sal_uInt16 i = 0; i < aHelpTextsArr.Count(); i++)
612                      {
613                              if(aHelpTextsArr.GetValue(i) ==
pTGInfo->nDialogId)
614                              {
615                                     
aHelpFT.SetText(aHelpTextsArr.GetString(i));
616                                      aHelpImg.SetImage(*aHelpImages[i]);
617                              }
618                      }
619                      aHelpFT.Show();
620                      aLine1FL.Show();


The problem is that we have defined only 11 Images but 12 HelpTexts:

Here are the two key pieces (taken from that same file)

250              aHelpImages[0] = new Image( Bitmap( ResId( IMG_GENERAL ) ) ); 
251              aHelpImages[1] = new Image( Bitmap( ResId( IMG_INET ) ) );
252              aHelpImages[2] = new Image( Bitmap( ResId( IMG_TEXT ) ) );
253              aHelpImages[3] = new Image( Bitmap( ResId( IMG_HTML ) ) );
254              aHelpImages[4] = new Image( Bitmap( ResId( IMG_CALC ) ) );
255              aHelpImages[5] = new Image( Bitmap( ResId( IMG_PRESENTATION ) )
);
256              aHelpImages[6] = new Image( Bitmap( ResId( IMG_DRAW ) ) );
257              aHelpImages[7] = new Image( Bitmap( ResId( IMG_MATH ) ) );
258              aHelpImages[8]= new Image( Bitmap( ResId( IMG_CHART ) ) );
259              aHelpImages[9]= new Image( Bitmap( ResId( IMG_BASE ) ) );
260              aHelpImages[10]= new Image( Bitmap( ResId( IMG_FILTER ) ) );

but 

587                      static const sal_uInt16 _aGlobalHelpIds[] =
588                      {
589                              HID_OFADLG_TREE_GENERAL                        
,
590                              HID_OFADLG_TREE_INTERNET        , 
591                              HID_OFADLG_TREE_BROWSER         ,
592                              HID_OFADLG_TREE_TEXT            ,
593                              HID_OFADLG_TREE_HTML            ,
594                              HID_OFADLG_TREE_CALC            ,
595                              HID_OFADLG_TREE_PRESENTATION    ,
596                              HID_OFADLG_TREE_DRAWING         ,
597                              HID_OFADLG_TREE_FORMULA                        
,
598                              HID_OFADLG_TREE_CHART                   ,
599                              HID_OFADLG_TREE_BASE                    ,
600                              HID_OFADLG_TREE_FILTER
601                      };
601                      };
602      
603                      DBG_ASSERT( aHelpTextsArr.Count() ==
604                                              sizeof( _aGlobalHelpIds ) /
sizeof(_aGlobalHelpIds[0]),
605                                              "fehlende HelpIds!!" );
606      


There are 12 of the above (they added BROWSER which does not exist in the 
images list).

So we end up calling aHelpImg.SetImage(*aHelpImages[i]) in line 616 but i is:
(gdb) print i
$4 = 11

So we need to sync up these lists somehow.

I unfortuantely do not know which to expand or which to shrink.

By the way, the segfault actually comes later

#0  0xeb7be88 in Image::operator== (this=0x0, rImage=@0x1022ec40)
    at /src2/openoffice-614/vcl/source/gdi/image.cxx:448
#1  0xed5e344 in Image::operator!= (this=0x0, rImage=@0x1022ec40)
    at ../../inc/image.hxx:122
#2  0xeca5880 in FixedImage::SetImage (this=0x1022ea28, rImage=@0x0)
    at /src2/openoffice-614/vcl/source/control/fixed.cxx:1033
#3  0xee6b088 in OfaTreeOptionsDialog::ShowPageHdl_Impl (this=0x1022d5f0, 
    pBox=0x1022ee9c)
    at /src2/openoffice-614/offmgr/source/offapp/dialog/treeopt.cxx:616

When the "this" value arrives as 0 for that image.


Hope this helps.

Kevin
Comment 2 issues@www 2001-01-27 20:37:16 UTC
I had the same problem when I tried it as non-root; 
when launching OO as root the problem did not appear, but 
after that I had to chown recursively to myself in order to
be able to write the configuration file as non-root. 
Comment 3 stx123 2001-02-01 23:13:20 UTC
Too me this seems to be fixed in 1.13, which will be used for OpenOffice619.
Comment 4 Oliver Specht 2001-02-08 08:07:52 UTC
fixed in 618
Comment 5 khendricks 2003-02-03 17:39:29 UTC
Hi Frank, 
 
Could you take a look at this bug report and let me know if this may 
be related to your fix for Issue 4502? 
 
Could that fix have somehow been dropped for OOo 1.0.2 by mistake or 
someohow the bug reintroduced? 
 
Any hints you might have would be greatly appreciated since I can 
not recreate this on my Linux box at all. 
 
Thanks, 
 
Kevin 
 
Comment 6 khendricks 2003-02-03 17:41:19 UTC
 Hi, 
 
Whoops, I posted to the wrong issue.  Sorry about that.  Please 
ignore my last post. 
 
Kevin 
 
Comment 7 Oliver Specht 2003-06-19 08:26:36 UTC
Closed