Re: Memory management in QuickLook plugin
Re: Memory management in QuickLook plugin
- Subject: Re: Memory management in QuickLook plugin
- From: Corbin Dunn <email@hidden>
- Date: Wed, 20 May 2009 11:00:06 -0700
On May 20, 2009, at 6:34 AM, Georg Seifert wrote:
Hi,
I’m developing a QuickLook plugin for a custom binary file format.
As long as I did not cared about memory leaks everything was fine.
Then I fixed the leak with the help of Instruments. Everything
runs fine from xCode and Instruments but now it crashes if I run
the plugin from the finder.
Do you mean quicklookd crashes but qlmanage does not?
Yes.
I have set up a custom executable with "/usr/bin/qlmanage" and the
argument "-p path/to/my/file".
Any advice is very welcome.
We lack information here. We'd need to know where it is crashing.
This is definitely a memory problem. Sometimes it is about memory
being double released and sometimes things like:
20.05.09 13:42:00 quicklookd[38490] [QL ERROR] Preview request
generator for <QLPreviewRequest /Users/georg/...> raised '*** -
[NSCFString saveGraphicsState]: unrecognized selector sent to
instance 0x138880'
the only call to saveGraphicsState is: [NSGraphicsContext
saveGraphicsState];
So this seem exactly what happends with wrong retain/releases. The
Problem is, I cannot debug it because in the debugger everything is
fine.
Use Zombies and Instruments.
http://www.corbinstreehouse.com/blog/index.php/2007/10/instruments-on-leopard-how-to-debug-those-random-crashes-in-your-cocoa-app/
corbin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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