brettpoole / growl

Automatically exported from code.google.com/p/growl
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Crashes in -[GrowlApplicationBridge _emptyQueue] #477

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Unknown. I've received crash reports from three different users that look like 
this:

Application Specific Information:
objc_msgSend() selector name: countByEnumeratingWithState:objects:count:
objc[157]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0  libobjc.A.dylib                  0x00007fff8b935e90 objc_msgSend  16
1  com.growl.growlframework          0x0000000101609948  
[GrowlApplicationBridge _emptyQueue]  183
2  com.growl.growlframework          0x000000010160f10b 
-[GrowlCommunicationAttempt succeeded]  44
3  com.growl.growlframework          0x000000010160f71c 
-[GrowlApplicationBridgeRegistrationAttempt begin]  1207
4  com.growl.growlframework          0x0000000101608e75  
[GrowlApplicationBridge registerWithDictionary:]  568
5  com.growl.growlframework          0x0000000101609a70  
[GrowlApplicationBridge _growlIsReady:]  236
6  com.apple.Foundation              0x00007fff9229b209 
__-[NSDistributedNotificationCenter 
addObserver:selector:name:object:suspensionBehavior:]_block_invoke_1  47
7  com.apple.CoreFoundation          0x00007fff9261e1e7 
____CFXNotificationPostToken_block_invoke_1  311
8  com.apple.CoreFoundation          0x00007fff925f00ec 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__  12
9  com.apple.CoreFoundation          0x00007fff925a80f2 __CFRunLoopDoBlocks  322
10  com.apple.CoreFoundation          0x00007fff925cfd25 __CFRunLoopRun  885
11  com.apple.CoreFoundation          0x00007fff925cf676 CFRunLoopRunSpecific  
230
12  com.apple.HIToolbox              0x00007fff9287231f 
RunCurrentEventLoopInMode  277
13  com.apple.HIToolbox              0x00007fff9287951b ReceiveNextEventCommon  
181
14  com.apple.HIToolbox              0x00007fff92879456 
BlockUntilNextEventMatchingListInMode  62
15  com.apple.AppKit                  0x00007fff95560f5d _DPSNextEvent  659
16  com.apple.AppKit                  0x00007fff95560861 -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:]  135
17  com.apple.AppKit                  0x00007fff9555d19d -[NSApplication run]  
470
18  com.apple.AppKit                  0x00007fff957dbb88 NSApplicationMain  867

Original issue reported on code.google.com by m...@c-command.com on 13 Apr 2012 at 4:42

GoogleCodeExporter commented 8 years ago
And also this one, which may be related:

Application Specific Information:
objc_msgSend() selector name: mutableCopy
objc[263]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0  libobjc.A.dylib                  0x00007fff928b2e90 objc_msgSend  16
1  com.growl.growlframework          0x000000010158c3aa  
[GrowlApplicationBridge notificationDictionaryByFillingInDictionary:]  29
2  com.growl.growlframework          0x000000010158b577  
[GrowlApplicationBridge notifyWithDictionary:]  82
3  com.growl.growlframework          0x000000010158c91f  
[GrowlApplicationBridge _emptyQueue]  142
4  com.growl.growlframework          0x000000010159210b 
-[GrowlCommunicationAttempt succeeded]  44
5  com.growl.growlframework          0x000000010159271c 
-[GrowlApplicationBridgeRegistrationAttempt begin]  1207
6  com.growl.growlframework          0x000000010158be75  
[GrowlApplicationBridge registerWithDictionary:]  568
7  com.growl.growlframework          0x000000010158ca70  
[GrowlApplicationBridge _growlIsReady:]  236
8  com.apple.Foundation              0x00007fff88b8d209 
__-[NSDistributedNotificationCenter 
addObserver:selector:name:object:suspensionBehavior:]_block_invoke_1  47
9  com.apple.CoreFoundation          0x00007fff86d901e7 
____CFXNotificationPostToken_block_invoke_1  311
10  com.apple.CoreFoundation          0x00007fff86d620ec 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__  12
11  com.apple.CoreFoundation          0x00007fff86d1a0f2 __CFRunLoopDoBlocks  
322
12  com.apple.CoreFoundation          0x00007fff86d42197 __CFRunLoopRun  2023
13  com.apple.CoreFoundation          0x00007fff86d41676 CFRunLoopRunSpecific  
230
14  com.apple.HIToolbox              0x00007fff870e831f 
RunCurrentEventLoopInMode  277
15  com.apple.HIToolbox              0x00007fff870ef5c9 ReceiveNextEventCommon  
355
16  com.apple.HIToolbox              0x00007fff870ef456 
BlockUntilNextEventMatchingListInMode  62
17  com.apple.AppKit                  0x00007fff8bb6cf5d _DPSNextEvent  659
18  com.apple.AppKit                  0x00007fff8bb6c861 -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:]  135
19  com.apple.AppKit                  0x00007fff8bb6919d -[NSApplication run]  
470
20  com.apple.AppKit                  0x00007fff8bde7b88 NSApplicationMain  867

Original comment by m...@c-command.com on 13 Apr 2012 at 4:44

GoogleCodeExporter commented 8 years ago
Which version of the SDK are you using?

Original comment by ch...@growl.info on 13 Apr 2012 at 9:19

GoogleCodeExporter commented 8 years ago
1.3.1

Original comment by m...@c-command.com on 13 Apr 2012 at 9:23

