AS3 - iOS app crashes at breakpoint - ios

I have a very annoying problem with debugging AIR apps on iOS devices and simulators.
Simply put, the app crashes when I'm debugging application and it stops at a breakpoint. Then the line with breakpoint is selected for a second or less and then the app is gone.
Here's some logs I got from simulator after last flash trace:
assertiond[30178]: assertion failed: 15G31 13E230: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
SpringBoard[30174]: HW kbd: Failed to set (null) as keyboard focus
SpringBoard[30174]: BSXPCMessage received error for message: Connection invalid
--- last message repeated 1 time ---
com.apple.CoreSimulator.SimDevice.EE317320-40C9-4513-9BE9-02611D6DD722.launchd_sim[30158] (UIKitApplication:com.my.app.id[0x31d1][30651]): Service exited due to signal: Segmentation fault: 11
assertiond[30178]: assertion failed: 15G31 13E230: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
SpringBoard[30174]: Application 'UIKitApplication:com.my.app.id[0x31d1]' crashed.
assertiond[30178]: assertion failed: 15G31 13E230: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
assertiond[30178]: notify_suspend_pid() failed with error 7
And that's it.
The funny thing is that it may not happen for months, then suddenly every breakpoint causes a crash.
From what I've noticed, the device, iOS version, and AIR version don't matter.
Have you guys ever faced this problem? Do you have any solution for this?

The AIR compiler has a known issue in the following scenarios:
If the base class function doesn't use any arguments and the overridden function in the derived class does, then any function calls through the base class reference can cause the application to terminate abruptly.
If 32-bit support is required, downgrading may be required:
However, with the release of AIR 20, only a 64-bit Runtime dynamic Library is provided on Mac OS X. See AIR 20 release notes for details.
Certain users who are running apps that require 32-bit ANEs may want to downgrade to a lower AIR version that supports a 32-bit Runtime dynamic Library.
The Flash Debugger(fdb) combined with the AIR Debug Launcher(ADL) may give more information:
Use the AIR Debug Launcher (ADL) to run both SWF-based and HTML-based applications during development. Using ADL, you can run an application without first packaging and installing it. By default, ADL uses a runtime included with the SDK, which means you do not have to install the runtime separately to use ADL.
AIR supports debugging directly, so you do not need a debug version of the runtime (as you would with Adobe® Flash® Player). To conduct command-line debugging, you use the Flash Debugger and the AIR Debug Launcher (ADL).
The Flash Debugger is distributed in the Flex SDK directory. The native versions, such as fdb.exe on Windows, are in the bin subdirectory. The Java version is in the lib subdirectory. The AIR Debug Launcher, adl.exe, is in the bin directory of your Flex SDK installation. (There is no separate Java version).
Note: You cannot start an AIR application directly with fdb, because fdb attempts to launch it with Flash Player. Instead, let the AIR application connect to a running fdb session.
References
AIR Compiler Known Issues
Building Adobe AIR Applications: AIR Debug Launcher (ADL)
Debugging with fdb
Issues while downgrading from AIR 20 to a lower version on Mac OS X
AIR 20 Release Notes
Archived Adobe AIR SDK versions
Troubleshoot Adobe AIR installation for Mac OS

Related

AIR HARMAN 33 - Cant's compile for iOS

I'm using FlashDevelop for a while now to build my projects using Adobe AIR. The last version of AIR is AIR 33.0.2.330 and belongs to Harman. I was able to compile for Android, but for iOS, I get a black screen. Running a debug interpreter gives me a
[Fault] exception, information=VerifyError: Error #1014: Class flash.external::ExtensionContext could not be found.
Am I missing a parameter or something? The error code is really not explicit...

calabash-ios physical device test, app starts but crashes

Running calabash-ios cucumber for simple iPhone app. Simulator is working perfectly. When trying on physical device, app loads, crashes, then loads again, and crashes again, on a loop.
Error message:
Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported by this simulator version
Calabash::Cucumber::Launcher::StartError: Time out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError.
Logfile /var/folders/9s/yttj4cz93m98hqs6bfw2x8xr0000gn/T/run_loop20150522-12657-dr3m49/run_loop.out
2015-05-22 19:58:11 +0000 Fail: An error occurred while trying to run the script.
Instruments Trace Complete (Duration : 2.594758s; Output : /var/folders/9s/yttj4cz93m98hqs6bfw2x8xr0000gn/T/run_loop20150522-12657-dr3m49/trace.trace)
to run the script. UIAScriptAgentSignaledException
(Calabash::Cucumber::Launcher::StartError)
/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:766:in `new_run_loop'
/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:631:in `relaunch'
Steps:
loaded app-cal on device
ran in command-line using:
$ DEVICE_TARGET=udid BUNDLE_ID=com.company.app DEVICE_ENDPOINT=http://ip:37265
Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError
The probably cause of this is that the device is not enabled for UIAutomation. The device must be enabled for development. A device is enabled for development if it appears in Xcode's Device's window (Shift + Command +2) and you must enable on-device testing manually by visiting the device's Settings.app > Developer tab.
If you have recently upgraded the iOS version we recommend that you check the UIAutomation settings again and perform a restart. Often, after an upgrade, Xcode cannot download debugging information from the device. Look at Xcode's Device's window. The device must appear without any warnings.
Sometimes devices get into a bad state and Xcode cannot communicate with it. We recommend trying to interact with the device with Apple's Instruments to clear this bad state.
All this information and more can be found on the Calabash iOS Hot Topics page. https://github.com/calabash/calabash-ios/wiki/Hot-Topics#6-errnoeintr-interrupted-system-call

