discuss-gnustep
[Top][All Lists]
Advanced

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

Re: CodeEditor


From: Fred Kiefer
Subject: Re: CodeEditor
Date: Thu, 25 Feb 2010 10:23:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0

Richard,

thank you very much for this explanation. I had a look at the current
CVS code of CodeEditor. Where it is using _generateGlyphsForRun:at:, it
should now use _run_cache_attributes::, but again this is an internal
method and never should be used.

As far as I understand these changes to the layout manager, they are
about avoiding ligature creation. Wouldn't it be much simpler to just
make sure that the attributed string that gets processed has its
ligature attribute set to 0?
The rest of the changes in CEViewLayoutManager are completely beyond me.
There isn't any comment on what they are doing.

But perhaps I am looking at the wrong code? The web page and CVS talk
about release 4.3, but in the download area there is a 4.4 release.
Perhaps the code gets maintained somewhere else now?

Fred

Am 25.02.2010 05:36, schrieb Richard Frith-Macdonald:
> On 24 Feb 2010, at 22:45, Fred Kiefer wrote:
>> Am 24.02.2010 18:09, schrieb J. Jordan:
>>> Does anyone know of any patches for CodeEditor that might prevent
>>> it from crashing as soon as you type a letter into a new
>>> document?  I filed a bug report and tried to email the developer
>>> but have not gotten any response.  I have seen this bug talked
>>> about on the web but no solution was offered.
>>> 
>>> debugapp shows:
>>> 
>>> Program received signal SIGSEGV, Segmentation fault. 
>>> 0x00007ffff7896231 in -[NSLayoutManager(layout) 
>>> _insertionPointRectForCharacterIndex:textContainer:]
>>> (self=0xc64280, _cmd=0x7ffff7d014d0, cindex=1, 
>>> textContainer=0x7fffffffcfec) at NSLayoutManager.m:846 846
>>> for (j = 0, lp = lf->points; j < lf->num_points; j++, lp++)
>>> 
>>> consistently when it crashes.
>>> 
>>> I would really like to use this while I am learning C, project
>>> center does not have line numbers and is really cantankerous
>>> about saving files.
>> 
>> This is clearly a bug in NSLayoutManager. We are accessing a
>> variable that hasn't been set. I will investigate this and try to
>> fix it. But it may take some time and will require that you follow
>> SVN.
> 
> I'm not so sure ... when I got the latest (2004) code and built it, I
> got a crash in _insertionPointRectForCharacterIndex:textContainer:
> because it was trying to do r = lf->used_rect when lf was 0.  The
> obvious fix in the context of an empty document was 'r = (lf == 0) ?
> NSZeroRect : lf->used_rect; so I tried that.
> 
> Then I got an unresponsive application (I pressed keys and nothing
> happened), which confused me for a bit until I realised that the
> application main loop was catching and hiding exceptions ... and it
> turned out that:
> 
> CEViewTypesetter was sending a _generateGlyphsForRun:at: message to
> CEViewLayoutManager CEViewLayoutManager was then sending
> _generateGlyphsForRun:at: to it's superclass (NSLayoutManager) and
> NSLayoutManager doesn't implement that method, so it raised an
> exception.
> 
> I think the trouble here is that the code is using private methods
> (and internal data structures) of GSLayoutManager rather than keeping
> to the public API, and the way the internals of the text system works
> has changed over the (several) years since the application was
> written and last maintained.
> 
> So it's not sufficient to fix a bug in NSLayout manager (indeed I'm
> not completely certain the crash in NSLayoutManager can happen if you
> stick to the public API) ... someone needs to have the time to look
> at CodeEditor and fix issues there.




reply via email to

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