1.1.4 Recovered files still show up in my trash
1.1.4 Recovered files still show up in my trash
Hi
I was having the same issues as others who were getting the 'regdict' files turning up in the trash after a reboot.
I thought that 1.1.3 was supposed to sort out this problem but I still have it.
I have tried uninstalling using both the manual method and the uninstaller and then running the package to install Growl 1.1.4 again but it does not appear to work.
I am on a G4 1.5 ghz Mac Mini using Leopard 10.5.3
Anyone have a solution?
I was having the same issues as others who were getting the 'regdict' files turning up in the trash after a reboot.
I thought that 1.1.3 was supposed to sort out this problem but I still have it.
I have tried uninstalling using both the manual method and the uninstaller and then running the package to install Growl 1.1.4 again but it does not appear to work.
I am on a G4 1.5 ghz Mac Mini using Leopard 10.5.3
Anyone have a solution?
-
- Harmless
- Posts: 3
- Joined: Sun Mar 29, 2009 9:04 am
Re: 1.1.4 Recovered files still show up in my trash
I have written a growl notification plugin for Kadu IM using Carbon API and have the same problem.
My constructor setting the growl delegate looks:
I use Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext to display the notification.
The destructor is as follows:
I think still I might have something not released which causes the regDict file to be recoverd after reboot.
Coud anyone can point me what I'm doing wrong? I'm the Linux programmer and I'm not familiar with carbon and cocoa so please be understanding. Thanks.
My constructor setting the growl delegate looks:
Code: Select all
GrowlNotifier::GrowlNotifier(
const QStringList& notifications, const QStringList& default_notifications,
const QString& app)
{
CFStringRef notification;
// Initialize signaler
signaler_ = new GrowlNotifierSignaler();
// All Notifications
QStringList::ConstIterator it;
CFMutableArrayRef allNotifications = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
for (it = notifications.begin(); it != notifications.end(); ++it)
{
notification = qString2CFString(*it);
CFArrayAppendValue(allNotifications, notification);
CFRelease(notification);
}
// Default Notifications
CFMutableArrayRef defaultNotifications = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
for (it = default_notifications.begin(); it != default_notifications.end(); ++it)
{
notification = qString2CFString(*it);
CFArrayAppendValue(defaultNotifications, notification);
CFRelease(notification);
}
// Initialize delegate
InitGrowlDelegate(&delegate_);
delegate_.applicationName = qString2CFString(app);
CFTypeRef keys[] = { GROWL_NOTIFICATIONS_ALL, GROWL_NOTIFICATIONS_DEFAULT };
CFTypeRef values[] = { allNotifications, defaultNotifications };
delegate_.registrationDictionary = CFDictionaryCreate(
kCFAllocatorDefault, keys, values, 2,
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
delegate_.growlNotificationWasClicked = ¬ification_clicked;
delegate_.growlNotificationTimedOut = ¬ification_timeout;
CFRelease(allNotifications);
CFRelease(defaultNotifications);
// Register with Growl
Growl_SetDelegate(&delegate_);
}
The destructor is as follows:
Code: Select all
GrowlNotifier::~GrowlNotifier()
{
delete signaler_;
// Release delegate
delegate_.release(&delegate_);
// Release registration dictionary
CFRelease(delegate_.registrationDictionary);
}
Coud anyone can point me what I'm doing wrong? I'm the Linux programmer and I'm not familiar with carbon and cocoa so please be understanding. Thanks.
Re: 1.1.4 Recovered files still show up in my trash
You're using this member wrong. You can set it to a function for GrowlApplicationBridge to call, but you don't call it yourself. Instead, call Growl_SetDelegate(NULL).Dorregaray wrote:The destructor is as follows:Code: Select all
// Release delegate delegate_.release(&delegate_);
-
- Harmless
- Posts: 3
- Joined: Sun Mar 29, 2009 9:04 am
Re: 1.1.4 Recovered files still show up in my trash
using Growl_SetDelegate(NULL) leads to crash so that was the only one solution for relasing the delegate.boredzo wrote:You're using this member wrong. You can set it to a function for GrowlApplicationBridge to call, but you don't call it yourself. Instead, call Growl_SetDelegate(NULL).
However I've seen no sample code on the net using Growl_SetDelegate(NULL) or releasing the growl delegate so I'm not sure if I should do this.
According to the growl documentation the delegate should be released by growl after automatically but it isn't. Maybe the carbon bridge does not release it like cocoa one does?
-
- Harmless
- Posts: 3
- Joined: Sun Mar 29, 2009 9:04 am
Re: 1.1.4 Recovered files still show up in my trash
I've checked 1.1.5 and 1.1.6 and the problem still exists...
will lead to segfault. Probably the applicationName from old delegate should be used here when NULL new delegate is given.
However I see the problem in different place - in the function _launchGrowlIfInstalledWithRegistrationDictonary() there is a temporary file being created (see comment in line 884 of GrowlApplicationBridge-Carbon.c) but this file is never removed. Am I right? And this is the file which appears in Trash after reboot the system.
If you take a closer look at Growl_SetDelegate function when called with NULL parameter, you'll see that the line:boredzo wrote: You can set it to a function for GrowlApplicationBridge to call, but you don't call it yourself. Instead, call Growl_SetDelegate(NULL).
Code: Select all
CFStringRef appName = delegate->applicationName;
However I see the problem in different place - in the function _launchGrowlIfInstalledWithRegistrationDictonary() there is a temporary file being created (see comment in line 884 of GrowlApplicationBridge-Carbon.c) but this file is never removed. Am I right? And this is the file which appears in Trash after reboot the system.
Re: 1.1.4 Recovered files still show up in my trash
In 1.2, this is still happening.
Any updates from the developers? This has been going on for a shockingly long time.
Any updates from the developers? This has been going on for a shockingly long time.
Re: 1.1.4 Recovered files still show up in my trash
It's up to application developers to update their frameworks (and to not use the now-deprecated Carbon version of the Growl API).imaria wrote:In 1.2, this is still happening.
Make sure you're using the current versions of your applications. If you are, lobby their developers to update their Growl frameworks and (if applicable) switch to the Cocoa-based Growl API.
Re: 1.1.4 Recovered files still show up in my trash
Is there any way to trawl through the growlRegDict files or the console to determine which applications are at fault? I have a few likely suspects in mind, but I'm concerned it may be more than one application using old frameworks.
Re: 1.1.4 Recovered files still show up in my trash
Yes. You can open them in Property List Editor, or a text editor.imaria wrote:Is there any way to trawl through the growlRegDict files … to determine which applications are at fault?
Re: 1.1.4 Recovered files still show up in my trash
Blergh, it turns out the culprit is BBEdit. I don't suppose there's a way I can just swap out the Growl.framework inside the application with a newer one?
Re: 1.1.4 Recovered files still show up in my trash
You can try it, but I'm pretty sure we haven't fixed this one in our Carbon API, so it wouldn't help.imaria wrote:Blergh, it turns out the culprit is BBEdit. I don't suppose there's a way I can just swap out the Growl.framework inside the application with a newer one?
Also, there's a new version of BBEdit today (link via the Daring Fireball Linked List), so I suggest updating the whole app first.