Coder Social home page Coder Social logo

SIGSEGV on state.didSet about reswift HOT 4 CLOSED

mhamann avatar mhamann commented on May 23, 2024
SIGSEGV on state.didSet

from reswift.

Comments (4)

DivineDominion avatar DivineDominion commented on May 23, 2024 1

@mhamann Great, then I'll close this issue!

For some async tasks, try out https://github.com/ReSwift/ReSwift-Thunk/ to dispatch an action that can perform something complex, access the state in the process, and dispatch actions to indicate progress. Like the HTTP request/pending/result triad.

from reswift.

DivineDominion avatar DivineDominion commented on May 23, 2024

Is there some other error code for a sub-category?

https://developer.apple.com/documentation/xcode/investigating-memory-access-crashes

Never had an iOS app crash tbh :)

Since you speak of race conditions: I do wonder if you do something odd around the use of createThunkMiddleware. I'd try to symbolicate the crash log first and inspect the call stack further.

from reswift.

DivineDominion avatar DivineDominion commented on May 23, 2024

@mhamann Did you figure out a cause for this?

from reswift.

mhamann avatar mhamann commented on May 23, 2024

Thanks for checking in @DivineDominion. I must've missed your original reply. We did solve this. We were using Combine within an Actor, and that seems to have been the trigger for this issue. Somehow, the Actor's subscription to the store was causing memory to be accessed in an unsafe way, and thus the sigsev crash.

My iOS dev knowledge isn't deep enough to know whether or not there is a good way to solve this, but we ended up moving the code from our Combine logic into ReSwift middleware. It ends up making the dispatch flow async, which is somewhat annoying, so other approaches might be better.

from reswift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.