Coder Social home page Coder Social logo

Comments (3)

mkustermann avatar mkustermann commented on June 28, 2024

/cc @sigmundch for routing to ddc team

from sdk.

lrhn avatar lrhn commented on June 28, 2024

The code is calling _asyncCompleteWithErrorCallback, which (after a likely no-op check) calls _asyncCompleteError, as the stack trace shows.

The _asyncCompleteError function starts with an assert(!_isComplete);, which the code passes, so the _Future doesn't have a value/error yet.
It may be either pending complete, chained or just incomplete. It should be incomplete, but that's not what's being tested, so that is suspicious by itself.

It then calls _setPendingComplete which tries to set the future to be pending completion (not completed yet, because it's asyncComplete, but can't be completed with something else any more, just waiting impatiently to complete with the already provided error.)
That function starts with assert(_mayComplete);, which fails. That check only accepts being incomplete.

Which means the future state is either chained (has been completed with another future, waiting for that) or pending complete (has been asynchronously completed, haven't gotten around to actually do it yet), at a point where the async code tries to complete the same future again.

It's not completely impossible that this is related to a bugfix I made recently, or at least which asserts are used, because I do call _asyncCompleteError from somewhere that also doesn't check for _mayComplete. I'll give the state transitions a look-over.

(It's an error test, so most of these individual tests should not even compile. The unchecked_use_of_nullable_test_02 one should, though, it's marked as # 02: ok.)

from sdk.

nshahan avatar nshahan commented on June 28, 2024

@lrhn
From an in person discussion, DDC always runs with assertions enabled in the test application. Do any of these tests fail on any other platforms if you run them with assertions enabled? That could help us track down if the failures are related to your change.

from sdk.

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.