Skip to content

Previously working iOS example crashes on touch #3185

Open
@HackerFoo

Description

@HackerFoo

Bevy version

bevy/main with #3109 merged in to enable an iOS build: https://github.com/HackerFoo/bevy/tree/ios-crash

Operating system & version

MacOS 12.0.1

What you did

I opened examples/ios/bevy_ios_example.xcodeproj in Xcode 13.1, and built and ran the project for an iPad Pro 5th generation device.

What you expected to happen

The demo to run without crashing.

What actually happened

The demo ran, but crashed as soon as I touched the screen with:

�[2m2021-11-25T03:05:13.709163Z�[0m �[31mERROR�[0m �[2mbevy_gilrs�[0m�[2m:�[0m Failed to start Gilrs. Gilrs does not support current platform.
�[2m2021-11-25T03:05:13.756350Z�[0m �[33m WARN�[0m �[2mwinit::platform_impl::platform::window�[0m�[2m:�[0m `WindowAttributes::min_inner_size` is ignored on iOS    
2021-11-24 19:05:13.769411-0800 bevy_ios_example[61497:6420685] Metal GPU Frame Capture Enabled
2021-11-24 19:05:13.769611-0800 bevy_ios_example[61497:6420685] Metal API Validation Enabled
2021-11-24 19:05:13.868258-0800 bevy_ios_example[61497:6420685] fopen failed for data file: errno = 2 (No such file or directory)
2021-11-24 19:05:13.868352-0800 bevy_ios_example[61497:6420685] Errors found! Invalidating cache...
�[2m2021-11-25T03:05:13.916056Z�[0m �[32m INFO�[0m �[2mwinit::platform_impl::platform::app_state�[0m�[2m:�[0m processing `RedrawRequested` during the main event loop    
�[2m2021-11-25T03:05:14.033052Z�[0m �[32m INFO�[0m �[2mnaga::front::spv�[0m�[2m:�[0m Generated by 851978 version 10000    
�[2m2021-11-25T03:05:14.035360Z�[0m �[32m INFO�[0m �[2mnaga::front::spv�[0m�[2m:�[0m Patching...    
�[2m2021-11-25T03:05:14.035886Z�[0m �[32m INFO�[0m �[2mnaga::front::spv�[0m�[2m:�[0m Generated by 851978 version 10000    
�[2m2021-11-25T03:05:14.039428Z�[0m �[32m INFO�[0m �[2mnaga::front::spv�[0m�[2m:�[0m Patching...    
�[2m2021-11-25T03:05:14.041750Z�[0m �[33m WARN�[0m �[2mnaga::back::msl::writer�[0m�[2m:�[0m Ignoring CullDistance BuiltIn    
�[2m2021-11-25T03:05:14.041836Z�[0m �[33m WARN�[0m �[2mnaga::back::msl::writer�[0m�[2m:�[0m Ignoring CullDistance BuiltIn    
2021-11-24 19:05:14.042165-0800 bevy_ios_example[61497:6420685] fopen failed for data file: errno = 2 (No such file or directory)
2021-11-24 19:05:14.042204-0800 bevy_ios_example[61497:6420685] Errors found! Invalidating cache...
�[2m2021-11-25T03:05:14.173949Z�[0m �[33m WARN�[0m �[2mwinit::platform_impl::platform::app_state�[0m�[2m:�[0m processing non `RedrawRequested` event after the main event loop: WindowEvent {
    window_id: WindowId(
        WindowId {
            window: 0x000000014b705690,
        },
    ),
    event: Resized(
        PhysicalSize {
            width: 2048,
            height: 2732,
        },
    ),
}    
2021-11-24 19:05:16.163232-0800 bevy_ios_example[61497:6420685] *** Assertion failure in -[UIGestureGraphEdge initWithLabel:sourceNode:targetNode:directed:], UIGestureGraphEdge.m:24
2021-11-24 19:05:16.165755-0800 bevy_ios_example[61497:6420685] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: sourceNode'
*** First throw call stack:
(0x180b8604c 0x1991faf54 0x18243f6cc 0x1835db73c 0x18322e3bc 0x183433f98 0x1830f6618 0x18312a8c8 0x183137a68 0x1832e7318 0x18310ac30 0x1830ffa1c 0x183104ec8 0x180ba8020 0x180bb8ce0 0x180af2fe8 0x180af87f4 0x180b0c3b8 0x19c49c38c 0x1834ac6a8 0x18322b7f4 0x1008d906c 0x1008bb918 0x1008b4fe8 0x1008daf14 0x1008daa64 0x1008c85b4 0x1025e071c 0x1025f01b8 0x100623454 0x100623320 0x10061ffb8 0x107899a24)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/usr/lib/libMTLCapture.dylib
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: sourceNode'
(lldb) 

Additional information

I saw the same error in my app the worked on a modified version tracking bevy/main until I merged the new renderer in, without using any of the new features (not using default features, so e.g. bevy_render2 is not enabled.)

This issue is likely related: rust-windowing/winit#1120

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-iOSSpecific to the iOS mobile operating systemP-CrashA sudden unexpected crashP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions