Hello, all!

Sorry for my technical English.
I got a rary error with QCView. Prev. question with same crashing stack (from 
different people and some years ago) has no pubilc answer from Apple.
The standalone window (created outside the big-big GUI project) is working 
fine... but this window (with equal line-by-line sources) inserted to this big 
project and called from menu is crashing.

Actual questions are: "What mean a _initWithBacking: exception of QCComposition 
class?" or "What is the internal state of the QCComposition class?"

Thanx for anythinks.

---- cut ----

Details:

Strong requarenments are:

1. 10.4 Tiger.
2. No nib files or Interface Builder usage (window must be created 
programmatically).


Simplified window creation code:


-( void )initWindowWithTitle:( NSString* )title // private inityializer: called 
from public
{
NSRect aboutRect = NSMakeRect( 0, 0, aboutWidth, aboutHeight );
NSRect compositionRect = NSMakeRect( xPos, yPos, 64, 64 );

m_rootView = [[NSView alloc] initWithFrame:global_defined_window_rect];
m_aboutView = [[MyAboutView alloc] initWithFrame:aboutRect];
m_compositionView = [[MyCompositionView alloc] initWithFrame:compositionRect];

[super setTitle:title];
[super setDelegate:self];
[super setReleasedWhenClosed:YES];
[super setBackgroundColor:[NSColor colorWithCalibratedRed: 237/norm green: 
237/norm blue: 237/norm alpha: 1]];
[super setContentView:m_rootView];

[m_rootView addSubview:m_aboutView];
[m_rootView addSubview:m_scrollView];
[m_rootView addSubview:m_compositionView];

// m_scrollView was been inited early
[m_scrollView setHidden:YES];

[super makeKeyAndOrderFront:nil]; // or self
}

-( MyAboutWindow* )initWithString:( NSString* )string
andTitle:( NSString* )title
{
if (self = [super initWithContentRect:global_defined_window_rect 
styleMask:NSTitledWindowMask|NSClosableWindowMask 
backing:DEF_BACKING_STORE_TYPE defer:NO])
{
m_scrollView = [[MyScrollView alloc] initWithFrame:class_var_a_scrollViewRect 
andContentString:string];
[self initWindowWithTitle:title]; // private initializer call
return self;
}
return nil;
}


// Inherited QCView class:


-( id )initWithFrame:( NSRect )rect
{
if (self = [super initWithFrame:rect])
{
[super setAutostartsRendering:YES];
[super setEraseColor:[NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0]];
[self loadCompositionFromFile:nil]; // nil means "try to load from bundle" 
below:
return self;
}
return nil;
}

-( BOOL )loadCompositionFromFile:( NSString* )path
{
return [super loadCompositionFromFile:( path ? path
: [[NSBundle bundleForClass:[self class]] pathForResource:@"composition" 
ofType:@"qtz"])];
}

Sorry, I can't demonstrate the full part of the big project... my window is 
called using setAction/target mechanics from the About menu.
I'll try a real composition and a blank composition created from template, a 
result is same.
Also I was try all three window backing store types and try to change order of 
window creation rule (load composition first add to window after etc).
Quartz framework is already linked.

