signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.83k stars 3.04k forks source link

Crash when trying to "SMS" a number not in your contact list #775

Closed lordmortis closed 9 years ago

lordmortis commented 9 years ago

Trying to send a message to a number not in the contact list (i'm assuming that's what this feature is supposed to do?) results in this UX

img_1694 img_1695 Followed by a crash when I hit cancel.

2015-04-30 18:31:59.940 Signal[3461:1539651] Presenting view controllers on detached view controllers is discouraged <SignalsViewController: 0x146619460>.
2015-04-30 18:31:59.984 Signal[3461:1539651] Failed to set (keyPath) user defined inspected property on (UITextField): [<UITextField 0x146612900> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2015-04-30 18:32:00.090 Signal[3461:1539651] Attempting to badge the application icon but haven't received permission from the user to badge the application
2015-04-30 18:32:00.092 Signal[3461:1539651] Attempting to badge the application icon but haven't received permission from the user to badge the application
2015-04-30 18:32:00.678 Signal[3461:1539651] Can't find keyplane that supports type 5 for keyboard iPhone-PortraitChoco-PhonePad; using 3760611571_PortraitChoco_iPhone-Complex-Pad_Default
2015-04-30 18:32:00.694 Signal[3461:1539651] Unbalanced calls to begin/end appearance transitions for <SignalsNavigationController: 0x14684fc00>.
2015-04-30 18:32:36.424 Signal[3461:1539651] Can't find keyplane that supports type 4 for keyboard iPhone-PortraitChoco-NumberPad; using 2705787216_PortraitChoco_iPhone-Simple-Pad_Default
2015-04-30 18:32:41:907 Signal[3461:807] We're in debug mode, and registered a fake push identifier
2015-04-30 18:32:51.767 Signal[3461:1539651] SocketRocket: In debug mode.  Allowing connection to any root cert
2015-04-30 18:32:51.780 Signal[3461:1539810] INFO: fetch-response is unable to open the file /private/var/mobile/Containers/Data/Application/FAE4E852-A7ED-4C83-AA6F-4C40CEB0140A/Library/Caches/org.whispersystems.signal/fsCachedData/D99EB0F4-EA47-4BE3-BAE6-4C2347402F1F. Errno: 1
2015-04-30 18:33:17.111 Signal[3461:1539651] Warning: Attempt to present <UIAlertController: 0x146599f00>  on <MessageComposeTableViewController: 0x14663af90> which is already presenting (null)
2015-04-30 18:33:24.211 Signal[3461:1539651] Warning: Attempt to present <UIAlertController: 0x14659dcd0>  on <MessageComposeTableViewController: 0x14663af90> which is already presenting (null)
2015-04-30 18:33:26.189 Signal[3461:1539651] -[_UIAlertControllerAlertPresentationController adaptivePresentationController]: unrecognized selector sent to instance 0x1741be060
2015-04-30 18:33:26.194 Signal[3461:1539651] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIAlertControllerAlertPresentationController adaptivePresentationController]: unrecognized selector sent to instance 0x1741be060'
*** First throw call stack:
(0x1835a82d8 0x194dcc0e4 0x1835af3a4 0x1835ac154 0x1834aeccc 0x188766338 0x188507428 0x1882f0fb0 0x18806c240 0x187fdc6ec 0x1835602a4 0x18355d230 0x18355d610 0x1834892d4 0x18cc9f6fc 0x18804efac 0x100128c68 0x19544aa08)
libc++abi.dylib: terminating with uncaught exception of type NSException
lordmortis commented 9 years ago

I will probably try and dig into this one as I found it after installing a testing version of signal (But have confirmed the shipping version has the problem)

FredericJacobs commented 9 years ago

I have a fix. I'll push it later today. It's going to be fixed in the next release. Thanks for the report.

lordmortis commented 9 years ago

Oh, awesome! Sorry I haven't looked at it yet. I need this to easily message my development client.

On 30 Apr 2015, at 21:04, Frederic Jacobs notifications@github.com wrote:

I have a fix. I'll push it later today. It's going to be fixed in the next release. Thanks for the report.

— Reply to this email directly or view it on GitHub.

!DSPAM:55422875222622315534642!

lordmortis commented 9 years ago

Seems to work. There's no way to message someone not on your contact list though, but that's another, different thing :)

Thanks!

MihalisL commented 8 years ago

Hello, we have a similar scenario in our app that when cancelling the search in the uisearchbar we end up with a crash like the one above:

Fatal Exception: NSInvalidArgumentException -[_UIFullscreenPresentationController adaptivePresentationController]: unrecognized selector sent to instance 0x147c81ce0

Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x1842b4f48 exceptionPreprocess 1 libobjc.A.dylib 0x198d77f80 objc_exception_throw 2 CoreFoundation 0x1842bbc5c __methodDescriptionForSelector 3 CoreFoundation 0x1842b8c00 __forwarding 4 CoreFoundation 0x1841bccac _CF_forwarding_prep_0 5 UIKit 0x18a1ba084 -[UISearchController _searchPresentationController] 6 UIKit 0x189e7d10c -[_UISearchControllerTransplantSearchBarAnimator animateTransition:] 7 UIKit 0x189b9fa90 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke 8 UIKit 0x189af856c _runAfterCACommitDeferredBlocks 9 UIKit 0x189b054bc _cleanUpAfterCAFlushAndRunDeferredBlocks 10 UIKit 0x189839984 _afterCACommitHandler 11 CoreFoundation 0x18426bbd0 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION 12 CoreFoundation 0x184269974 CFRunLoopDoObservers 13 CoreFoundation 0x184269da4 CFRunLoopRun 14 CoreFoundation 0x184198ca0 CFRunLoopRunSpecific 15 GraphicsServices 0x18f3d4088 GSEventRunModal 16 UIKit 0x1898b0ffc UIApplicationMain 17 Trumpit 0x10010ddf0 main (main.m:14) 18 libdyld.dylib 0x1995c68b8 start

Since @FredericJacobs has been able to fix that, would you care to share what to do to fix that error? Thanks in advance.