Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS #107

Closed
ds8k opened this issue Apr 14, 2020 · 2 comments
Closed

EXC_BAD_ACCESS #107

ds8k opened this issue Apr 14, 2020 · 2 comments

Comments

@ds8k
Copy link

ds8k commented Apr 14, 2020

I'm using react-native-track-player, which uses this library for iOS audio playback. I've run into an issue that I can't seem to find the root cause of - my app is crashing when trying to add tracks to it suddenly. When it crashes, I get this error:

Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

The code it's telling me that caused the crash is in NowPlayingInfoCenter.swift:

    public func set(keyValue: NowPlayingInfoKeyValue) {
        _info[keyValue.getKey()] = keyValue.getValue()
        self._infoCenter.nowPlayingInfo = _info
    }

Looking through the trace on the right of Xcode, it looks like the call to update the now playing duration is what's causing this? Would it be possible to guard these functions from setting invalid values?

    public func set(keyValue: NowPlayingInfoKeyValue) {
        let key = try? keyValue.getKey()
        let value = try? keyValue.getValue()
        
        if (key != nil && value != nil) {
            _info[keyValue.getKey()] = keyValue.getValue()
            self._infoCenter.nowPlayingInfo = _info
        }
    }
@ds8k ds8k closed this as completed Apr 14, 2020
@JhonnyTawk
Copy link

I am having this issue also

@Igorsnaki
Copy link

Igorsnaki commented Apr 24, 2020

also facing the same issue.

@ds8k hi. did you managed to fix it?
@jorgenhenrichsen Any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants