Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Display Link memory leaks ?



Hi !

I am trying to remove any memory link from my application that uses a DisplayLink to display QT movies.
I tried to use the command line utility "leaks" this way (I can't use objectalloc or such because my app is full screen) :
MallocStackLogging=1 ./myApp
and in a SSH session I type : 
leaks thePidOfMyApp

Good ! I can correct my memory links now.
But I am also warned of tons of leaks concerning the DisplayLink like the following :

Leak: 0x019ec000  size=3072     string ''
        Call stack: [thread ffffffff]: | 0x0 | _pthread_body | CVDisplayLink::runIOThread() | CVDisplayLink::performIO(CVTimeStamp*) | myCVDisplayLinkOutputCallback | -[EasyshadowPlayer renderAtTime:] | -[EasyshadowPlayer renderVideoChannel:withRenderer:atTime:andLocalTime:] | -[VideoChannel setNewFrameIfPossibleAtTime:onRenderer:] | QTVisualContextCopyImageForTime | QTVCCopyImageForTime | CallComponentDispatch | OpenGLTVC_ComponentDispatch | CallComponentFunctionCommon | OpenGLTVC_CopyImageForTime | QTVCCopyImageForTime | CallComponentDispatch | BaseVC_ComponentDispatch | CallComponentFunctionCommon | BaseVC_CopyImageForTime | QTVUGenerateImage | CallComponentDispatch | VisualAdjustmentVU_ComponentDispatch | CallComponentFunctionCommon | VisualAdjustmentVU_GenerateImage | CVOpenGLBufferBacking::attach(_CGLContextObject*, unsigned long, long, long) | CGLSetPBuffer | cglSetAnyDrawable | cglSetContextScreen | gliAttachDrawableWithOptions | gliSetCurrentPluginDispatchTable | gldInitDispatch | gldUpdateDispatch | glrUpdateHardwareState | glrIntelGeneratePolyStippleTexture | glrIntelGenerateInternalTexture | calloc
Leak: 0x136d62f0  size=80
        0x00000000 0x00000003 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x136d630c 0x00000000     .........cm.....
        0x136d6308 0x00000000 0x00000000 0x00000000     .cm.............
        0x019ec000 0x00000000 0x00000704 0x019ec000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        Call stack: [thread 4765a67]: | 0x0 | _pthread_body | CVDisplayLink::runIOThread() | CVDisplayLink::performIO(CVTimeStamp*) | myCVDisplayLinkOutputCallback | -[EasyshadowPlayer renderAtTime:] | -[EasyshadowPlayer renderVideoChannel:withRenderer:atTime:andLocalTime:] | -[VideoChannel setNewFrameIfPossibleAtTime:onRenderer:] | QTVisualContextCopyImageForTime | QTVCCopyImageForTime | CallComponentDispatch | OpenGLTVC_ComponentDispatch | CallComponentFunctionCommon | OpenGLTVC_CopyImageForTime | QTVCCopyImageForTime | CallComponentDispatch | BaseVC_ComponentDispatch | CallComponentFunctionCommon | BaseVC_CopyImageForTime | QTVUGenerateImage | CallComponentDispatch | VisualAdjustmentVU_ComponentDispatch | CallComponentFunctionCommon | VisualAdjustmentVU_GenerateImage | CVOpenGLBufferBacking::attach(_CGLContextObject*, unsigned long, long, long) | CGLSetPBuffer | cglSetAnyDrawable | cglSetContextScreen | gliAttachDrawableWithOptions | gliSetCurrentPluginDispatchTable | gldInitDispatch | gldUpdateDispatch | glrUpdateHardwareState | glrIntelGeneratePolyStippleTexture | glrIntelGenerateInternalTexture | gldCreateTexture | calloc
Leak: 0x136e2b00  size=80
        0x00000000 0x00000003 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x136e2b1c 0x00000000     .........+n.....
        0x136e2b18 0x00000000 0x00000000 0x00000000     .+n.............
        0x019eb400 0x00000000 0x00000704 0x019eb400     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        Call stack: [thread 4765a67]: | 0x0 | _pthread_body | CVDisplayLink::runIOThread() | CVDisplayLink::performIO(CVTimeStamp*) | myCVDisplayLinkOutputCallback | -[EasyshadowPlayer renderAtTime:] | -[EasyshadowPlayer renderVideoChannel:withRenderer:atTime:andLocalTime:] | -[VideoChannel setNewFrameIfPossibleAtTime:onRenderer:] | QTVisualContextCopyImageForTime | QTVCCopyImageForTime | CallComponentDispatch | OpenGLTVC_ComponentDispatch | CallComponentFunctionCommon | OpenGLTVC_CopyImageForTime | QTVCCopyImageForTime | CallComponentDispatch | BaseVC_ComponentDispatch | CallComponentFunctionCommon | BaseVC_CopyImageForTime | QTVUGenerateImage | CallComponentDispatch | VisualAdjustmentVU_ComponentDispatch | CallComponentFunctionCommon | VisualAdjustmentVU_GenerateImage | CVOpenGLBufferBacking::attach(_CGLContextObject*, unsigned long, long, long) | CGLSetPBuffer | cglSetAnyDrawable | cglSetContextScreen | gliAttachDrawableWithOptions | gliSetCurrentPluginDispatchTable | gldInitDispatch | gldUpdateDispatch | glrUpdateHardwareState | glrIntelGenerateLineStippleTexture | glrIntelGenerateInternalTexture | gldCreateTexture | calloc 

Here is my portion of code that calls QTVisualContextCopyImageForTime :

if(!channelMovie){
if(![renderer setValue:nil forInputKey:kVideoImageInputKey])
NSLog(@"Could not pass nil frame to composition");
}
//Check if a new frame is available from the movie
if(QTVisualContextIsNewImageAvailable(qtVisualContext, time)) {
CVOpenGLTextureRef texture = NULL;
if( QTVisualContextCopyImageForTime(qtVisualContext, nil, time, &texture) == noErr ){ // get the texture for the frame
// the above call may produce a null texture so we must check for this first
if(texture != NULL){
//Pass updated movie frames cache to the composition
if(![renderer setValue:(id)texture forInputKey:kVideoImageInputKey])
NSLog(@"Could not pass frames cache to composition");
}
}
CVOpenGLTextureRelease(texture);
return YES;
}
return NO;

Did I do something wrong or is this a known leak?
Can I do anything about it?
Can it have consequences on an app that should keep running without crashing for months?

Fabrice Pipart


www.easyshadow.com


International Corporate Consulting

Palais de la Scala

1 avenue Henri Dunant

Suite 1155

MC - 98000 Monaco


Skype: fabrice.pipart

Tel.  +377 97 98 21 04 (direct)

Fax. +377 97 70 88 07



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.