Apache OpenOffice (AOO) Bugzilla – Issue 42355
OOo crashes when it is unable to find resources
Last modified: 2005-10-06 11:59:10 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.
reassign
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.
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?
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.
No further comments, so i guess i'll implement this the described way
fixed in CWS vcl39
*** Issue 45760 has been marked as a duplicate of this issue. ***
verified in CWS vcl39
verified in m132 closing