23.10.10 13:51:06 [69258] '-[QCComposition _initWithBacking:]: Inconsistent 
state'
(
0   CoreFoundation                      0x96f78bba __raiseError + 410
1   libobjc.A.dylib                     0x97398509 objc_exception_throw + 56
2   CoreFoundation                      0x96fc39f1 -[NSException raise] + 17
3   QuartzComposer                      0x901c333e GFException + 198
4   QuartzComposer                      0x901c57f7 GFThrowException + 194
5   QuartzComposer                      0x9012fe87 -[QCComposition 
_initWithBacking:] + 190
6   QuartzComposer                      0x9012fdae +[QCComposition 
compositionWithFile:] + 152
7   QuartzComposer                      0x9016013c -[QCView 
loadCompositionFromFile:] + 52

8   avpgui.ppl                          0x031c1743 -[MyCompositionView 
initWithFrame:] + 259
9   avpgui.ppl                          0x031c2e2a -[MyAboutWindow 
initWindowWithTitle:] + 266
10  avpgui.ppl                          0x031c2290 -[MyAboutWindow 
initWithString:andTitle:] + 240
11  avpgui.ppl                          0x031c32bf 
showCocoaAboutWindowFromString + 175
12  avpgui.ppl                          0x0306eade 
_ZN7GUIImpl12ProcessEventEjP13cSerializableP9CItemBasejPb + 5998
13  avpgui.ppl                          0x03073f61 
_ZN7GUIImpl9OnCommandEP9CItemBasePKcS3_P13cSerializableS1_b + 8209
14  basegui.ppl                         0x01e1bc62 
_ZN9CRootItem9DoCommandEP9CItemBasePKcb + 290
15  basegui.ppl                         0x01dc4b86 -[ScriptingDelegate 
orderFrontCustomAboutPanel:] + 70

16  AppKit                              0x94077f1e -[NSApplication 
sendAction:to:from:] + 112
17  AppKit                              0x94077dd1 -[NSMenuItem 
_corePerformAction] + 435
18  AppKit                              0x94077ac2 -[NSCarbonMenuImpl 
performActionWithHighlightingForItemAtIndex:] + 174
19  AppKit                              0x940779ae -[NSMenu 
performActionForItemAtIndex:] + 65
20  AppKit                              0x94077961 -[NSMenu 
_internalPerformActionForItemAtIndex:] + 50
21  AppKit                              0x940778c7 -[NSMenuItem 
_internalPerformActionThroughMenuIfPossible] + 97
22  AppKit                              0x9407780b -[NSCarbonMenuImpl 
_carbonCommandProcessEvent:handlerCallRef:] + 336
23  AppKit                              0x9406bf49 NSSLMMenuEventHandler + 404
24  HIToolbox                           0x96b87f2f 
_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec 
+ 1567
25  HIToolbox                           0x96b871f6 
_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
 + 411
26  HIToolbox                           0x96ba99bb SendEventToEventTarget + 52
27  HIToolbox                           0x96bd5fa7 
_ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef
 + 448
28  HIToolbox                           0x96bfad1c 
SendMenuCommandWithContextAndModifiers + 66
29  HIToolbox                           0x96bfacd1 SendMenuItemSelectedEvent + 
121
30  HIToolbox                           0x96bfabda 
_ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
31  HIToolbox                           0x96bca2e4 
_ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
32  HIToolbox                           0x96bc9a56 _HandleMenuSelection2 + 465
33  HIToolbox                           0x96bc9874 _HandleMenuSelection + 53
34  AppKit                              0x9406548a _NSHandleCarbonMenuEvent + 
285
35  AppKit                              0x9403a03a _DPSNextEvent + 2304
36  AppKit                              0x940392ca -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
37  AppKit                              0x93ffb55b -[NSApplication run] + 821
38  basegui.ppl                         0x01daf7dd 
_ZN10CCocoaRoot11MessageLoopEP9CItemBase + 77
39  basegui.ppl                         0x01daf656 
_ZN10CCocoaRoot12ActivateDataEb + 502
40  basegui.ppl                         0x01e15695 _ZN9CRootItem8ActivateEb + 
565
41  avpgui.ppl                          0x03052efd 
_ZN7GUIImpl8SetStateE18enTaskRequestState + 77
42  kav                                 0x000040b8 _ZN3AVP4cAVP9CreateGUIEv + 
424
43  kav                                 0x00007418 _ZN3AVP4cAVP3RunEjPPc + 3256
44  kav                                 0x0000610e main + 1470
45  kav                                 0x000021e2 _start + 216
46  kav                                 0x00002109 start + 41
)
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to