[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Startup problems due to help



In message <44B36E6B.7060207@xxxxxxxx>
          Luke Hart <lukeh@xxxxxxxx> wrote:

> Martin Wuerthner wrote:
>> Since the latest change that enabled the help functionality XaraLX
>> fails to start up here. After some tracing through the code I noticed
>> that InitHelpPath insists on finding the directory
>> /usr/share/xaralx/doc/en, which does not exist here - which is not a
>> surprise since I cannot see how that should have been created by the
>> build process.
>>
>> Do we really want the application to refuse to start up just because
>> it cannot find its help files? We have done fine without them up to
>> now, so we should really allow the app to start without them.
>
> Sorry about that, I hadn't realized that a failure in InitHelpPath would
> propagate back and cause the application to bomb out. Fixed in current
> head (SVN #1427)

Thanks, that has fixed it.

>> Even worse, the error message is rather less than helpful: In
>> non-debug mode, an empty error box is displayed. In debug mode, it
>> reads "InformGeneral: This error has already been reported". The trace
>> says "Recursive InformGeneral - Error in error handler! (1)".
>>
>> So, if we really insist on bombing out just because there is no help
>> file, we should at least have a proper error message.

I guess, that happened because InitHelp returned FALSE without setting 
the error somewhere. If any initialisation fails, InitKernel calls 
InformError() without any argument, assuming that the static error 
message has been set by the component that failed to initialise. It 
might be a good idea to set this to some generic error message at the 
beginning to cover that case - everything would be better than having 
an empty error box. As development continues it is well possible that 
this can happen again because it is difficult to enforce an interface 
like "you may only return FALSE from an initialisation routine if you 
have set the static error".

Martin