Fred, I attached the stacktrace.
If you want any code removed, or have anything recompiled, I can do that. But what concerns the why of the code, I'm afraid my knowldge is insufficient. If it were Cobol on a mainframe.... Thanks, Edwin 2013/11/19 Fred Kiefer <[email protected]> > Could you please share the whole stack trace? Maybe I understand the > issue a little bit better then. > > From looking at the code in FSNBrowserCell I can tell that the value of > dtslenght never gets used. Why is it computed at all? And why in the > +initialize method? At that point in time the initialisation of the > backend might not be completed, which could be the reason for the > segmentation fault. > > There is similar code in FSNTextCell, which at least treats this value > as a per object one, although it again is never used. I think this is > left over code that should be removed. And the actual shortening code > between these two classes should be reused, maybe moved into gui? > > Fred > > > > On 19.11.2013 13:09, Riccardo Mottola wrote: > > Hi Edwin. > > > > from the stacktrace you provided, teh relevant part is this: > > > > #0 -[NSString(NSStringDrawing) > > boundingRectWithSize:options:attributes:] (self=0xb7fdfad8 > > <.objc_str476>, _cmd=0xb7e0d040 <.objc_selector_list+240>, > > size=..., options=NSStringDrawingUsesLineFragmentOrigin, > > attrs=0x8a723c8) at NSStringDrawing.m:683 > > #1 0xb7b7430e in -[NSString(NSStringDrawing) sizeWithAttributes:] > > (self=0xb7fdfad8 <.objc_str476>, _cmd=0xb7fdfb80 > <.objc_selector_list+144>, > > attrs=0x8a723c8) at NSStringDrawing.m:673 > > #2 0xb7f6824f in +[FSNBrowserCell initialize] (self=0xb7fdfa40 > > <_OBJC_CLASS_FSNBrowserCell>, _cmd=0x8223d40) at FSNBrowserCell.m:87 > > > > > > > > I'm unsure what is happening here. Either fontAttr is returning > > soemthing null and you are on a platform where getting .width out of > > null generates a stacktrace, but that would be typical of sparc, not x86. > > > > The second question is however how that could happen. > > > > fontAttr = [NSDictionary dictionaryWithObject: [NSFont > > systemFontOfSize: 12] > > forKey: > NSFontAttributeName]; > > > > Should always return soemthing meaningful, I suppose? It's asking for > > the size 12 system font, something extremely standard! > > > > Could you put a breakpoint there and print fontAttr? > > > > > > > > Then it does: > > > > dtslenght = [dots sizeWithAttributes: fontAttr].width; > > > > where dots is a: > > static NSString *dots = @"..."; > > > > which looks quite reasonable for me. A static string, no fancy > characters. > > > > Riccardo > >
_______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
