question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)

See original GitHub issue

Describe 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

  1. Subscribe to 4 characteristics.
  2. 1 Characteristic is receiving data (< 200bytes) every 100ms.
  3. 1 Characteristic is receiving data (< 200bytes) every 1000ms.
  4. 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:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pwespicommented, Jan 22, 2022

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. Rewriting startNotifcations 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.

0reactions
allidoisacecommented, Jan 17, 2022

Yes, my code was running the start notification repeatedly.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found