On 04 Feb 2010, at 20:10, Adrian Ward wrote: > Thanks to everyone (vade especially) for helping me get this idea into a > usable plug-in.
Nothing seems to be rendered if I'm attempting to render a single image from a composition using the plugin, e.g. using QCRenderer.createSnapshotImageOfType. Possibly because you are deferring the actual rendering until an idle event - so the initial output image is blank? I found a little more info on what is going on behind the scenes to corrupt the output. Looking at backtraces in OpenGL Profiler, it looks like when NSAttributedString loads WebKit to do the rendering, it goes back to the runloop and reenters QCView - so we end up reentering QCView.render from within QCView.render (see lines 45 and 9 below, line 27 is where the StyledText plugin loads the html). So I'm guessing QCView.render is not reentrant and is corrupting it's OpenGL state somewhere. 0 0x117e384fd in gloGetCGLDispatch in <GLProfilerFBDisp> 1 0x7fff8347ca7c in -[QCOpenGLContext _clearGLContext] in <QuartzComposer> 2 0x7fff834801d8 in -[QCOpenGLContext renderBackground:] in <QuartzComposer> 3 0x7fff83439585 in -[QCOpenGLContext didPushRenderState:] in <QuartzComposer> 4 0x7fff83438590 in -[QCPatch(Extensions) beginLocalContext] in <QuartzComposer> 5 0x7fff834447dd in -[QCContext renderPatch:time:arguments:] in <QuartzComposer> 6 0x7fff83444615 in -[QCGraphicsContext renderPatch:time:arguments:] in <QuartzComposer> 7 0x7fff83443763 in -[QCOpenGLContext renderPatch:time:arguments:] in <QuartzComposer> 8 0x10000d873 in <Quartz Composer> 9 0x7fff8347fecf in -[QCView render:arguments:] in <QuartzComposer> 10 0x7fff86913fae in -[NSView _drawRect:clip:] in <AppKit> 11 0x7fff86912c21 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] in <AppKit> 12 0x7fff86912f8b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] in <AppKit> 13 0x7fff86912f8b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] in <AppKit> 14 0x7fff86912f8b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] in <AppKit> 15 0x7fff869112f3 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] in <AppKit> 16 0x7fff86910e17 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] in <AppKit> 17 0x7fff8690d6bf in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] in <AppKit> 18 0x7fff86886f37 in -[NSView displayIfNeeded] in <AppKit> 19 0x7fff86881dde in handleWindowNeedsDisplay in <AppKit> 20 0x7fff8320d427 in _CFRunLoopDoObservers in <CoreFoundation> 21 0x7fff831e92d4 in _CFRunLoopRun in <CoreFoundation> 22 0x7fff831e8c2f in CFRunLoopRunSpecific in <CoreFoundation> 23 0x7fff86c003b6 in -[NSHTMLReader _loadUsingWebKit] in <AppKit> 24 0x7fff86bf6542 in -[NSHTMLReader attributedString] in <AppKit> 25 0x7fff86a8337d in NSReadAttributedStringFromURLOrData in <AppKit> 26 0x7fff86ac2a5f in -[NSAttributedString(NSAttributedStringKitAdditions) initWithData:options:documentAttributes:error:] in <AppKit> 27 0x1157fb4fd in -[StyledTextPlugIn(Execution) execute:atTime:withArguments:] at StyledTextPlugIn.m: 149 28 0x7fff83567ef0 in -[QCPlugInPatch execute:time:arguments:] in <QuartzComposer> 29 0x7fff8343be0d in -[QCPatch(Private) _renderAtTime:arguments:] in <QuartzComposer> 30 0x7fff8343bd73 in -[QCRenderingManager addPatch:context:time:arguments:nextExecutionTime:] in <QuartzComposer> 31 0x7fff8343a6b6 in -[QCPatch(Private) __execute:arguments:] in <QuartzComposer> 32 0x7fff8343a301 in -[QCPatch(Private) _execute:arguments:] in <QuartzComposer> 33 0x7fff8343b02f in -[QCPort _execute:arguments:] in <QuartzComposer> 34 0x7fff8343a132 in -[QCPatch(Private) _execute:arguments:] in <QuartzComposer> 35 0x7fff8343ad55 in -[QCPatch(Private) _executeSubpatches:arguments:] in <QuartzComposer> 36 0x7fff8343ab68 in -[QCPatch(Customization) nextExecutionTimeForSubpatches:time:arguments:] in <QuartzComposer> 37 0x7fff8343aa68 in -[QCPatch(Customization) nextExecutionTime:time:arguments:] in <QuartzComposer> 38 0x7fff8343a9c4 in -[QCPatch(Private) _nextExecutionTime:arguments:] in <QuartzComposer> 39 0x7fff8343a65e in -[QCPatch(Private) __execute:arguments:] in <QuartzComposer> 40 0x7fff8343a301 in -[QCPatch(Private) _execute:arguments:] in <QuartzComposer> 41 0x7fff834383d1 in -[QCContext nextExecutionTimeForPatch:time:arguments:] in <QuartzComposer> 42 0x7fff83438208 in -[QCGraphicsContext nextExecutionTimeForPatch:time:arguments:] in <QuartzComposer> 42 0x7fff83438208 in -[QCGraphicsContext nextExecutionTimeForPatch:time:arguments:] in <QuartzComposer> 43 0x7fff83437fd7 in -[QCOpenGLContext nextExecutionTimeForPatch:time:arguments:] in <QuartzComposer> 44 0x10000d5f2 in <Quartz Composer> 45 0x7fff8347fda1 in -[QCView render:arguments:] in <QuartzComposer> 46 0x7fff8347f4dc in -[QCView startRendering:] in <QuartzComposer> 47 0x10000cd80 in <Quartz Composer> 48 0x7fff837dd85a in nsnote_callback in <Foundation> 49 0x7fff831f5e3a in _CFXNotificationPost in <CoreFoundation> 50 0x7fff831e23e8 in CFXNotificationPostNotification in <CoreFoundation> 51 0x7fff837d47c4 in -[NSNotificationCenter postNotificationName:object:userInfo:] in <Foundation> 52 0x7fff8684eebf in -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] in <AppKit> 53 0x7fff8684eb1c in -[NSWindow orderWindow:relativeTo:] in <AppKit> 54 0x7fff8684c49e in -[NSWindow makeKeyAndOrderFront:] in <AppKit> 55 0x7fff86a51121 in -[NSWindowController showWindow:] in <AppKit> 56 0x10000ca7f in <Quartz Composer> 57 0x7fff86df0a5b in -[NSToolbarButton sendAction:to:] in <AppKit> 58 0x7fff86a62efd in -[NSToolbarItemViewer mouseDown:] in <AppKit> 59 0x7fff8695068f in -[NSWindow sendEvent:] in <AppKit> 60 0x7fff86885e22 in -[NSApplication sendEvent:] in <AppKit> 61 0x10000a994 in <Quartz Composer> 62 0x7fff8681c796 in -[NSApplication run] in <AppKit> 63 0x100001d2b in <Quartz Composer> 64 0x7fff86815468 in NSApplicationMain in <AppKit> 65 0x100001258 in <Quartz Composer> _______________________________________________ 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]

