Skip to content
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

[SR-10959] App crashes randomly after upgrading to xCode 11 & Swift 5 #4000

Closed
swift-ci opened this issue Jun 17, 2019 · 6 comments
Closed

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-10959
Radar None
Original Reporter idomo (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

macOS ‏10.14.4 ‏(18E226‏)

xCode 11.0 beta (11M336w)

Additional Detail from JIRA
Votes 0
Component/s Compiler, Foundation, Standard Library
Labels Bug
Assignee @belkadan
Priority Medium

md5: 09a2e0b16ee440411ce23cd3849f74e1

Issue Description:

Since I've upgraded to xCode 11 with the iOS 13 SDK, my app crashes randomly with "Thread 1: signal SIGABRT" (that doesn't include any reason for it in the stack trace):

* thread #​1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
 frame #​0: 0x0000000111fb02c6 libsystem_kernel.dylib`__pthread_kill + 10
 frame #​1: 0x0000000112003bf1 libsystem_pthread.dylib`pthread_kill + 284
 frame #​2: 0x0000000111d3cadc libsystem_c.dylib`abort + 120
 frame #​3: 0x000000010fa187f8 libc++abi.dylib`abort_message + 231
 frame #​4: 0x000000010fa189c7 libc++abi.dylib`demangling_terminate_handler() + 262
 frame #​5: 0x000000010f9491b3 libobjc.A.dylib`_objc_terminate() + 96
 frame #​6: 0x000000010fa25e97 libc++abi.dylib`std::__terminate(void (*)()) + 8
 frame #​7: 0x000000010fa25ae9 libc++abi.dylib`__cxa_rethrow + 99
 frame #​8: 0x000000010f9490eb libobjc.A.dylib`objc_exception_rethrow + 37
 frame #​9: 0x0000000110b8f05a CoreFoundation`CFRunLoopRunSpecific + 570
 frame #​10: 0x0000000113c5c9f8 GraphicsServices`GSEventRunModal + 65
 frame #​11: 0x000000011a4e8722 UIKitCore`UIApplicationMain + 1621
 * frame #​12: 0x0000000109debeeb My warranty`main at AppDelegate.swift:21:7
 frame #​13: 0x0000000111c1e6ad libdyld.dylib`start + 1
 frame #​14: 0x0000000111c1e6ad libdyld.dylib`start + 1

I'm trying for hours to debug the issue and really can't get into it, I think it's from the iOS 13/Swift 5, 'cause the app running great on iOS 12 with Swift 4.2.

*It's important to say that in this case I'm running the app via the simulator and not from real device (I don't want to download the iOS 13 beta to my main device right now), so it may be also something that related to the simulator/it's compiler.

@belkadan
Copy link

Can you share the app with us? If not here, then just with Apple at https://feedbackassistant.apple.com?

One thing to try right now is to continue after the exception is thrown, so it'll get printed to the console.

@swift-ci
Copy link
Contributor Author

Comment by Ido (JIRA)

After the continue I'm getting this:

Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

And the location of the error is on the same place (at AppDelegate.swift on the first line of the declaration of the class).

Tried to search for this error, looks like it doesn't give much context as signal SIGABRT doesn't (especially when it doesn't point to any specific line).

When I'm sending things to feedback assistant they usually responding in few weeks and taking care the issue completely in few months (sometimes even 6+).

May I send you the app via email?

@belkadan
Copy link

I'm afraid it has to go through Feedback Assistant, but if you mention this JIRA bug we'll be able to connect them up within Apple. We are definitely reading the bugs filed through there on Xcode 11.

@swift-ci
Copy link
Contributor Author

Comment by Ido (JIRA)

I've already opened a feedback there (#6163396), now I asked them to give you an access to the file of the project (that I've attached there).

Note that the crashes are happens in the ItemDetailController, so you have to login to the account and add a document so you'll be able to test it.

@swift-ci
Copy link
Contributor Author

Comment by Ido (JIRA)

I've just found this article: https://kakshilshahblog.wordpress.com/2016/10/02/finding-error-line-number-thread-1-sigabrt-error-exc_crash/

A life (time) saving pice of text.

So looks like the error is happening right after setting the text of an UITextView with this code:

cell.notesTextView.text = item.notes

It crashing there only if item.notes contains non-empty String (when it contains empty String it works fine).

@swift-ci
Copy link
Contributor Author

Comment by Ido (JIRA)

Looks like xCode 11 beta 2 fixed this weird issue, so closing here.

Thank you for the help intention!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants