Unity app Crashing when reopening from Background after idling for ~10+ minutes
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp, ios, unity
- Domain
- game-dev, mobile-dev, networking
Research direction
Reproduce the issue with the described empty Unity project on iOS 13+ by connecting to the server, backgrounding the app for about 10 minutes, and reopening it. Start with Websocket.cs Connect(), especially the await Receive() call, and inspect the interval between applicationWillEnterForeground and applicationDidBecomeActive in Xcode; done means the intermittent crash is understood and no longer occurs.
Written by the indexing model from the issue text.
Description
This crash seems like it only occurs in iOS 13+ and is intermittent. I get it occur about 20% of the time. The error in xCode reads something like IL2CPP Threadpool worker (44): EXC_BAD_ACCESS (code=1, address=0x18). The address part slightly changes sometimes, but the rest is the same.
I created an empty project where I just connect to our server and then minimize the app by tapping the power button on the iPad. After waiting ~10 minutes or so reopen the app. About 20% of the time, the app will crash. Xcode doesn't seem to be logging anything from Unity. I just get the error After applicationwillenterforeground and before applicationdidbecomeactive. I've tried debugging this for a while now, with little luck because of the lack of logging. I did notice during debugging when I commented out the await Receive() call in Websocket.cs Connect() it stopped crashing, but of course I can't receive messages at that point.
Has anyone else had a similar issue? Anyone have any ideas?
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from endel/NativeWebSocket
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
endel/NativeWebSocket#107 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
endel/NativeWebSocket#102 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
endel/NativeWebSocket#101 · 6 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
endel/NativeWebSocket#95 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
endel/NativeWebSocket#94 · 2 comments ·
All issues in endel/NativeWebSocket
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·