I have a 2 view aplication, on the main screen I have added ADMOB banner, it works perfectly. But when I click on UIButton (any category) to move to the second UIView, the app crashes and I get error : "thread 1 exc_bad_instruction (code=exc_i386_invop subcode=0x0)" .
Picture with error
When I remove the banner, it works good again. Not sure what Im missing. The whole code is here:
Picture with whole viewcontroller.swift
Thank you for reply.
Related
I am working on existing swift app written in Swift 4.0. I am getting strange issue in any of screen If I tried to use UIAlertController with UIAlertAction in form of alert or action sheet. As soon as I tap on UIAlertAction Button complete screen goes black(Blank) and I need to force quit to restart app, I am getting this on iOS 14.7.1....
I tried to use alert on Main Thread, added scene delegate as well as Deployment target is iOS 13.0 But no luck and interesting part is If I run app with Xcode everything works fine but if I tried to use app on device directly without run, getting this strange issue....Any Suggestions...
Thanks in advance....
I got solution for now, after seeing Debug View Hierarchy I got on tap of UIAlertAction, it remove window that's why complete app goes blank, So I created new window for showing Alert. I followed this stack OverFlow Answer Every UIAlertController disappear automatically before user responds - since iOS 13
May be it helps someone....
I am making an uncomplicated game for IOS app store. The game has been working fine up until this point. Suddenly, I have come across an error: when I play the game for a small amount of time on my iPhone 5s then I press the home button to return to the home menu and then go back into the game, it crashes with this error on the appdelegate:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x52879984).
The game is fine until I try to go back into the game, crashing after the app enters the foreground.
This does not happen on other devices such as my Iphone 7. I have researched into it and I believe it may have to do with my memory allocation as I have not bothered to manage the memory at all in the hope swift and spritekit can sort it out for me because it is a simple game.
I have tried breakpointing the app just before it crashes and checking variables which seem to be there. I have tried completely wiping the game scene in the UIApplication.didEnterBackgroundNotification and creating a new game scene in the willEnterForegroundNotification to no avail.
I have turned on the address sanitizer diagnostic tool in the scheme and the console prints out:
==2288==ERROR: AddressSanitizer: negative-size-param: (size=-1377549668)
#0 0x7435c8 in wrap_memset (/var/containers/Bundle/Application/5AF965C7-7D31-4B7B-97D2-5DBA7BEDCA9E/xxxxxx.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib:armv7s+0x175c8)
Address 0x528e4908 is located in the high shadow area.
SUMMARY: AddressSanitizer: negative-size-param (/var/containers/Bundle/Application/5AF965C7-7D31-4B7B-97D2-5DBA7BEDCA9E/xxxxxx.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib:armv7s+0x175c8) in wrap_memset
(lldb)
And the error changes to
Thread 1: EXC_BAD_ACCESS (code=2, address=0x4a51c740)
My appdelegate is just basic and I have a basic gameviewcontroller which creates a game scene in the viewdidload function.
The game used to work as intended in this scenario: pausing appropriately.
Help will be highly appreciated. :)
I'm creating a watch app and I'm noticing that "Program ended with exit code: 0" is shown in the debug window if the watch app is deactivated (via cmd+shift+h, lower wrist, etc). The code I'm using to present alert in the WKInterfaceController is:
presentAlert(withTitle: alert.title, message: alert.message, preferredStyle: .alert, actions: [cancelAction, continueAction])
I'm trying to understand why the watch app is closing with no error if a wkalert is visible and active on the screen. The memory of the app is under 20mb and doesn't spike at all when the alert is shown. On every other screen the app simply deactivates. Maybe there is a workaround? Any help would be appreciated.
Thanks - Ross
I reported this bug to Apple:
Summary:
Displaying an Alert will crash App (code 0) if Alert is presented and home button is pressed while displaying a modal view.
Steps to Reproduce:
Display a modal view on Apple Watch then display an Alert. Taping Home button or when screen goes blank the App will crash with Code 0. With attached file tap the Modal button then the PopUp button then on simulator press cmd-shift-H or on watch allow screen to go blank. App will crash with Code 0.
Expected Results:
App should not crash. Displaying with Push segue style instead of Modal will not cause crash.
Actual Results:
crash with Code 0
Version:
iOS 3.0 and iOS 3.1
After reporting this bug to Apple they responded but I am unable to provide the log feedback they requested:
This is a follow-up regarding regarding Bug ID# 29131322.
Engineering has requested the following information in order to further investigate this issue:
Could we get a sysdiagnose from the Watch right after the crash?
Thank you.
Please provide your response or results by updating your bug report and compress any bundled files (e.g. nested folders) prior to uploading.
watchOS sysdiagnose Instructions:
https://developer.apple.com/services-account/download?path=/iOS/watchOS_Logs/sysdiagnose_Logging_Instructions.pdf
watchOS Logging Profile:
https://developer.apple.com/services-account/download?path=/iOS/watchOS_Logs/watchOS_logging.mobileconfig
If you could provide the log feedback and attach it to bug report 29131322 that might help get it fixed.
I am using MMDrawerController for showing drawer. My app is crashing on clicking on the drawer menu options. It works well in iOS9 but crashes in iOS8. Does anyone have any idea about what is happening here. Am I missing something here?
I am getting the below error when i click on the left menu bar option:
[UIScreenEdgePanGestureRecognizer view]: message sent to deallocated
instance 0x155e6d9a0
I have two UIViewControllers. On first One i have an UIButton which calls the second viewController. When I'm on secondViewController the RevMob ads shows.
[[RevMobAds session] showFullscreen];
If i press "x" button on the corner of the add, i mean to Close this add, the app goes to FirstViewController and that UIButton which calls the secondViewController DOESN'T WORK ANYMORE.
This happens on iOS 5 on Simulator and Device. on iOS 6 works great.
Please help me, I contacted RevMob but they didn't answer.
The version 5.9.1 says on the change log that this issue is solved.