Swift app converted to Swift 2, it seems that many of my NSLog calls are now crashers. Stuff as simple as:NSLog(Moving File from ((originalURL)) to ((updatedURL)))Where both URLs are NSURLs... Crashes with EXC_BAD_ACCESS inside NSLog. I guess it's Radar time!
Search results for
LLDB crash
29,548 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I actually get crashes when opening the preferences pane filed radar://21300724
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Is anyone having trouble opening the music app. It keeps crashing on my iPhone 5S. Ive done a hard reset and reset settings, but it continues to crash
Here's a code snippet that compiles and works as expected, but I get a warning for depricated use of the unit .NSYearCalendarUnit. This is within XCode 7 (Swift 2.0)Playground execution failed: /var/folders/37/2hl0kpw50lv18q1d48gbbb5r0000gn/T/./lldb/16158/playground8.swift:52:20: warning: 'NSYearCalendarUnit' was deprecated in iOS 8.0: Use NSCalendarUnitYear insteadvar TermEndDate = NSDate() if (TermYears>0) { TermEndDate = userCalendar.dateByAddingUnit( NSCalendarUnit.NSYearCalendarUnit, value: TermYears, toDate: TermStartDate, options: .WrapComponents )! } if (leaseMonths>0) { TermEndDate = userCalendar.dateByAddingUnit( NSCalendarUnit.NSMonthCalendarUnit, value: TermMonths, toDate: TermEndDate, options: .WrapComponents )! } If I switch to the recommended syntax, it errors out. /var/folders/37/2hl0kpw50lv18q1d48gbbb5r0000gn/T/./lldb/16158/playground8.swift:60:5: error: 'NSCalendarUnit.Type' does not have a member named 'NSCalendarUnitMonth'NSCalendarUnit.NSCalendarUnitMonth,^ ~~~~~~~
Also.... I found a very informative website that has a ton of examples specifically on how to work with dates within Swift.Here's a code snippet that he uses as an example, but does not compile for me, and I have no idea why I get the error: could not find member 'CalendarUnitDay'. Was this syntax changed with Swift 2.0?Every example I could find uses this syntax, but for me... no luck.// Playground - noun: a place where people can play import UIKit let userCalendar = NSCalendar.currentCalendar() // Let's create some dates to work with // ==================================== // It's 3:45:30 a.m., New Year's Day. Time to go home. let goHomeYoureDrunkTimeComponents = NSDateComponents() goHomeYoureDrunkTimeComponents.year = 2015 goHomeYoureDrunkTimeComponents.month = 1 goHomeYoureDrunkTimeComponents.day = 1 goHomeYoureDrunkTimeComponents.hour = 3 goHomeYoureDrunkTimeComponents.minute = 45 goHomeYoureDrunkTimeComponents.second = 30 let goHomeYoureDrunkTime = userCalendar.dateFromComponents(goHomeYoureDrunkTimeCom
Topic:
Programming Languages
SubTopic:
Swift
Tags:
I was having the same battery drain issues with the iPhone 5s. I installed the ios9 beta from a restore but noticed something was a little odd from the usual beta installs.Results from install on iPhone: iPhone ios9 beta install went smoothly but battery usage was ridiculous. I've tried the turn off/on again, hard reset, etc. and still it was going do battery life like crazy. I figured it was doing it's indexing so I just left it plugged in overnight. I did run my iHome alarm app at night though. In the morning, I noticed that it was only at 80% charge after being plugged in all night! Killed the alarm app and topped off the phone before I left the house in the morning. By the afternoon, my battery was down to 30% after light usage and down 10% after sitting idle no apps running, etc. I am downgrading back to 8.3 since my development phone is my main phone. Downgrade is going smoothly.Results from install on iPad mini (original): Restored ios9. Restored from my settings. I had several reboots (or crashes
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Some how by opening mail from a new mail notification banner allowed me to enter it without it crashing. I'm able to open it up now....
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Using Xcode 7 beta, running the following OpenGL ES 2 code on Debug configuration on a iPhone 6 device running iOS 8.3, with Address Sanitizer enabled for the scheme, crashes:#include <OpenGLES/ES2/glext.h> //... EAGLContext *contextA = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; if (!contextA || ![EAGLContext setCurrentContext:contextA]) { return; } GLuint renderBuffer = 0; glGenRenderbuffers(1, &renderBuffer); glBindRenderbuffer(GL_RENDERBUFFER, renderBuffer); [contextA renderbufferStorage:GL_RENDERBUFFER fromDrawable:nil]; GLuint frameBuffer = 0; glGenFramebuffers(1, &frameBuffer); glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderBuffer); glFlush(); EAGLContext *contextB = [[EAGLContext alloc] initWithAPI:contextA.API sharegroup:contextA.sharegroup]; if (!contextB || ![EAGLContext setCurrentContext:contextB]) { return; } [contextB presentRenderbuffer:GL_RENDERBUFFER]; // EXC_BAD_AC
Same on my side,it is awsome that a beta version is as worse as this IOS9 Beta 1. With only less improvements the battery is empty in extremely shorten time. But battery is one of the important things at MOBILE phones. So I really do not know why Apple was doing this Beta 1 because it is much more a pre-Alpha. Same at OSX 10.11 with Mail. It crashes totally against Exchange accounts. Really worse. I think they are not ready and / or WWDC was too early. Hopefully we get an update during the next 2 weeks, otherwise I think battery is damadged.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hi RajeevHolding shift while opening mail works, but I am not able to spot the problem and it crashes again (not immediately though).Any suggestion on how should I find and fix the problem/s ?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
When I opened my project for the first time in Xcode 7, I was given the option to convert all of my code to Swift 2, which I did. But my WatchApp was never updated to WatchOS2. Now when I try to change the Base SDK, Xcode just crashes on me. Is there any other way to migrate my WatchApp and WatchKitExtension to WatchOS 2?
In El Capitan (10.11) - I am not able to partition or modify an external HD via Disk Utility. The external HD is recognized by Disk Utility but fails the operation when the Modify option is selected. After several attempts, Disk Utility shuts down unexpectedly, and generates a crash report. Has anyone else run into this?
Has anyone else seen anything like this?Assertion failed: (D->getSourceRange().isValid()), function buildDeclarationRefinementContext, file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.38.1/src/swift/lib/Sema/TypeChecker.cpp, line 946. 0 swift 0x0000000109a08e0b llvm::sys::PrintStackTrace(__sFILE*) + 43 1 swift 0x0000000109a0954b SignalHandler(int) + 379 2 libsystem_platform.dylib 0x00007fff8b16cf1a _sigtramp + 26 3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1961439488 4 libsystem_c.dylib 0x00007fff96a5bb53 abort + 129 5 libsystem_c.dylib 0x00007fff96a23c39 basename + 0 6 swift 0x000000010806de92 (anonymous namespace)::TypeRefinementContextBuilder::walkToDeclPre(swift::Decl*) + 1058 7 swift 0x000000010813cf5d (anonymous namespace)::Traversal::doIt(swift::Decl*) + 157 8 swift 0x0000000108141244 (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 164 9 swift 0x000000010813cfb2 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 242 10 swift 0x0
Maybe the reason the compiler is crashing because your code is trying to override a stored property in obj-c with a computed property in Swift?I would recommend filing a bug with your example code above, since the compiler/sourcekit shouldn't be crashing like that, and should provide an error if there is a problem with the code.Is there a reason why you can't leave out the override of path: and just set it in init like you do with strokeColor?required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) strokeColor = UIColor.blackColor().CGColor path = staffPath() } override init() { super.init() strokeColor = UIColor.blackColor().CGColor path = staffPath() }
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
You are essentially doing this (which will also overflow the signed int with the unsigned int value):func foo() -> UInt32 { return UInt32(Int32.max) + 1 } // foo will return a value that is 1 above what a signed 32 bit integer can hold (2147483647 + 1). // So if you change + 1 to + 0, it will not crash. let bar = Int32(foo()) // <-- Will crash the same way. print(bar)I guess you have to think about within what range you want your random values.Since the function arc4random() returns an UInt32 within the closed range [0, UInt32.max], you'll have to turn those values into the type and range that you want.For example if you would want a double value in the half open range [0.0, 1.0) you could do something like:func rndDoubleHalfOpenZeroToOne() -> Double { return (Double(arc4random()) + 0.5) / (Double(UInt32.max) + 1.0) }And if what you want really is a random signed Int32 within the closed range [Int32.min, Int32.max], then I suppose you could do:func rndInt32() -> Int32 { return
Topic:
Programming Languages
SubTopic:
Swift
Tags: