-
Notifications
You must be signed in to change notification settings - Fork 920
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
[iOS] Crashed by *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil #1613
Comments
This problem was reproduced by the example of gfx-rs with some modifications. [Some modifications] I've reported the problem to the winit-rs repository due to the crash caused by the touch event, but if it's a problem on the gfx-rs side, I'll report it to it. |
Thanks for reporting this! It certainly sounds like an issue here in winit. It looks like you're using winit 0.21: https://github.com/inoutch/crossplatform_gfx_hal_example/blob/27746b0124ebc9e062afc9397d6e3f43d6ab7a01/rust/game_lib/Cargo.toml#L20 Can you still reproduce this using winit 0.22.2? |
Thank you for your quick reply. |
Hmm. So, it could be entirely unrelated but I've had a similar bug with some of my UIKit WIP for iced. When I start the app and use the UIView to add some subviews, if I tap on the subview before I tap on anything other than a subview, it crashes. So, the work around I've been doing to test that the views are setup correctly is to tap on anything other than say a text box and then tap on the text box... This results in a few touch events and then I can tap on my text input box and do things. If I tap directly on the input box at first without touching the background view, it crashes with the following stack trace:
|
@inoutch thanks for checking. I've succeeded in using your example to reproduce this on my iPhone XR... it's very interesting that this only happens within that area. I'm not able to reproduce this if I comment out all of your rendering code. I'm also not able to reproduce this in my own application, which also uses gfx-hal. I tried adding the fancy @simlay ah, iOS support in iced would be quite cool! The Original Exception Backtrace I get when reproducing this looks similar to the one you posted, so it seems likely that this is related. Do you have this up in a repo somewhere? |
i confirm, I have also received this crash when i tap near when app begins, in top left corner, same exception. using winit 0.24, iced 0.4, and wgpu 0.7 |
I confirm IOS ScreenEdge Corrected Default #1843 solves my issue with this error (extensively tested and now using my winit fork with that PR applied). |
I will assume that this has been fixed as per the above comment, feel free to re-open if that is not the case. |
If I tap on the moment it starts up on iOS, the following error occurs and the app finished.
Xcode wrote the following stack trace for me.
My codes
https://github.com/inoutch/tearchan/blob/03edc923569011a0c8e10ac97f1e0e77e5a4574d/src/core/engine.rs#L67-L93
Inexplicably, if I wait for a few seconds after app starting and tap later, it doesn't finish, and it also get the touch event successfully. Also, I use gfx-rs in addition to winit-rs and do present surface or not, an error may or may not occur (This is not related to gfx-rs, and to timing issue?)
The text was updated successfully, but these errors were encountered: