Search results for

LLDB crash

29,548 results found

Post

Replies

Boosts

Views

Activity

Questions about NSCalendar
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,^ ~~~~~~~
7
0
3.3k
Jun ’15
Reply to Questions about NSCalendar
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:
Jun ’15
Reply to iOS 9 Beta battery life
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:
Jun ’15
Address Sanitizer crashes app when using two EAGLContexts
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
1
0
1k
Jun ’15
Reply to iOS 9 Beta battery life
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:
Jun ’15
Unable to Migrate App to WatchOS 2
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?
0
0
334
Jun ’15
Compiler crash
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
8
0
1.4k
Jun ’15
Reply to Abort trap: 6
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() }
Jun ’15
Reply to Int(UInt32) constructor goes awry
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:
Jun ’15