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

Bad State error while trying to reject a StreamQueueTransaction #229

Open
natebosch opened this issue Jan 25, 2023 · 0 comments
Open

Bad State error while trying to reject a StreamQueueTransaction #229

natebosch opened this issue Jan 25, 2023 · 0 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@natebosch
Copy link
Member

  Bad state: The FutureGroup is closed.
  package:async/src/future_group.dart 70:18      FutureGroup.add
  package:async/src/stream_splitter.dart 130:37  StreamSplitter._cancelSubscription
  package:async/src/stream_splitter.dart 176:7   StreamSplitter._onCancel
  package:async/src/stream_splitter.dart 80:33   StreamSplitter.split.<fn>
  dart:async                                     _BufferingStreamSubscription.cancel
  package:async/src/stream_queue.dart 492:33     StreamQueue._cancel
  package:async/src/stream_queue.dart 617:13     StreamQueueTransaction._done
  package:async/src/stream_queue.dart 609:5      StreamQueueTransaction.reject

Getting in to this state requires some particular interactions with the transaction - one set of interactions I've found that causes it:

  • Create a transaction
  • Create a new queue from the transaction
  • Create a new transaction from the new queue
  • Create a third queue from the new transaction, and consume the entire stream
  • Reject the new transaction (where we had consumed the stream)
  • Create a new queue from the original transaction. Don't consume the stream
  • Try to reject the original transaction

I'm not sure if the bug is in StreamQueue, or in StreamSplitter.

@natebosch natebosch added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jan 25, 2023
natebosch added a commit that referenced this issue Jan 25, 2023
Towards #229

Add a skipped test demonstrating the sequence of interaction with a
StreamQueueTransaction that leads to a `StateError` during the call to
`transaction.reject()`.
natebosch added a commit that referenced this issue Apr 19, 2023
Towards #229

Add a skipped test demonstrating the sequence of interaction with a
StreamQueueTransaction that leads to a `StateError` during the call to
`transaction.reject()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant