During few days I am seeing a firebase crash analytic issue (given below) in my console. I am surfing a log but didn't get any solution. I am not sure the crush Mocking line-1 and line-2 (inside the self.addTransferOperation() function). If it is 'addOperation' related issue (line-2), what will its solution then. How it is possible to become the operation (transferOperation) nil. Advance thanks for your help.
line-1:
_ = self.addTransferOperation(device: device, deviceIndex:index, dataTransferCategory:OMVitalDataTransferCategory.bloodPressure)
Line-2:
func addTransferOperation(device: ConnectedDevice, deviceIndex:Int, dataTransferCategory:OMVitalDataTransferCategory = OMVitalDataTransferCategory.all) -> ConnectivityTransferOperation {
let transferOperation = ConnectivityTransferOperation()
// transferOperation.isUserNotify = device == sortedDeviceList.last ? notifyUser : false
let connectedDevice = ConnectedDevice(value : device)
transferOperation.device = ConnectedDevice(value : device)
transferOperation.transferDataType = dataTransferCategory
transferOperation.completionBlock = {
LogManager.shared.addLog(logString: "completion of transfer operation",localName: connectedDevice.deviceLocalName, uuid: connectedDevice.uuid)
// Remove first item
if !self.pendingOperations.syncInProgress.isEmpty {
self.pendingOperations.syncInProgress.removeAll(where: {$0 == transferOperation})
}
// Empty queue
if self.pendingOperations.syncInProgress.isEmpty {
// update autosync timer if Manual sync
if (self.isManualSync) {
self.updateSyncTimer()
}
}
// Reset bluetooth state
self.resetBluetoothState()
DispatchQueue.main.async {
// Set error from transfer operation and set flag to check if it happened in transfer operation
let transferOperationDetails: [String : Any] = [ConnectivityConfiguration.error: transferOperation.error,
ConnectivityConfiguration.isTransferOperation:true]
// post notification for stop data transfer with transfer error operation object
NotificationCenter.default.post(name: .dataTransferStop,
object: transferOperationDetails)
}
}
LogManager.shared.addLog(logString: "Add transfer operation for device \(device.displayName)",localName: connectedDevice.deviceLocalName, uuid: connectedDevice.uuid)
// Add operation and start
self.pendingOperations.syncInProgress.append(transferOperation)
if deviceIndex > 0 {
// add dependency
transferOperation.addDependency(self.pendingOperations.syncInProgress[deviceIndex-1])
}
self.pendingOperations.syncQueue.addOperation(transferOperation)
return transferOperation
}
Crash:
Crashed: com.apple.main-thread
0 Foundation 0x114ea8 ____addOperations_block_invoke.567 + 680
1 Foundation 0x113858 __addOperations + 1288
2 GrandApp 0x7bd3d8 ConnectivityManager.addTransferOperation(device:deviceIndex:dataTransferCategory:) + 2411 (ConnectivityManager.swift:2411)
3 GrandApp 0x7bc3f0 ConnectivityManager.transferOperation(withDevices:notifyUser:isManualSync:) + 4313269232 (<compiler-generated>:4313269232)
4 GrandApp 0x7a6770 ConnectivityManager.startTransferOperation(notifyUser:device:syncAllData:isBeaconFlow:) + 4313180016 (<compiler-generated>:4313180016)
5 GrandApp 0x6c4aa4 closure #1 in DashboardViewController.refreshAction() + 1096 (DashboardViewController.swift:1096)
6 GrandApp 0x7cc37c specialized ConnectivityManager.isSyncing(withStop:completion:) + 4313334652 (<compiler-generated>:4313334652)
7 GrandApp 0x6c4218 DashboardViewController.refreshAction() + 4312252952 (<compiler-generated>:4312252952)
8 GrandApp 0x6c4aec #objc DashboardViewController.refreshAction() + 4312255212 (<compiler-generated>:4312255212)
9 UIKitCore 0x8be300 -[UIApplication sendAction:to:from:forEvent:] + 96
10 UIKitCore 0x367424 -[UIControl sendAction:to:forEvent:] + 80
11 UIKitCore 0x367744 -[UIControl _sendActionsForEvents:withEvent:] + 440
12 UIKitCore 0x3667b0 -[UIControl touchesEnded:withEvent:] + 568
13 UIKitCore 0x8f55c4 -[UIWindow _sendTouchesForEvent:] + 2108
14 UIKitCore 0x8f67ec -[UIWindow sendEvent:] + 3140
15 UIKitCore 0x8d685c -[UIApplication sendEvent:] + 340
16 UIKitCore 0x99c9d4 __dispatchPreprocessedEventFromEventQueue + 1768
17 UIKitCore 0x99f100 __handleEventQueueInternal + 4828
18 UIKitCore 0x998330 __handleHIDEventFetcherDrain + 15
19 CoreFoundation 0xaaf1c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
20 CoreFoundation 0xaae9c __CFRunLoopDoSource0 + 88
21 CoreFoundation 0xaa784 __CFRunLoopDoSources0 + 176
22 CoreFoundation 0xa56c0 __CFRunLoopRun + 1004
23 CoreFoundation 0xa4fb4 CFRunLoopRunSpecific + 436
24 GraphicsServices 0xa79c GSEventRunModal + 104
25 UIKitCore 0x8bcc38 UIApplicationMain + 212
26 GrandApp 0x1db0c main + 19 (AppDelegate.swift:19)
27 libdyld.dylib 0x18e0 start + 4
ConnectivityTransferOperation.swift
import UIKit
import OMConnectivityLibrary
/// Transfer operation for connectivity
class ConnectivityTransferOperation : ConnectivityOperation {
override func main() {
guard isCancelled == false else {
finish(true)
return
}
self.executing(true)
}
override func end() {
// Super call
super.end()
}
}
ConnectivityOperation.swift
import UIKit
import OMConnectivityLibrary
class ConnectivityOperation: Operation {
/// Making operation queue async
override var isAsynchronous: Bool {
get {
return true
}
}
private var _executing = false {
willSet {
willChangeValue(forKey: "isExecuting")
}
didSet {
didChangeValue(forKey: "isExecuting")
}
}
private var _finished = false {
willSet {
willChangeValue(forKey: "isFinished")
}
didSet {
didChangeValue(forKey: "isFinished")
}
}
override var isExecuting: Bool {
return _executing
}
override var isFinished: Bool {
return _finished
}
func executing(_ executing: Bool) {
_executing = executing
}
func finish(_ finished: Bool) {
_finished = finished
}
func end() {
self.finish(true)
self.executing(false)
}
}
Related
I am getting a crash reported in crashlytics about partial apply in closure. I have tried other answers that mainly focus on using [weak self] but that didn't help. However, i am not getting a crash on my device.
According to the report the crash is somewhere in the function where i show my dropDown here is the code
func showDropDown(_ names: [String], forResult result: SearchPatientResultResponnse) {
guard let vc = viewController
else { return }
self.searchedPatientNames = result.data?.patientSearchSuggestions
Helpers.showSearchDropdown(anchorView: vc.searchBar.searchTextField, dataSource: names, scrollToTop: true, completion: { [weak self] (i, item) in
guard let self = self else {
return
}
vc.searchBar.text = item
vc.dismissKeyboard()
self.selectedSearchPatient = self.searchedPatientNames?[i]
if let d = self.searchedPatientNames?[i].dob {
vc.dobTF.text = DateTimeFormatters.userUIDateFormatterInUTC.string(from: d)
}
self.search(self.selectedSearchFilter)
}, fetchPaginationData: { [weak self] in
guard let self = self, !self.isNameSearchLastPage, self.page != -1 else {
return
}
vc.searchBar.isLoadingWithoutSearchIcon = true
self.fetchPatientNameNextPage()
}, cancel: { [weak self] in
self?.resetPaginationParams()
})
}
This is the function from where i am calling this showDropDown function
func getQueryPatientResponse() {
guard let vc = viewController else {
return
}
SocketIOManager.shared.queryResponseForPatient = { [weak self] result in
var names: [String] = []
self?.isNameSearchLastPage = result.data?.isLastPage ?? true
self?.page = result.data?.pageNumber ?? -1
for data in result.data?.patientSearchSuggestions ?? [] {
var name = ""
if !data.middleName.isEmpty {
name = data.firstName + " " + data.middleName + " " + data.lastName
} else {
name = data.firstName + " " + (data.lastName)
}
names.append(name)
}
vc.searchBar.isLoadingWithoutSearchIcon = false
self?.page == 1 ? self?.showDropDown(names, forResult: result) : self?.updateDropDown(names, forResult: result)
}
}
This is the crash report from crashlytics:-
Crashed: com.apple.main-thread
0 Ovada CM - PT 0x639b0 closure #1 in VisitStatusViewModel.showDropDown(_:forResult:)
+ 4340890032 (<compiler-generated>:4340890032)
1 Ovada CM - PT 0x3f328 partial apply for closure #1 in static Helpers.showSearchDropdown(anchorView:dataSource:scrollToTop:completion:fetchPaginationData:cancel:)
+ 121 (Helpers.swift:121)
2 Ovada CM - PT 0x15604c DropDown.tableView(_:didSelectRowAt:)
+ 4341882956 (<compiler-generated>:4341882956)
3 Ovada CM - PT 0x156548 #objc DropDown.tableView(_:didSelectRowAt:)
+ 4341884232 (<compiler-generated>:4341884232)
4 UIKitCore 0xfe36d0 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:deselectPrevious:]
+ 1640
5 UIKitCore 0xfe3050 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:]
+ 112
6 UIKitCore 0xfe394c -[UITableView _userSelectRowAtPendingSelectionIndexPath:]
+ 316
7 UIKitCore 0x30c240 -[_UIAfterCACommitBlock run] + 64
8 UIKitCore 0x227770 -[_UIAfterCACommitQueue flush] + 200
9 UIKitCore 0x155eb0 _runAfterCACommitDeferredBlocks + 640
10 UIKitCore 0x15657c _cleanUpAfterCAFlushAndRunDeferredBlocks + 128
11 UIKitCore 0x156748 _afterCACommitHandler + 56
12 CoreFoundation 0x3e83c _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION_ + 32
13 CoreFoundation 0xfa74 __CFRunLoopDoObservers + 616
14 CoreFoundation 0xaffc __CFRunLoopRun + 1012
15 CoreFoundation 0x1e250 CFRunLoopRunSpecific + 572
16 GraphicsServices 0x1988 GSEventRunModal + 160
17 UIKitCore 0x4e5a94 -[UIApplication _run] + 1080
18 UIKitCore 0x27efd4 UIApplicationMain + 336
19 Ovada CM - PT 0x6070 main + 14 (AppDelegate.swift:14)
20 ??? 0x1029dc4d0 (Missing)
I've a random crash in live app. It crashes on guard statement. Following is the code snippet. I'm not able to understand why it crashes on guard which was suppose to guard against crashes like this?
How to fix this issue or how do I go about investigating it?
Crashlytics log
Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x0000000102419850
0 myApp 0x102426f50 MessageVC.validate() + 101 (MessageVC.swift:101)
1 myApp 0x1024272d8 #objc MessageVC.buttonTapped(_:) + 239 (MessageVC.swift:239)
2 UIKitCore 0x1a6a8d9ac <redacted> + 96
3 UIKitCore 0x1a64c3fbc <redacted> + 240
4 UIKitCore 0x1a64c4320 <redacted> + 408
5 UIKitCore 0x1a64c333c <redacted> + 520
6 UIKitCore 0x1a6674a58 <redacted> + 7636
7 CoreFoundation 0x1a2983e68 <redacted> + 32
8 CoreFoundation 0x1a297ed54 <redacted> + 416
9 CoreFoundation 0x1a297f320 <redacted> + 1308
10 CoreFoundation 0x1a297eadc CFRunLoopRunSpecific + 464
11 GraphicsServices 0x1ac91f328 GSEventRunModal + 104
12 UIKitCore 0x1a6a8c63c UIApplicationMain + 1936
13 myApp 0x1023eb850 main + 21 (ProfileVC.swift:11)
14 libdyld.dylib 0x1a2808360 <redacted> + 4
Model.swift
struct ProfileStatus: Decodable {
var status: Bool?
var error: String?
}
MessageVC.swift
var profileStatus: ProfileStatus!
func validate() -> Bool {
guard let status = profileStatus.status else { // Line no. 101, Crash here
return true
}
// Do something...
}
#IBAction func buttonTapped(_ sender: UIButton) {
if validate() { // Line no. 239
// Do something..
}
}
ProfileVC.swift
class ProfileVC: UIViewController {
#IBOutlet weak var textField: MyTextField! // Line no. 11
// ....
}
The reason of crash in force unwrap
var profileStatus: ProfileStatus! // << here is the reason
so you need to find in other code where ownership is lost, and, which is anyway good practice
var profileStatus: ProfileStatus? // use optional and unwrap where needed conditonally
func validate() -> Bool {
guard let status = profileStatus?.status else {
General information
IGListKit version: 3.4.0
iOS version(s): 12
CocoaPods/Carthage version: 1.5.3
Xcode version: 10.1
Devices/Simulators affected: All
Reproducible in the demo project? (Yes/No): No demo project
Hello.
I have this issue with IGList kit.
So in my project i have a "Loading more" functionality about images downloaded from my API, paginated.
So there is a class which holds the images
class ProfileImages: ListDiffable {
var nextMaxID: String?
var images: [Images]?
init(nextMaxID: String? = nil, images: [Images]? = []) {
self.images = images
self.nextMaxID = nextMaxID
}
func diffIdentifier() -> NSObjectProtocol {
return (nextMaxID ?? "ProfileImages") as NSObjectProtocol
}
func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
guard self !== object else { return true }
guard let object = object as? ProfileImages else { return false }
return nextMaxID == object.nextMaxID
}
}
In my viewModel i have this function which gives me the above class but with the newest images array without the previous ones, since its paginated.
func updateUserImages(with userID: Int?, and nextMaxID: String, onSuccess: #escaping (ProfileImages) -> Void) {
userService.getUserImages(with: userID, nextMaxId: nextMaxID) { (feedResponse) in
let newProfileImages = ProfileImages(nextMaxID: feedResponse.nextMaxId, images: feedResponse.items)
onSuccess(newProfileImages)
}
}
And in my View Controller, in the scroll delegate of adapter, I have your paradigm from LoadMoreSectionController
extension ProfileViewController: UIScrollViewDelegate {
func scrollViewWillEndDragging(_ scrollView: UIScrollView,
withVelocity velocity: CGPoint,
targetContentOffset: UnsafeMutablePointer<CGPoint>) {
guard let object = self.profileViewModel.viewData.value[1] as? ProfileImages,
let nextMaxID = object.nextMaxID,
var oldImages = object.images else { return }
let distance = scrollView.contentSize.height - (targetContentOffset.pointee.y + scrollView.bounds.height)
if !loading && distance < 200 {
loading = true
adapter.performUpdates(animated: true, completion: nil)
DispatchQueue.global(qos: .default).async {
DispatchQueue.main.async {
self.profileViewModel.updateUserImages(with: self.userService.user.pk, and: nextMaxID, onSuccess: { profileImages in
self.loading = false
oldImages.append(contentsOf: profileImages.images ?? []) // here i update the previews array by appending the new arrays
object.images = oldImages // and here i replace the previews array with the new one which has all the images.
object.nextMaxID = profileImages.nextMaxID
self.adapter.performUpdates(animated: true, completion: nil) // Although if i use `self.adapter.reloadData()` its not crashing although i read on the docs that it's not a proper way to reload stuff.
})
}
}
}
}
}
And when i scroll down it crashes.
2019-02-03 15:31:00.520794+0200 ProjectName [20694:7628667] *** Assertion failure in -[IGListAdapter _visibleSectionControllersFromLayoutAttributes](), /Users/trypow-mac/Desktop/ProjectName/Pods/IGListKit/Source/IGListAdapter.m:515
2019-02-03 15:31:00.527576+0200 ProjectName[20694:7628667] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Section controller nil for cell in section 1'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a3161bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x00000001098b4735 objc_exception_throw + 48
2 CoreFoundation 0x000000010a315f42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000104fdf940 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 IGListKit 0x000000010568eb99 -[IGListAdapter _visibleSectionControllersFromLayoutAttributes] + 1273
5 IGListKit 0x000000010568e67c -[IGListAdapter visibleSectionControllers] + 540
6 IGListKit 0x00000001056935a4 -[IGListAdapter scrollViewDidScroll:] + 196
7 UIKitCore 0x000000011333ba5b -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 66
8 UIKitCore 0x00000001133220ef -[UIScrollView setContentOffset:] + 1007
9 UIKitCore 0x00000001133337e5 -[UIScrollView _smoothScrollWithUpdateTime:] + 2967
10 UIKitCore 0x0000000113333bb6 -[UIScrollView _smoothScrollDisplayLink:] + 379
11 QuartzCore 0x00000001063300a2 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 818
12 QuartzCore 0x00000001063fcbb9 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 297
13 CoreFoundation 0x000000010a24f5a6 __CFMachPortPerform + 150
14 CoreFoundation 0x000000010a27bf69 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
15 CoreFoundation 0x000000010a27b5bb __CFRunLoopDoSource1 + 459
16 CoreFoundation 0x000000010a275b2e __CFRunLoopRun + 2526
17 CoreFoundation 0x000000010a274e11 CFRunLoopRunSpecific + 625
18 GraphicsServices 0x000000010cef51dd GSEventRunModal + 62
19 UIKitCore 0x0000000112ec181d UIApplicationMain + 140
20 ProjectName 0x0000000102022424 main + 68
21 libdyld.dylib 0x000000010b3ee575 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Am I missing something ?
I am getting this crash report from my users. I am not able to reproduce it so only few devices are having this issue.
Thread : Crashed: com.apple.main-thread
0 MY_PROJECT 0x00089fb8 static MY_PROJECT.GCHelper.rematch (MY_PROJECT.GCHelper.Type)(Swift.ImplicitlyUnwrappedOptional) -> () (GCHelper.swift:156)
1 libobjc.A.dylib 0x37624a37 objc_object::sidetable_retain() + 82
2 MY_PROJECT 0x000403f0 MY_PROJECT.GameScene.ButtonFunction (MY_PROJECT.GameScene)() -> () (GameScene.swift:727)
3 MY_PROJECT 0x00052ae0 function signature specialization of MY_PROJECT.GameScene.touchesEnded (MY_PROJECT.GameScene)(Swift.Set, withEvent : ObjectiveC.UIEvent) -> () (GameScene.swift:355)
4 MY_PROJECT 0x0003d7ac #objc MY_PROJECT.GameScene.touchesEnded (MY_PROJECT.GameScene)(Swift.Set, withEvent : ObjectiveC.UIEvent) -> () (GameScene.swift)
5 SpriteKit 0x2c668755 -[SKView touchesEnded:withEvent:] + 896
6 UIKit 0x2c7fc133 -[UIWindow _sendTouchesForEvent:] + 522
7 UIKit 0x2c7f5a41 -[UIWindow sendEvent:] + 540
8 UIKit 0x2c7cbc05 -[UIApplication sendEvent:] + 196
9 UIKit 0x2ca4231f _UIApplicationHandleEventFromQueueEvent + 14538
10 UIKit 0x2c7ca607 _UIApplicationHandleEventQueue + 1350
11 CoreFoundation 0x2915722f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
12 CoreFoundation 0x29156643 __CFRunLoopDoSources0 + 222
13 CoreFoundation 0x29154cc1 __CFRunLoopRun + 768
14 CoreFoundation 0x290a09a1 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x290a07b3 CFRunLoopRunInMode + 106
16 GraphicsServices 0x3085f1a9 GSEventRunModal + 136
17 UIKit 0x2c82b695 UIApplicationMain + 1440
18 MY_PROJECT 0x00086790 main (AppDelegate.swift:16)
19 libdyld.dylib 0x37bb2aaf start + 2
Below is my rematch function from GCHelper class.
class func rematch(match:GKTurnBasedMatch!){
GCHelper.sharedInstance.rematch(match)
}
func rematch(match:GKTurnBasedMatch!){
match.rematchWithCompletionHandler({ (mMatch:GKTurnBasedMatch!, error:NSError!) -> Void in
if(error != nil){
println("\(error.description)")
} else{
println("rematch")
for var i = 0; i < mMatch.participants.count; i++ {
let participants = mMatch.participants as NSArray
let part = participants.objectAtIndex(i) as! GKTurnBasedParticipant
println("part \(i) \(part.description)")
if let playerID = part.playerID {
if(part.playerID != GKLocalPlayer.localPlayer().playerID){
self.opponentName = part.player.displayName
}
} else{
self.opponentName = "Opponent"
}
// println("participant name is \(part.playerID.)")
}
println("participant name is \(self.opponentName)")
self.delegate?.enterRematch(match,opponentName: self.opponentName)
}
})
}
And this is how I call rematch in my GameScene class.
GCHelper.rematch(self.currentTurnBasedMatch)
I don't even know at which line exactly the crash is happening. Anyone have any ideas?
var lastnumber: String = ""
#IBOutlet var anserField : UILabel Thread 1: breakpoint 2.4
#IBOutlet var operatorLable: UILabel
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
#IBAction func buttonTapped(TheButton: UIButton) {
if anserField.text == "0" {
anserField.text = TheButton.titleLabel.text
} else {
anserField.text = anserField.text + TheButton.titleLabel.text
}
println(TheButton.titleLabel.text);
}
#IBAction func plusTapped(TheButton: UIButton) {
println("plus tapped")
if operatorLable.text == "" {
operatorLable.text = "+"
lastnumber = anserField.text
anserField.text = "0"
}else {
enterTapped(nil)
operatorLable.text = "+"
}
}
#IBAction func minusTapped(TheButton: UIButton) {
println("minus tapped")
if operatorLable.text == "" {
operatorLable.text = "-"
lastnumber = anserField.text
anserField.text = "0"
}else {
enterTapped(nil)
operatorLable.text = "-"
}
}
#IBAction func cleartapped(AnyObject) {
anserField.text = "0"
operatorLable.text = ""
lastnumber = ""
}
#IBAction func enterTapped(AnyObject?) {
var num1 = lastnumber.toInt()
var num2 = anserField.text.toInt()
if !num1 || !num2 {
ShowError()
return
}
var anser = 0
if operatorLable.text == "-" {
anser = num1! - num2!
} else if operatorLable.text == "+" {
anser = num1! + num2!
} else {
ShowError()
return
}
println(anser)
}
func ShowError(){
// to do this
println("there was a error")
}
}
I need help i am new to swift and coding and i am not to god to be honest i can't figure out what is won't with my code please help! (error is at the top just look on the right)
I am coding a calculator(don't know if that helps but why not) and it is a error that i just can't fix i have tried many things but none of it is working it is a single view application for the iPhone 5s and this code is from the viewcontroler. swift this is the decoder and self things if they useful
aDecoder Swift.ImplicitlyUnwrappedOptional<Foundation.NSCoder> 0x00007f829b04fe00 0x00007f829b04fe00
Some UINibDecoder * 0x00007f829b04fe00 0x00007f829b04fe00
[0] UINibDecoder
self calculater.ViewController 0x00007f829a58a980 0x00007f829a58a980
UIKit.UIViewController UIKit.UIViewController
UIKit.UIResponder UIKit.UIResponder
ObjectiveC.NSObject ObjectiveC.NSObject
lastnumber Swift.String unable to read data
core Swift._StringCore
_baseAddress Swift.COpaquePointer 0x00000001078bd538 0x00000001078bd538 calculater.__TEXT.__ustring + 40
value Builtin.RawPointer 0x1078bd538 0x00000001078bd538 calculater.__TEXT.__ustring + 40
_countAndFlags Swift.UWord 9223372036854775808 -9223372036854775808
value Builtin.Word -9223372036854775808 -9223372036854775808
_owner Swift.Optional<AnyObject> nil None
anserField #sil_weak Swift.ImplicitlyUnwrappedOptional<UIKit.UILabel>
Some UIKit.UILabel
UIKit.UIView UIKit.UIView
UIKit.UIResponder UIKit.UIResponder
ObjectiveC.NSObject ObjectiveC.NSObject
operatorLable #sil_weak Swift.ImplicitlyUnwrappedOptional<UIKit.UILabel>
Some UIKit.UILabel
UIKit.UIView UIKit.UIView
UIKit.UIResponder UIKit.UIResponder
ObjectiveC.NSObject ObjectiveC.NSObject
please put in the comment if you need anything else to figure out the problem
this is what hapend when i turned off the breakpoints and i pressed certain buttons
(more info in comments)
2014-08-22 23:39:05.613 calculater[6307:2641435] -[_TtC10calculater14ViewController plusTapped:]: unrecognized selector sent to instance 0x7faad9dbd150
2014-08-22 23:39:05.617 calculater[6307:2641435] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtC10calculater14ViewController plusTapped:]: unrecognized selector sent to instance 0x7faad9dbd150'
* First throw call stack:
(
0 CoreFoundation 0x00000001070f5055 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108bafa1c objc_exception_throw + 45
2 CoreFoundation 0x00000001070fbf1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000107054dbc ___forwarding_ + 988
4 CoreFoundation 0x0000000107054958 _CF_forwarding_prep_0 + 120
5 UIKit 0x0000000107974196 -[UIApplication sendAction:to:from:forEvent:] + 75
6 UIKit 0x0000000107a78c80 -[UIControl _sendActionsForEvents:withEvent:] + 467
7 UIKit 0x0000000107a7804f -[UIControl touchesEnded:withEvent:] + 522
8 UIKit 0x00000001079b9368 -[UIWindow _sendTouchesForEvent:] + 735
9 UIKit 0x00000001079b9c93 -[UIWindow sendEvent:] + 683
10 UIKit 0x0000000107986f51 -[UIApplication sendEvent:] + 246
11 UIKit 0x0000000107993ec6 _UIApplicationHandleEventFromQueueEvent + 17699
12 UIKit 0x000000010796fcd9 _UIApplicationHandleEventQueue + 1967
13 CoreFoundation 0x000000010702b0b1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
14 CoreFoundation 0x000000010702099d __CFRunLoopDoSources0 + 269
15 CoreFoundation 0x000000010701ffd4 __CFRunLoopRun + 868
16 CoreFoundation 0x000000010701fa06 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x000000010adbeabf GSEventRunModal + 161
18 UIKit 0x0000000107972cf8 UIApplicationMain + 1282
19 calculater 0x0000000106c7f6ed top_level_code + 77
20 calculater 0x0000000106c7f72a main + 42
21 libdyld.dylib 0x0000000109120145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)