Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
See original GitHub issueDescribe the bug Thread 1: EXC_BAD_ACCESS (code=1, address=0x10) That occurs at some point during subscription receiving data.
Device.swift
private func resolve(_ key: String, _ value: String) {
let callback = self.callbackMap[key] // Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
...
To Reproduce
- Subscribe to 4 characteristics.
- 1 Characteristic is receiving data (< 200bytes) every 100ms.
- 1 Characteristic is receiving data (< 200bytes) every 1000ms.
- 2 other characteristics aren’t receiving any data.
Expected behavior
Expect the App not to crash when it appears to hit a null pointer in resolve()
.
Screenshots If applicable, add screenshots to help explain your problem.
Plugin version:
Desktop (please complete the following information):
- N/A
Smartphone (please complete the following information):
- Device: iPad Pro
- OS: iOS 15.1
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Error message help...Thread 1: EXC… - Apple Developer
Now it works on the simulator, but when I send it to my device to try and run it I get this error...
Read more >EXC_BAD_ACCESS (Code = 1, address = 0x30000008 ...
In short, this type of problem occurs when you release the memory assigned to an object that has been already released.
Read more >Why does my Xcode have this error, 'Thread 1 - Quora
This means that your program's thread 1 attempted a bad memory access. You attempted to access memory location 0x4 (which is also 4...
Read more >EXC_BAD_ACCESS (code = 1, address = 0x0) - YouTube
iOS : Swift project crashing with Thread 1 : EXC_BAD_ACCESS ( code = 1, address = 0x0) [ Beautify Your Computer ...
Read more >Flutter iOS - Thread 1: EXC_BAD_ACCESS (code=1, address ...
After upgrading from Flutter 1.12.13+hotfix.5 to 1.20.4, the iOS application crashes on initialization: Thread 1: EXC_BAD_ACCESS (code=1, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for looking into this and reporting back.
I agree that with some pub/sub models, you can resubscribe without side-effects. However I see
startNotifications
more like something similar to WebSockets, where you would also only open one socket per app and then share that data. RewritingstartNotifcations
to allow resubscribing without side-effects would be quite some effort, so not sure if it’s worth it.I added a note to the documentation. With this I would consider this issue closed for now. Let me know if you don’t agree.
Yes, my code was running the start notification repeatedly.