Removing subview crashes host application
Removing subview crashes host application
- Subject: Removing subview crashes host application
- From: Ken Tozier <email@hidden>
- Date: Sat, 21 Apr 2007 15:16:01 -0400
Hi
I have a multipurpose custom view class inside a plugin palette that
changes it's entire contents in response to various runtime
contextual information. What I'm trying to do is delete everything
inside the custom view when major context changes occur but am
finding that when I do the following, the host app crashes
id sub = [[contextView subviews] objectAtIndex: 0];
[sub removeFromSuperview];
[sub autorelease]; // <- commenting this out has no effect on the
crashes
Here's the crash log
Thread 0 Crashed:
0 libobjc.A.dylib 0x90a53387 objc_msgSend + 23
1 com.apple.AppKit 0x93567bf6
carbonAppEventLoopObserverHandler + 529
2 com.apple.HIToolbox 0x92dcc17e
_NotifyEventLoopObservers + 162
3 com.apple.HIToolbox 0x92dce6a0
PostEventToQueueInternal + 861
4 com.apple.HIToolbox 0x92dd22a7
ConvertPlatformEventRecordAndPostWithOptions + 7056
5 com.apple.HIToolbox 0x92dd06ea
PullEventsFromWindowServerOnConnection + 844
6 com.apple.HIToolbox 0x92dd0371 MessageHandler + 44
7 com.apple.CoreFoundation 0x90838773 __CFMachPortPerform + 136
8 com.apple.CoreFoundation 0x90828a14 CFRunLoopRunSpecific +
2904
9 com.apple.CoreFoundation 0x90827eb5 CFRunLoopRunInMode + 61
10 com.apple.HIToolbox 0x92dcdb90
RunCurrentEventLoopInMode + 285
11 com.apple.HIToolbox 0x92dcd297 ReceiveNextEventCommon
+ 385
12 com.apple.HIToolbox 0x92e15929 _AcquireNextEvent + 58
13 com.apple.HIToolbox 0x92e15774
RunApplicationEventLoop + 150
14 com.quark.QuarkXPress 0x00189da4 main + 208
15 com.quark.QuarkXPress 0x00002e7a _start + 216
16 com.quark.QuarkXPress 0x00002da1 start + 41
Am I deleting the subview incorrectly?
Any help appreciated.
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden