Code Monkey home page Code Monkey logo

Comments (7)

bhimsenp avatar bhimsenp commented on July 30, 2024 2

@nicklockwood .. Seems following line is causing the issue (Expression.swift: line 354)

if let fn = pureSymbols($0) ?? Expression.mathSymbols[$0] ?? Expression.boolSymbols[$0] {
    return fn
}

Haven't figured out the exact cause yet, but looks like there is an issue where there is cascaded nil-coalescing operation.
In one of the failing test, the fn evaluates to non-nil even when all 3 expressions are nil. Consequently, when it tries to execute line 892 (where crash is happening), it tries to execute the nil function and that's why the EXEC_BAD_ACCESS.

Adding brackets to first two correctly evaluated fn to be nil solves the crash.

if let fn = (pureSymbols($0) ?? Expression.mathSymbols[$0]) ?? Expression.boolSymbols[$0] {
    return fn
}

You can add this workaround temporarily.

from expression.

nicklockwood avatar nicklockwood commented on July 30, 2024 1

Looks like a Swift 5.6 regression. I'll investigate.

from expression.

nicklockwood avatar nicklockwood commented on July 30, 2024 1

@nighthawk fixed in 0.13.6

from expression.

nighthawk avatar nighthawk commented on July 30, 2024

Screenshot of the crash in Xcode, in case it helps.

Screen Shot 2022-03-24 at 14 31 31

from expression.

nicklockwood avatar nicklockwood commented on July 30, 2024

@nighthawk is the crash affecting your project, or just the test failure? If it's only the latter I can just disable the test for now.

from expression.

nighthawk avatar nighthawk commented on July 30, 2024

As far as I can tell, it doesn't seem to be impacting my project; just running the tests crashed.

I commented out these tests temporarily:

  • testTooFewArgumentsWithAdvancedInitializer
  • testTooFewArgumentsForCustomFunctionWithAdvancedInitializer
  • testTooManyArgumentsWithAdvancedInitializer
  • testUnknownSymbolWithAdvancedInitializer

from expression.

nicklockwood avatar nicklockwood commented on July 30, 2024

@bhimsenp thanks, that solved it!

from expression.

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.