Apache OpenOffice (AOO) Bugzilla – Issue 45760
warn instead of crashing on bad env ...
Last modified: 2005-03-23 10:16:33 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" );
cp->ssa: please have a look, I couldn't figure out what this is good for. Who would set STAR_RESOURCEPATH ?
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'
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 ***
closing
apologies for the noise.