iOS Simulator Crash in App with Embedded Binary

I'm having a strange issue and wondering if anyone knows what is going on. In Xcode 6.2, if you follow these steps:
create a new workspace
create a new iOS > Application> Single View Application project in
the workspace
create a new iOS > Framework & Library > Cocoa Touch Framework
project in the workspace
add the framework as an embedded binary in the app
build and run the app on any 8.2 simulator and then stop it
launch the app from within the simulator
Every time you try to launch the app from within the simulator (not running it from Xcode, but actually clicking on the app icon inside the simulator) the app crashes on startup. The only thing I see in the system log is:
Apr 3 20:04:53 MacBook com.apple.CoreSimulator.SimDevice.6B002DFB-FE6C-4295-BA22-742E4CEE2B6D.launchd_sim[61494] (UIKitApplication:com.test.TestApp[0xcb1d][61787]): Service exited due to signal: Trace/BPT trap: 5
Apr 3 20:04:53 MacBook.local SpringBoard[61507]: Application 'UIKitApplication:com.test.TestApp[0xcb1d]' crashed.
Apr 3 20:04:53 MacBook assertiond[61511]: assertion failed: 14C1514 12D508: assertiond + 14743 [849F745E-3AAA-3638-91FF-892312A54F42]: 0x1
Does anyone know if this is by-design or if embedded binaries work correctly? I'm hesitant to add an embedded binary to my app if the app always crashes in the simulator.
Thanks!
- Tom B.

Mono for Android App crashes on start after clears data in app settings

I have found that my Mono for Android app crashes on each start after the user goes to Settings->Apps->MyApp and selects "Clear Data". I created a new project with the Mono for Android "Hello World" application, and this app exhibits exactly the same behaviour, which leeds me to the assumption this happens somewhere in the mono stack away from my control. If I check with adb logcat, this are the relevant lines that I can find:
I/ActivityManager( 185): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=Test_App.Test_App/test_app.Activity1} from pid 386
D/dalvikvm(18358): Late-enabling CheckJNI
I/dalvikvm(18358): Turning on JNI app bug workarounds for target SDK version 8...
I/ActivityManager( 185): Start proc Test_App.Test_App for activity Test_App.Test_App/test_app.Activity1: pid=18358 uid=10074 gids={3003}
D/dalvikvm( 119): GC_EXPLICIT freed 37K, 3% free 12553K/12867K, paused 1ms+2ms
I/ActivityThread(18358): Pub Test_App.Test_App.mono.MonoRuntimeProvider.__mono_init__: mono.MonoRuntimeProvider
D/dalvikvm(18358): Trying to load lib /data/data/Test_App.Test_App/lib/libmonodroid.so 0x4168ba48
D/dalvikvm(18358): Added shared lib /data/data/Test_App.Test_App/lib/libmonodroid.so 0x4168ba48
D/dalvikvm( 119): GC_EXPLICIT freed <1K, 3% free 12553K/12867K, paused 2ms+2ms
E/mono (18358): WARNING: The runtime version supported by this application is unavailable.
E/mono (18358): Using default runtime: v2.0.50727
D/OpenGLRenderer( 386): Flushing caches (mode 1)
D/dalvikvm( 119): GC_EXPLICIT freed <1K, 3% free 12553K/12867K, paused 1ms+1ms
I/mono (18358): Stacktrace:
I/mono (18358):
D/OpenGLRenderer( 386): Flushing caches (mode 0)
D/Zygote ( 119): Process 18358 terminated by signal (11)
I/ActivityManager( 185): Process Test_App.Test_App (pid 18358) has died.
W/ActivityManager( 185): Force removing ActivityRecord{41a85018 Test_App.Test_App/test_app.Activity1}: app died, no saved state
Does anyone have the same behaviour in his mono apps? Is there a fix?
Managed to solve my own question. Under project settings I had to go to "Mono for Android Build" tab, select the Release configuration and make the linker "Link all assemblies" instead of "Link SDK assemblies only". Fixed this by trial and error, but what can you do..
Another solution I've found is to disable the use of the "Shared Runtime" when building the app.
In Visual Studio this is on your Android project settings, Android Options > Packaging tab > Packaging properties > Use Shared Runtime (untick)
It makes the resulting APK a bit bigger, but means users can do "Clear Data" on your app, restart it and it will run without crashing!
Using Visual Studio 2015 with a Xamarin Forms app on an LG G3 Vigor as a test device. Everything worked fine for many months. I was doing testing for performance documentation so I decided to do Clear Cache on my app in Setting -> General -> Apps on the Vigor. After that was done the Vigor would cause a runtime error when I would deploy my app to the device. The app would work fine on other devices, emulators and iOS simulators.
I tried other suggestions listed on this post. I ended up doing a factory reset on the device. After unlocking developer mode and reconnecting to my computer, it now compiled and ran the app again.
I think a person could try to revoke usb debugging authorizations and re-authorize if they didn't want to do a factory reset, to see if that gets things working again. This may create a different connection path between VS2015 and the device that resets whatever issue was caused by the cache reset. If all else fails, a factory reset did it for me. Hope it helps in case this happens to someone.

Flex mobile project for iOS doesn't work in release. Only in debug mode

I have a mobile project for iOS and I can only see it working on debug mode in the iPad. When I run it on release, the screen remains blank.
The project has only some movieClips playing and not too much components. It's almost an animated presentation.
The crash report from the device says:
Application Specific Information:
com.testapp.game failed to resume in time
And later it says:
Unknown thread crashed with unknown flavor: 5, state_count: 1
And many other weird things.
What would be?
Thank you!

Resources