New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when launching applications on iPhone 6 in debug mode #1362

Closed
jasssonpet opened this Issue Dec 22, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@jasssonpet
Contributor

jasssonpet commented Dec 22, 2015

From @manijak on December 6, 2015 21:38

I just updated my iPhone 6 to iOS 9.1, and I am having issues in running the app from device.

If I use tns deploy ios or tns run ios or tns debug ios I get the app deployed successfully message, but the app crashes as soon as it starts. No error or exception in the terminal...

If I deploy the app directly from xcode 7.1.1, everything runs fine. App does not crash, no errors.

I managed to find the crashlog on the device, here is the exception part, but it doesn't say much to me.

Date/Time:           2015-12-06 22:04:43.43 +0100
Launch Time:         2015-12-06 22:04:42.42 +0100
OS Version:          iOS 9.1 (13B143)
Report Version:      105

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x0000000015d0e070
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   ???                             0x15d0e070 0 + 366010480
1   CoreFoundation                  0x2759096b 0x274e7000 + 694635
2   CoreFoundation                  0x27590741 0x274e7000 + 694081
3   CoreFoundation                  0x275e4ab3 0x274e7000 + 1039027
4   CoreFoundation                  0x274f1f3b 0x274e7000 + 44859
5   Foundation                      0x282dce27 0x282d7000 + 24103
6   UIKit                           0x2b9ac579 0x2b6fd000 + 2815353
7   UIKit                           0x2b9b0285 0x2b6fd000 + 2830981
8   UIKit                           0x2b9c3b55 0x2b6fd000 + 2911061
9   UIKit                           0x2b9ad7a7 0x2b6fd000 + 2820007

Copied from original issue: NativeScript/ios-runtime#431

@jasssonpet

This comment has been minimized.

Show comment
Hide comment
@jasssonpet

jasssonpet Dec 22, 2015

Contributor

From @fealebenpae on December 6, 2015 21:39

Hi @manijak,

Please try to find the device log as well (tns device log).

Contributor

jasssonpet commented Dec 22, 2015

From @fealebenpae on December 6, 2015 21:39

Hi @manijak,

Please try to find the device log as well (tns device log).

@jasssonpet

This comment has been minimized.

Show comment
Hide comment
@jasssonpet

jasssonpet Dec 22, 2015

Contributor

From @manijak on December 7, 2015 7:13

Here you go.
Device log

Contributor

jasssonpet commented Dec 22, 2015

From @manijak on December 7, 2015 7:13

Here you go.
Device log

@jasssonpet

This comment has been minimized.

Show comment
Hide comment
@jasssonpet

jasssonpet Dec 22, 2015

Contributor

From @fealebenpae on December 7, 2015 10:28

I'm afraid I can't see anything in the device log that would indicate an error in the application itself. However, the fact that this happens only when deploying via the CLI could be a hint. @teobugslayer, have you come across such a problem?

Contributor

jasssonpet commented Dec 22, 2015

From @fealebenpae on December 7, 2015 10:28

I'm afraid I can't see anything in the device log that would indicate an error in the application itself. However, the fact that this happens only when deploying via the CLI could be a hint. @teobugslayer, have you come across such a problem?

@jasssonpet

This comment has been minimized.

Show comment
Hide comment
@jasssonpet

jasssonpet Dec 22, 2015

Contributor

The reason for this seems to be that the CLI is building for armv7 architecture but Xcode for arm64. Restricting the architecture to armv7 only, crashes the app even when launched through Xcode.

Building in release always builds both architectures, so that explains why it runs with --release flag.

@fealebenpae My suggestion is that the CLI builds for the active device architecture only in debug mode. Does this make sense?

ping @N3ll

Contributor

jasssonpet commented Dec 22, 2015

The reason for this seems to be that the CLI is building for armv7 architecture but Xcode for arm64. Restricting the architecture to armv7 only, crashes the app even when launched through Xcode.

Building in release always builds both architectures, so that explains why it runs with --release flag.

@fealebenpae My suggestion is that the CLI builds for the active device architecture only in debug mode. Does this make sense?

ping @N3ll

@jasssonpet

This comment has been minimized.

Show comment
Hide comment
@jasssonpet

jasssonpet Dec 22, 2015

Contributor

From @fealebenpae on December 21, 2015 15:53

Unfortunately I don't believe the CLI has the same idea of active device as Xcode. The CLI could generally poll for a connected device before doing a build and constraining to architecture of the device the app will run on, but I think this is beyond the scope of the iOS runtime itself. Perhaps we can move this to the CLI repository, having narrowed down the source of the problem?

Contributor

jasssonpet commented Dec 22, 2015

From @fealebenpae on December 21, 2015 15:53

Unfortunately I don't believe the CLI has the same idea of active device as Xcode. The CLI could generally poll for a connected device before doing a build and constraining to architecture of the device the app will run on, but I think this is beyond the scope of the iOS runtime itself. Perhaps we can move this to the CLI repository, having narrowed down the source of the problem?

@rosen-vladimirov

This comment has been minimized.

Show comment
Hide comment
@rosen-vladimirov

rosen-vladimirov Jan 6, 2016

Contributor

Ok, CLI sets ARCHS to armv7 and arm64 for both debug and release builds, but in debug build the Build Active Architecture Only is set to Yes.
ios-runtime have applied a fix, which allows iPhone 6 to run armv7 architecture - it will be included in 1.6.0 release.
Anyway CLI should check attached devices type and build for correct architectures.
At the moment, the only workaround is to use release build of the application (pass --release flag).

Contributor

rosen-vladimirov commented Jan 6, 2016

Ok, CLI sets ARCHS to armv7 and arm64 for both debug and release builds, but in debug build the Build Active Architecture Only is set to Yes.
ios-runtime have applied a fix, which allows iPhone 6 to run armv7 architecture - it will be included in 1.6.0 release.
Anyway CLI should check attached devices type and build for correct architectures.
At the moment, the only workaround is to use release build of the application (pass --release flag).

Fatme added a commit that referenced this issue Jan 15, 2016

Fatme added a commit that referenced this issue Jan 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment