wvteijlingen / Spine

A Swift library for working with JSON:API APIs. It supports mapping to custom model classes, fetching, advanced querying, linking and persisting.
MIT License
266 stars 109 forks source link

EXC_BAD_ACCESS (code=1, address=0x18) in operationQueue #68

Closed kurko closed 8 years ago

kurko commented 8 years ago

Since I upgraded to the latest master (the big rewrite), I'm getting the following error in Spine.swift:

EXC_BAD_ACCESS (code=1, address=0x18) in operationQueue

When

I don't reset Spine between tests, but it seems that something inside Spine one operation is leaking into another. I really don't know how to debug this...

The error

spine-error

Can you suggest some things I could do to debug this?

wvteijlingen commented 8 years ago

Ouch, this sounds as a hard to debug bug. Smells like something might be going wrong with multithreading maybe? I don't know how your tests are set up, but usually each test starts with a blank slate because of setup/teardown.

Since it only happens when running multiple tests after each other, perhaps as a start you could narrow down the combination of tests in where this happens.

kurko commented 8 years ago

Yeah. I spent a good amount of time trying to do that yesterday. Will continue today.

kurko commented 8 years ago

For the record: I got also another error which I think is unrelated to Spine itself, reason why I didn't post here. It's weird that NSURLSessionConfiguration.defaultSessionConfiguration() would blow like this.

I will leave here for the record in case other people see this problem so they can Google:

screen shot 2016-02-17 at 7 24 35 pm

Basically NSURLSession(configuration: configuration) gives me a EXC_BAD_ACCESS(code=EXC_I386_GPFLT). It's also random.

wvteijlingen commented 8 years ago

I'm closing this as stale. Feel free to reopen if you run into it again :).