discuss-gnustep
[Top][All Lists]
Advanced

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

addressmanager crashing and NSViews being treated as a NSControl


From: Riccardo Mottola
Subject: addressmanager crashing and NSViews being treated as a NSControl
Date: Wed, 10 Mar 2010 23:06:52 +0100
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.6) Gecko/20100109 SeaMonkey/2.0.1

Hi,

I have looked a bit more in the AddressManager crash. I first was able to confirm that it wasn't happening on older GNUstep versions. Also It is totally unrelated to the NIB errors posted in another message by Gregory, sorry for the useless noise.

This is the stacktrace:
#0  -[NSException raise] (self=0x291af2e8, _cmd=0x2875b3c8)
    at NSException.m:900
#1  0x285ce644 in +[NSException raise:format:arguments:] (self=0x2875b1e0,
    _cmd=0x2875b3b0, name=0x2875b4f4, format=0x28771ca4,
argList=0xbfbfd8d0 "Ì\234\r(´*q(*\fE(¨í{( \031w(°ô\\(*\fE(¨í{(°\032w( \203a((Ù¿¿þia(hEð(°\032w(p¢=(@él( \036") at NSException.m:838
#2  0x285cf503 in +[NSException raise:format:] (self=0x2875b1e0,
_cmd=0x287719a0, name=0x2875b4f4, format=0x28771ca4) at NSException.m:824
#3  0x2861844f in -[NSObject doesNotRecognizeSelector:] (self=0x28f04568,
    _cmd=0x28771ab0, aSelector=0x283da270) at NSObject.m:1563
#4  0x286169fe in -[NSObject forwardInvocation:] (self=0x28f04568,
    _cmd=0x28f16078, anInvocation=0x29695a68) at NSObject.m:1598
#5  0x286cf6d0 in GSFFIInvocationCallback (cif=0x291e1b50, retp=0xbfbfda00,
    args=0xbfbfd9b0, user=0x291e1b50) at GSFFIInvocation.m:636
#6  0x28d477fe in ffi_closure_SYSV_inner (closure=0x295ef000,
    respp=0xbfbfda0c, args=0xbfbfda20) at src/x86/ffi.c:414
#7  0x28d47b9e in ffi_closure_SYSV () from /usr/local/lib/libffi.so.5
#8  0x281d820f in -[NSCell(PrivateMethods) _drawEditorWithFrame:inView:] (
    self=0x2969ffd8, _cmd=0x284527f0, cellFrame=
        {origin = {x = 0, y = 0}, size = {width = 126, height = 22}},
    controlView=0x28f04568) at NSCell.m:2953
#9  0x282ec601 in -[NSTextFieldCell drawInteriorWithFrame:inView:] (
    self=0x2969ffd8, _cmd=0x283d9eb8, cellFrame=
        {origin = {x = 0, y = 0}, size = {width = 126, height = 22}},
    controlView=0x28f04568) at NSTextFieldCell.m:229
#10 0x281d67a2 in -[NSCell drawWithFrame:inView:] (self=0x2969ffd8,
    _cmd=0x283bb4c0, cellFrame=
        {origin = {x = 0, y = 0}, size = {width = 126, height = 22}},
    controlView=0x28f04568) at NSCell.m:2054
#11 0x28186208 in -[NSActionCell drawWithFrame:inView:] ()
    at NSActionCell.m:344
#12 0x280c93a7 in -[ADPersonPropertyView drawRect:] (self=0x28f04568,
    _cmd=0x2845eb00, rect=
        {origin = {x = 0, y = 0}, size = {width = 126, height = 22}})
    at ADPersonPropertyView.m:481
#13 0x2830bcd7 in -[NSView displayRectIgnoringOpacity:inContext:] (
    self=0x28f04568, _cmd=0x2845eaf0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 126, height = 22}},
    context=0x298944c8) at NSView.m:2435
#14 0x2830c27c in -[NSView displayRectIgnoringOpacity:inContext:] (
    self=0x28f3e248, _cmd=0x2845eaf0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 335, height = 294}},
    context=0x298944c8) at NSView.m:2468
#15 0x2830c27c in -[NSView displayRectIgnoringOpacity:inContext:] (
    self=0x298b5be8, _cmd=0x2845eaf0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 335, height = 294}},
    context=0x298944c8) at NSView.m:2468
#16 0x2830c27c in -[NSView displayRectIgnoringOpacity:inContext:] (
---Type <return> to continue, or q <return> to quit---


The code is considering a NSView (ADPersonPropertyView is a sublass of it) as a NSControl by casting it, this is the problem. The change was done :

29133 wlux NSText *textObject = [(NSControl*)controlView currentEditor];
$ svn log -r29133
------------------------------------------------------------------------
r29133 | wlux | 2009-12-17 01:03:07 +0000 (Thu, 17 Dec 2009) | 4 lines

Fix various issues when drawing controls with edited cells. This
includes a fix for the problem of properly resizing and redrawing the
editor when the cell is resized or moved during editing (bug #22678).


I think this needs to be fixed in a better way. Wolfgang?
If this patch can't be fixed, I suggest reverting this change before it slips into the next release.

Riccardo






reply via email to

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