Issue 42355 - OOo crashes when it is unable to find resources
Summary: OOo crashes when it is unable to find resources
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: 680m76
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.0.1
Assignee: philipp.lohmann
QA Contact: issues@tools
URL:
Keywords:
: 45760 (view as issue list)
Depends on:
Blocks:
 
Reported: 2005-02-09 16:35 UTC by kendy
Modified: 2005-10-06 11:59 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 kendy 2005-02-09 16:35:05 UTC
See the bug 41034, please. To reproduce, just move your 
"<OOo-inst>/program/resource" to another place, execute OOo, and see it 
crashing somewhere in vcl. 
 
It would be better if it it wrote something like "Resources cannot be found, 
exiting. Hint: If you use linkoo, didn't you forget to source the 'env' 
script?" and exited with an error status.
Comment 1 Martin Hollmichel 2005-03-09 10:26:07 UTC
reassign
Comment 2 philipp.lohmann 2005-03-11 13:37:20 UTC
I can fix the places in vcl; also i can build in an error message if the vcl
resource is not found. What i cannot do in a reasonable timeframe is fix the
whole office. The reason for the crashes in vcl (as IMHO everywhere else) is tha
the result of CreateResMgr is never checked for NULL since this is a case that
can only occur after either malevolent user intervention (as e.g. renaming the
resource directory ;-) ) or after a failed/unfinished installation.

So would it be a reasonable compromise to fix the vcl cases and emit a warning
here ? It will still crash somewhere else but vcl, but at least you have a hint
on the terminal and/or an error box.
Comment 3 kendy 2005-03-11 14:06:46 UTC
Oh :( Is NULL a valid result of CreateResMgr? If yes, then we probably couldn't 
do anything other than fixing the affected places. But if not, shouldn't 
CreateResMgr just exit the whole application instead of returning NULL? 
Comment 4 philipp.lohmann 2005-03-11 14:39:48 UTC
NULL indeed is a valid return value from CreateResMgr; e.g. there are places in
desktop project where the return value is checked and NULL has meaning. In fact,
sometimes a value of NULL for a ResMgr ptr can even be used to load a resource
since there is a fallback to the first resource file being set as application
resource (this consept is straight from hell, but we have to live with it still
since there is code out there that needs this fallback).

So indeed all places using resources would need to be checked - of which there
are MANY.

Still, i could fix vcl in that regard and emit an error message and exit()  if
vcl resources are not found. Since vcl resources are accessed so early a not
existing vcl resource would be a good indicator that something is not well with
resources. Of course this would would not solve the issue of singular missing
resource files.
Comment 5 philipp.lohmann 2005-03-18 08:17:41 UTC
No further comments, so i guess i'll implement this the described way
Comment 6 philipp.lohmann 2005-03-18 14:57:00 UTC
fixed in CWS vcl39
Comment 7 stephan_schaefer 2005-03-23 09:51:10 UTC
*** Issue 45760 has been marked as a duplicate of this issue. ***
Comment 8 philipp.lohmann 2005-06-14 17:19:24 UTC
verified in CWS vcl39
Comment 9 philipp.lohmann 2005-10-06 11:59:10 UTC
verified in m132

closing