Issue 45760 - warn instead of crashing on bad env ...
Summary: warn instead of crashing on bad env ...
Status: CLOSED DUPLICATE of issue 42355
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: 680m79
Hardware: Other All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: stephan_schaefer
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-22 13:43 UTC by mmeeks
Modified: 2005-03-23 10:16 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mmeeks 2005-03-22 13:43:52 UTC
So - a number of people have fallen over this one - and it discourages people
from using / debugging OO.o. This somewhat trivial patch at least stops some
ghastly stack trace spewing out in favour of something comprehensible.

--- vcl/source/app/svmain.cxx   24 Feb 2005 15:23:19 -0000      1.53
+++ vcl/source/app/svmain.cxx   22 Mar 2005 13:41:35 -0000
@@ -248,6 +248,15 @@
 {
     RTL_LOGFILE_CONTEXT( aLog, "vcl (ss112471) ::SVMain" );
 
+#ifdef UNX
+       if( !getenv( "STAR_RESOURCEPATH" ) )
+       {
+               fprintf( stderr, "** Error: Your environment looks broken, if
you're using linkoo "
+                                "you need to source ./env before running
soffice.bin\n" );
+               return FALSE;
+       }
+#endif
+
     ImplSVData* pSVData = ImplGetSVData();
 
     DBG_ASSERT( pSVData->mpApp, "no instance of class Application" );
Comment 1 christof.pintaske 2005-03-23 09:18:55 UTC
cp->ssa: please have a look, I couldn't figure out what this is good for. Who
would set STAR_RESOURCEPATH ?
Comment 2 mmeeks 2005-03-23 09:36:49 UTC
The 'soffice' wrapper shell script sets this environment variable; without it we
get a seg-fault when the 1st user tries to get a resource.
Of course - you can't debug a shell-script, you have to run 'soffice.bin'
Comment 3 stephan_schaefer 2005-03-23 09:51:11 UTC
according to pl, it's a duplicate - and btw the soffice script (at least on a
m87) does not set STAR_RESOURCEPATH, which would make this patch a perfect show
stopper...

*** This issue has been marked as a duplicate of 42355 ***
Comment 4 stephan_schaefer 2005-03-23 09:52:29 UTC
closing
Comment 5 mmeeks 2005-03-23 10:16:33 UTC
apologies for the noise.