Issue 84237

Summary: Assertions while opening Stylist
Product: Writer Reporter: Oliver Specht <os_ooo>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: andreas.martens, issues, pb, philipp.lohmann
Version: 680m237   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Oliver Specht 2007-12-04 15:29:03 UTC
Error: ResId without ResMgr created From File ..\..\inc\tools/resid.hxx at Line 79
Error: file:///c:/home/os93737/cwslocal/o_os109/SRC680/common/bin.m237/sw680de.res
Class: Resource, Id: 268. Cannot load resource! 
Resource Stack

Error: file:///C:/home/os93737/office/cwsos109/program/resource/sw680en-US.res
Class: Resource, Id: 268. Cannot load resource! 
Resource Stack

This should load the resource SfxStyleFamilies DLG_STYLE_DESIGNER which is
contained in the sw680<locale>.res. 

Stack: 
        ...
 	tl680mi.dll!ResMgr::ResMgr(InternalResMgr * pImpMgr=0x0000010c)  Line 1029	C++
 	tl680mi.dll!ResMgr::CreateFallbackResMgr(const ResId & rId={...}, const
Resource * pResource=0x00efeee8)  Line 1531	C++
 	tl680mi.dll!ResMgr::GetResource(const ResId & rId={...}, const Resource *
pResObj=0x00efeee8)  Line 1249 + 0x13 bytes	C++
 	tl680mi.dll!Resource::GetRes(const ResId & rResId={...})  Line 71	C++
 	tl680mi.dll!Resource::Resource(const ResId & rResId={...})  Line 62	C++
 	sfx680mi.dll!svt::OLocalResourceAccess::OLocalResourceAccess(const ResId &
_rId={...})  Line 68 + 0x40 bytes	C++
 	sfx680mi.dll!SfxStyleFamilies::updateImages(const ResId & _rId={...},
BmpColorMode _eMode=BMP_COLOR_NORMAL)  Line 175	C++
 	sfx680mi.dll!SfxTemplateDialog_Impl::updateFamilyImages()  Line 2423	C++
 	sfx680mi.dll!SfxTemplateDialog_Impl::LoadedFamilies()  Line 2482	C++
 	sfx680mi.dll!SfxCommonTemplateDialog_Impl::ReadResource()  Line 980	C++
Comment 1 Oliver Specht 2007-12-04 15:29:45 UTC
Target set to 3.0
Comment 2 philipp.lohmann 2007-12-04 15:47:32 UTC
The ResMgr is missing in void SfxTemplateDialog_Impl::updateFamilyImages(). The
corresponding ResId gets created in sfx2/source/dialog/templdlg.cxx

891 void SfxCommonTemplateDialog_Impl::ReadResource()
892 {
893         // globale Benutzer-Resource auslesen
894         USHORT i;
895         for(i = 0; i < MAX_FAMILIES; ++i)
896                 pFamilyState[i] = 0;
897 
898         SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
899         pCurObjShell = pViewFrame->GetObjectShell();
900         ResMgr* pMgr = pCurObjShell ? pCurObjShell->GetResMgr() : NULL;
901         ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
902         aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
903         m_pStyleFamiliesId = new ResId( aFamId.GetId(), *pMgr );

From the looks of it seems that pCurObjShell is NULL:
Comment 3 Oliver Specht 2007-12-05 10:14:35 UTC
->pl: Sorry to disappoint you but pCurObjShell is not NULL. 
Comment 4 philipp.lohmann 2007-12-05 10:19:27 UTC
Which must then mean that pCurObjShell->GetResMgr() is NULL.
Comment 5 pb 2007-12-05 11:21:11 UTC
pb: No, pCurObjShell->GetResMgr() is not NULL.
The problem is here:
sal_Bool SfxStyleFamilies::updateImages()
{
    ...
    ::svt::OLocalResourceAccess aLocalRes( _rId ); // raises the assertion
    ...
}

Frank please have a look. Thx.
Comment 6 pb 2007-12-05 11:22:14 UTC
.
Comment 7 Frank Schönheit 2007-12-06 20:28:56 UTC
fs->pl: Actually, in line 1530 of resmgr.cxx, a ResId is created with a res
manager which is NULL:
  ResId aId( rId.GetId(), *pFallbackResMgr );
pFallbackResMgr is NULL here. While I consider the line questionable in itself
(why de-referencing a pointer which obviously can be NULL), the deeper reason
seems to be that one of the involved resources is in fact not available.

That is, the OLocalResourceAccess works okay, it is just fed with a non-existing
resource.
Comment 8 philipp.lohmann 2007-12-07 10:02:21 UTC
pl->fs: dang, you're right, in that place it should of course be pFallback, not
pFallbackResMgr. I'll create a separate issue for that.

However there is still a missing resource here which needs to be fixed, too.
Comment 9 philipp.lohmann 2007-12-07 10:12:26 UTC
separate issue for ResMgr fallback is issue 83337
Comment 10 pb 2008-06-03 17:33:39 UTC
pb: too late for 3.0 -> 3.x.
Comment 11 Mathias_Bauer 2009-05-07 13:37:32 UTC
grabbing issue
Comment 12 Marcus 2017-05-20 11:15:19 UTC
Reset assigne to the default "issues@openoffice.apache.org".