Page 1 of 1

[BUG] Crash on drop of invalid URL

Posted: Sat Dec 15, 2012 2:25 pm
by chris0
Vienna: 3.0b.2821
OSX: 10.8.2
Dragging & dropping any invalid URL (string) into Vienna’s feeds source list (Google Reader: OFF) always causes Vienna to crash.
This is probably due to the call of isAccessible in AppController-createNewSubscription:underFolder:afterChild:.

The function isAccessible in HelperFunctions.m tries to create an NSURL, which will be nil in this case. It then calls SCNetworkReachabilityCreateWithName with a NULL name arg (which is probably invalid) and so receives a NULL SCNetworkReachabilityRef. It then calls SCNetworkReachabilityGetFlags with a NULL target (which is probably invalid). It then calls CFRelease with a NULL CFTypeRef which IS ILLEGAL and therefore crashes.
I think the fix is obvious enough that it doesn’t need stating ;).

From the crash log:

Code: Select all

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation      	0x00007fff8323e7d8 CFRelease + 40
1   uk.co.opencommunity.vienna2   	0x0000000100044963 0x100000000 + 280931
2   uk.co.opencommunity.vienna2   	0x0000000100026744 0x100000000 + 157508
3   uk.co.opencommunity.vienna2   	0x000000010001b884 0x100000000 + 112772
4   com.apple.AppKit              	0x00007fff897b78a4 -[NSOutlineView performDragOperation:] + 341
5   com.apple.AppKit              	0x00007fff896bd9bf NSCoreDragReceiveMessageProc + 1651

Re: [BUG] Crash on drop of invalid URL

Posted: Sun Dec 16, 2012 4:47 pm
by barijaona
Thanks Chris !