[GH-ISSUE #1195] [BUG] Crash on foregrounding (applicationDidBecomeActive): index 0 beyond bounds for empty array during UIWindow retrieval #1051

Open
opened 2026-03-03 15:38:16 +03:00 by kerem · 2 comments
Owner

Originally created by @gdzhujun on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/1195

Describe the bug

When multitasking or switching back to a specific enterprise App (H5 Container) from the background, the app crashes immediately. The crash is caused by the app attempting to remove a privacy/security screen (used to hide content in the App Switcher) upon returning to the foreground, but it encounters an empty array when trying to access the app's window.

Instructions to reproduce

1、Install and launch the specific enterprise app via LiveContainer.

2、The app successfully launches and works perfectly in the foreground.

3、Swipe up to go to the iOS Home Screen or enter the App Switcher (sending the app to the background).

4、Tap the app again to bring it back to the foreground.

5、The app crashes immediately.

What version of LiveContainer and iOS are you using?

iOS26.2.1 LiveContainer3.7.2

Verify steps

  • I downloaded LiveContainer from releases / actions section or LiveContainer's AltStore source.
  • I have the latest LiveContainer.
  • I installed LiveContainer through AltStore/SideStore/Impactor/iloader/TrollStore or I'm confident that I signed LiveContainer correctly with all required entitlements.

Crash Log

*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array

Call stack: (
0 CoreFoundation 0x0000000199310970 BD79FBF5-83C8-35F5-A0D5-4CA56E602111 + 809328
1 libobjc.A.dylib 0x0000000196225814 objc_exception_throw + 88
2 CoreFoundation 0x00000001993251ec BD79FBF5-83C8-35F5-A0D5-4CA56E602111 + 893420
3 CTPH5Container 0x0000000105aab98c ssGetWindow + 140
4 CTPH5Container 0x0000000105aaba00 +[MDPSecurityScreen removeSafeyScreen] + 52
5 CTPH5Container 0x0000000105844bf4 -[AppDelegate applicationDidBecomeActive:] + 68
6 UIKitCore 0x000000019ffc2c4c 2708BB8A-4E1B-36C1-8385-DDFC612CDDA5 + 21093452
...
11 CTPH5Container 0x0000000105844074 main + 116
12 0x100e7c000.dylib 0x0000000100e8a050 LiveContainerMain + 8420
)

Other info

No response

Originally created by @gdzhujun on GitHub (Mar 1, 2026). Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/1195 ### Describe the bug When multitasking or switching back to a specific enterprise App (H5 Container) from the background, the app crashes immediately. The crash is caused by the app attempting to remove a privacy/security screen (used to hide content in the App Switcher) upon returning to the foreground, but it encounters an empty array when trying to access the app's window. ### Instructions to reproduce 1、Install and launch the specific enterprise app via LiveContainer. 2、The app successfully launches and works perfectly in the foreground. 3、Swipe up to go to the iOS Home Screen or enter the App Switcher (sending the app to the background). 4、Tap the app again to bring it back to the foreground. 5、The app crashes immediately. ### What version of LiveContainer and iOS are you using? iOS26.2.1 LiveContainer3.7.2 ### Verify steps - [x] I downloaded LiveContainer from releases / actions section or LiveContainer's AltStore source. - [x] I have the latest LiveContainer. - [x] I installed LiveContainer through AltStore/SideStore/Impactor/iloader/TrollStore or I'm confident that I signed LiveContainer correctly with all required entitlements. ### Crash Log *** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array Call stack: ( 0 CoreFoundation 0x0000000199310970 BD79FBF5-83C8-35F5-A0D5-4CA56E602111 + 809328 1 libobjc.A.dylib 0x0000000196225814 objc_exception_throw + 88 2 CoreFoundation 0x00000001993251ec BD79FBF5-83C8-35F5-A0D5-4CA56E602111 + 893420 3 CTPH5Container 0x0000000105aab98c ssGetWindow + 140 4 CTPH5Container 0x0000000105aaba00 +[MDPSecurityScreen removeSafeyScreen] + 52 5 CTPH5Container 0x0000000105844bf4 -[AppDelegate applicationDidBecomeActive:] + 68 6 UIKitCore 0x000000019ffc2c4c 2708BB8A-4E1B-36C1-8385-DDFC612CDDA5 + 21093452 ... 11 CTPH5Container 0x0000000105844074 main + 116 12 0x100e7c000.dylib 0x0000000100e8a050 LiveContainerMain + 8420 ) ### Other info _No response_
Author
Owner

@hugeBlack commented on GitHub (Mar 1, 2026):

We can't help you without exactly knowing what app is having this issue.

It seems you've already done some investigation. If you can't share the app, can you share a minimal code that can reproduce this issue?

<!-- gh-comment-id:3979840371 --> @hugeBlack commented on GitHub (Mar 1, 2026): We can't help you without exactly knowing what app is having this issue. It seems you've already done some investigation. If you can't share the app, can you share a minimal code that can reproduce this issue?
Author
Owner

@hugeBlack commented on GitHub (Mar 2, 2026):

Thanks, we'll investigate this issue soon.

<!-- gh-comment-id:3982307427 --> @hugeBlack commented on GitHub (Mar 2, 2026): Thanks, we'll investigate this issue soon.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LiveContainer#1051
No description provided.