GoogleCodeExporter commented 8 years ago
So, Im pretty sure I know the cause of this and #478.  GrowlApplicationBridge 
picked up the ability in the 1.3 SDK to queue a notification if we weren't 
registered, and resend it after we were registered.  However, this queue is 
simply an NSMutableArray which is not accessed in a thread safe manner, and if 
you are sending notes from multiple threads, a race condition exists where one 
thread releases the mutable array while the other is in the process of 
accessing data that was in it.  

Original comment by dan...@growl.info on 18 Apr 2012 at 2:09

GoogleCodeExporter commented 8 years ago
I am flagging as waiting on user, as I cannot reproduce this crash myself, but 
I have checked in a change that should fix it [a49d9b4de2ab] in default.  The 
next beta build of the SDK will include this change.  

Original comment by dan...@growl.info on 18 Apr 2012 at 6:54

GoogleCodeExporter commented 8 years ago
Would you be able to push a test build to a few of the people that reported the 
issue? On both of the tickets you filed.

Original comment by ch...@growl.info on 18 Apr 2012 at 7:30

GoogleCodeExporter commented 8 years ago
Yes. (Do you have a beta of the SDK that I can download?)

Original comment by m...@c-command.com on 18 Apr 2012 at 7:36

GoogleCodeExporter commented 8 years ago
Not yet, we'll run it soon. Are you on the developer beta list?

Original comment by ch...@growl.info on 18 Apr 2012 at 8:01

GoogleCodeExporter commented 8 years ago
I'm on the growl-application-beta-testers list. Not sure whether that include 
betas for the SDK or just the app.

Original comment by m...@c-command.com on 18 Apr 2012 at 8:07

GoogleCodeExporter commented 8 years ago
Reports of these crashes are still rolling in. Any progress on the beta?

Original comment by m...@c-command.com on 24 Apr 2012 at 3:20

GoogleCodeExporter commented 8 years ago
I'll get one out by tomorrow morning just so that you can test this out.

Original comment by ch...@growl.info on 24 Apr 2012 at 11:59

GoogleCodeExporter commented 8 years ago
I'd like to try it soon, because I'm going to do a release shortly, anyway, due 
to an update from Microsoft.

Original comment by m...@c-command.com on 25 Apr 2012 at 8:05

GoogleCodeExporter commented 8 years ago
We have one item pending that's going into Growl, the beta will start tonight.

Can you email me directly so that I can make sure you get added to the sdk beta 
list?

Original comment by ch...@growl.info on 25 Apr 2012 at 10:20

GoogleCodeExporter commented 8 years ago
I'm not sure if you saw it, but I posted the SDK beta earlier today. FYI.

Original comment by ch...@growl.info on 27 Apr 2012 at 4:01

GoogleCodeExporter commented 8 years ago
The beta SDK is unusable for me because it keeps raising this exception:

NSInvalidArgumentException - *** -[__NSPlaceholderDictionary 
initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Stack Trace: 1 NSExceptionHandlerExceptionRaiser (in ExceptionHandling) + 169
objc_exception_throw (in libobjc.A.dylib) + 43
+[NSException raise:format:arguments:] (in CoreFoundation) + 106
+[NSException raise:format:] (in CoreFoundation) + 116
+[NSException(MJT) mjtCurrentStackTrace] (in MJTFoundation) + 48
+[NSError(MJTExtras) mjtErrorFromException:] (in MJTFoundation) + 182
-[MJTApplicationController(ErrorHandler) dieWithException:] (in MJTApplication) 
+ 533
__handleUncaughtException (in CoreFoundation) + 70
_objc_terminate (in libobjc.A.dylib) + 85
safe_handler_caller(void (*)()) (in libc++abi.dylib) + 11
__cxa_bad_typeid (in libc++abi.dylib) + 0
__gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) (in 
libc++abi.dylib) + 0
_objc_exception_destructor (in libobjc.A.dylib) + 0
-[__NSPlaceholderDictionary initWithObjects:forKeys:count:] (in CoreFoundation) 
+ 143
+[NSDictionary dictionaryWithObject:forKey:] (in CoreFoundation) + 60
-[GrowlGNTPCommunicationAttempt socketDidDisconnect:withError:] (in Growl) + 157
__38-[GrowlGCDAsyncSocket closeWithError:]_block_invoke_0 (in Growl) + 74
_dispatch_call_block_and_release (in libdispatch.dylib) + 18
_dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 308
__CFRunLoopRun (in CoreFoundation) + 1724
CFRunLoopRunSpecific (in CoreFoundation) + 230
RunCurrentEventLoopInMode (in HIToolbox) + 277
ReceiveNextEventCommon (in HIToolbox) + 355
BlockUntilNextEventMatchingListInMode (in HIToolbox) + 62
_DPSNextEvent (in AppKit) + 659
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit) + 
135
-[NSApplication run] (in AppKit) + 470
NSApplicationMain (in AppKit) + 867

Original comment by m...@c-command.com on 29 Apr 2012 at 4:16

GoogleCodeExporter commented 8 years ago
Think I found and fixed this, its unrelated to the _emptyQueue crash.  If there 
was no error response that we parsed, we were passing nil to 
dictionaryWithObject:forKey:
Will be in the next build.

Original comment by dan...@growl.info on 29 Apr 2012 at 9:42

GoogleCodeExporter commented 8 years ago

Original comment by rarich...@gmail.com on 19 Oct 2012 at 2:33