discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Printing not working at all...


From: Richard Frith-Macdonald
Subject: Re: Printing not working at all...
Date: Fri, 15 Jul 2016 17:11:51 +0100

> On 15 Jul 2016, at 17:00, Riccardo Mottola <riccardo.mottola@libero.it> wrote:
> 
> Hi,
> 
> Richard Frith-Macdonald wrote:
>>> Richard, do you have a clue why we crash inside NSCountFrames() when 
>>> allocating the exception??
>> That's quite common; when the stack is corrupt (and possibly in some other 
>> circumstances on older systems), the function to count the stack frames will 
>> segmentation fault.
>> The stack frame unwindiing code therefore wraps things in a signal handler 
>> to catch attempts to walk off the end of the stack, and recover/continue.
> 
> but the stack shouldn't be corrupt if we are just using the wrong domain to 
> retrieve the PPD file and the PPD file doesn't get found.
> 
> ppdString = [NSString stringWithContentsOfFile: ppdPath];
> 
> Is I suppose safe and tested against non-existing files.
> Perhaps the corruption happened because we did something invalid much earlier?

I didn't say the stack was corrupt ....there can be other reasons why the gcc 
builtin stack functions cause a signal.

> I still find it a bit bad that in such a condition we can't warn the user and 
> instead crash with a SIGSEV.

We don't crash ... we catch the signal in a signal handler, and 
recover/continue.
If you are running under gdb, then gdb catches the signal first, but that's not 
a crash, it's just gdb letting you look at the app at the point when the signal 
occurs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]