Search results for

LLDB crash

29,560 results found

Post

Replies

Boosts

Views

Activity

Can we get a "try?" as a more lenient "try!"?
I'm impressed by the structure imposed by the new do-catch construct.I also appreciate that the Swift team gave us try! to handle cases where we are sure that errors won't occur.Now one case that keeps bugging me when refactoring to Swift 2.0 code is I have to write something like this:let fileManager = NSFileManager.defaultManager() do { try fileManager.removeFileAtPath(cachePath1) } catch _ { } do { try fileManager.removeFileAtPath(cachePath2) } catch _ { } do { try fileManager.removeFileAtPath(cachePath3) } catch _ { }I just want to delete those paths if possible, but I don't care if they fail; they may have not existed in the first place and if they did, the system will clean the Caches sooner or later.If I write this asdo { try fileManager.removeFileAtPath(cachePath1) try fileManager.removeFileAtPath(cachePath2) try fileManager.removeFileAtPath(cachePath3) } catch _ { }then if cachePath1 fails, 2 and 3 will never be executed. And while we don't care if the deletes fail, not trying at all just feels wrong
42
0
16k
Jul ’15
Reply to Bug reporting: Radar vs Forum?
It's been said several times on the forums that Apple staff aren't paid to monitor the forums. And the numbers from duplicate bug reports and the like are easier to generate and present to management. The end result of all of that is that upvoting in the forum won't actually accomplish anything during crunch periods.Posting duplicate bug reports isn't worthless. It provides the engineers with a concrete number This many people have reported this problem in case they need to discuss making it a bigger priority.For certain teams, like the Swift development team, they may have staff members actively going out and searching for feedback, or participating in threads, but that's going to be the exception. Certainly posters like eskimo1 have had to state several times what boils to I cannot help you with this issue unless you follow proper procedures.More importantly, until you file a bug report you won't know whether your issue is a duplicate of someone else's issue. And if you don't file a bug report, you can't pr
Jul ’15
My app crashes very often on continuous usage in iOS 9 Beta
I tried to update my iPad to iOS 9 Beta and when I was accessing my app in my device it crashes very often. I was not able to find anything from the crash. It crashes in thread 0 (main thread).Here is an example of one such stack trace :Hardware Model: iPad2,5Code Type: ARM (Native)Parent Process: launchd [1]Date/Time: 2015-07-03 16:19:26.26 +0530Launch Time: 2015-07-03 16:14:09.09 +0530OS Version: iOS 9.0 (13A4280e)Report Version: 105Exception Type: EXC_CRASH (SIGSEGV)Exception Codes: 0x0000000000000000, 0x0000000000000000Exception Note: EXC_CORPSE_NOTIFYTriggered by Thread: 0Filtered syslog:None foundThread 0 name: Dispatch queue: com.apple.main-threadThread 0 Crashed:0 libsystem_kernel.dylib 0x35c80f58 0x35c80000 + 39281 libsystem_kernel.dylib 0x35c80d58 0x35c80000 + 34162 CoreFoundation 0x23e817bc 0x23dca000 + 7515483 CoreFoundation 0x23e7fb18 0x23dca000 + 7442164 CoreFoundation 0x23dd29a4 0x23dca000 + 352365 CoreFoundation 0x23dd2790 0x23dca000 + 347046 GraphicsService
1
0
2k
Jul ’15
Reply to Bug reporting: Radar vs Forum?
Yes, I have seen these explanations before, and many of them doesn't quite make sense to me. I think it would be much easier and effective (on both sides) if it was done the forums-way (for the majority of Swift-bugs that is). I'm sure Apple could afford one person monitoring the Swift forum.NotMyName wrote:Posting duplicate bug reports isn't worthless.And yet, Chris Lattner said: Filing a radar against something we already know about is generally not helpful to us or you, because it will just get returned as a duplicate without any additional information.NotMyName wrote:Posting duplicate bug reports isn't worthless. It provides the engineers with a concrete number This many people have reported this problem in case they need to discuss making it a bigger priority.The current state of affairs means I, and certainly a lot of other developers, simply will not bother to file bugs, at least not every single one, as we just assume somebody else will do it. Thus what you say above isn't necessarily true.The current
Jul ’15
Reply to GamePlayKit help
It looks like GameKit tries to import GamePlayKit, which crashes on dyld.dyld: Library not loaded: /System/Library/Frameworks/GameplayKit.framework/GameplayKit Referenced from: /private/var/mobile/Containers/Bundle/Application/D64C3101-F1AB-454C-8992-2D24B9499076/Pique.app/Frameworks/libswiftGameKit.dylib Reason: image not found (lldb)
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’15
Swift framework command line
I cannot find a way to create a swift framework that runs at the command line.I found a page (http://colemancda.github.io/programming/2015/02/12/embedded-swift-frameworks-osx-command-line-tools/) that suggests that this is an Xcode limitation created by Apple. I'm currently running the latest Xcode in Yosemite. Has this been fixed in more recent (beta) versions of Xcode?For the record, this is the error that comes backdyld: Library not loaded: @rpath/libswiftAppKit.dylib Referenced from: /Users/ldm/Library/Developer/Xcode/DerivedData/ObjecticeCP-gpkxbaxnppvxooeoqqgpehxkvobc/Build/Products/Debug/ORFoundation.framework/Versions/A/ORFoundation Reason: image not foundIf I check options within the framework to say that it has embedded swift code, then I get two copies of the AppKit and this causes the application to crash in the most horrendous way. Any help is greatly appreciated...
1
0
1.9k
Jul ’15
Reply to My app crashes very often on continuous usage in iOS 9 Beta
If you can symbolicate that it might show more useful info. Assuming you have Xcode 7 installed, connect a device and drag the crash log into the Device Logs panel in the Devices window. Xcode should then symbolicate it for you. It doesn't have to be the same device it crashed on, though you might not get the OS symbols translated if it's not, only your app's.
Jul ’15
user privacy and crash reports
The application we're creating has crash reports that include javascript exception stack text like the following:ReferenceError: foo is not defined at file:///Users/Jane/Documents/app/static/source_file.js:88:1, source: file:///Users/Jane/Documents/app/static/source_file.js (33)Question: Does Apple require that we scrub (in this case the user name Jane) the user's name from the crash report before sending to our servers? Note that this isn't a real app crash per se, but a javascript exception that we're catching internally in the application and sending (with user's permission) to our backend.In my mind we don't have to scrub the name because that can be any value and not necassarly a persons name, i.e. it could be /Users/redball or whatever.Thanks for your response.
0
0
117
Jul ’15
Downcasting collections
I'm a bit confused about what happens when downcasting NS… collections. I have this:let jObject = try NSJSONSerialization.JSONObjectWithData (jsonData, options: NSJSONReadingOptions ())which in this context is required to be a dictionary, so this is the way to downcast:guard let jDictionary = jObject as? [String: AnyObject] else { return }but I need to end up with a '[String: Any]' of pure Swift types, including Ints:let properties: [String: Any] = jDictionaryWhat confuses me is that the values in jDictionary are AnyObject, so (I'd assume) any NSNumber values in the input stay as NSNumbers in jDictionary. But then, how do I get them bridged to Int in 'properties'? Do I have to iterate through the dictionary to force the bridging? Or are they automatically bridged in the last assignment?Edit: The above compiled. Now that I try and run it, I get a crash with this message:fatal error: can't unsafeBitCast between types of different sizeswhich I don't exactly understand.
7
0
1.9k
Jul ’15
Desultory crashes in my app since introducing Swift code
I ma getting a series of crashes on different targets on my app apprently not connected to any piece of code. As a matter of fact I am getting crahes on one target and a tester gets them on another target, but I do not know if the two things are connected. My crahes happen ever at different times and parts of my code and present themselves with:Thread 1 Crashed:0 libsystem_kernel.dylib 0x3a216808 kevent64 + 241 libdispatch.dylib 0x3a162de8 _dispatch_mgr_invoke + 2282 libdispatch.dylib 0x3a151f6e _dispatch_mgr_thread$VARIANT$up + 34My code is not involved at all, but for catching the reporting the crash. The Xcode crash report also reports:__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14I am totally in the dark about what it might be and how to solve it. Any suggestion?
7
0
860
Jul ’15
More crosscasting confusion
I create a dictionary like this:[someKey: []]to pass into a method that's expecting [String, Any], but when I try to use the array value corresponding to someKey, I get a value that doesn't match 'is [Any]'. In fact, the debugger can't even display what the value is. So I explored some variations:(lldb) po [].dynamicType __NSArrayI (lldb) po [1].dynamicType Swift.Array<Swift.Int> (lldb) po [abc].dynamicType Swift.Array<Swift.String> (lldb) po Array<Any>() 0 elements (lldb) po Array<Any>().dynamicType Swift.Array<protocol<>> (lldb) po Array<AnyObject>().dynamicType Swift.Array<Swift.AnyObject>I find the first of these extremely surprising. Indeed if I create the dictionary like this:[someKey: Array<Any>()]I no longer get the crash, but I don't understand why the other form should crap out. Is it me or the compiler that's doing something wrong?
7
0
857
Jul ’15
CoreData completion handler memory leak
Hi,I am using CoreData, and using blocks with completion handlers to pass the feched object to my viewcontroller.I am having a problem with a constant slow memory build up, and I found where it is coming but not sure how to fix it.Here is my fetchrequest:- (void)sr_executeFetchRequest:(NSFetchRequest *)request completion:(void (^)(NSArray *objects, NSError *error))completion { __block NSManagedObjectContext *weakSelf = self; [weakSelf performBlock:^{ / NSError *error = nil; NSArray *fetchedObjects = [weakSelf executeFetchRequest:request error:&error]; [weakSelf performBlock:^{ if (fetchedObjects) { / NSMutableArray *mutObjectIds = [[[NSMutableArray alloc] initWithCapacity:[fetchedObjects count]] autorelease]; for (NSManagedObject *obj in fetchedObjects) { [mutObjectIds addObject:obj.objectID]; } / NSMutableArray *mutObjects = [[[NSMutableArray alloc] initWithCapacity:[mutObjectIds count]] autorelease]; for (NSManagedObjectID *objectID in mutObjectIds) { NSManagedObject *obj = [weakSelf objectWithID:object
2
0
1.1k
Jul ’15
Strange Swift 2.0 Bug, Crash when source code is in separate file
I have the following code.ViewController.Swiftclass ViewController: UIViewController { override func viewDidLoad() { let someClass = Test() someClass.someProtocol.someMethod() } }Code.Swiftprotocol SomeProtocol { var someInt: Int {get set} func someMethod() } class SomeClass: SomeProtocol { var someInt: Int init() { someInt = Int() } func someMethod() { print(hello) } } class Test { let someProtocol: SomeProtocol init() { self.someProtocol = SomeClass() } }This code compiles completely fine on Xcode 6/Swift 1.2, but in Xcode 7/Swift 2 someMethod is never called, instead I get a EXC_BAD_ACCESS on someIntHowever if I move the code from Code.Swift to the ViewController.Swift file (so that all the source code is in the same file) I don't get a crash.Has anyone experienced this issue with Swift 2 or know why this is happening? By the way I'm running Xcode 7 beta 2 Thanks
0
0
274
Jul ’15