Skip to content

Errors in event handlers cause server to crash #401

Closed
@rmorshea

Description

@rmorshea

The flow:

  1. Event handler onClick called
  2. Event handler dumps an event (dict) into an anyio memory_stream's send_stream
  3. Event handler done
  4. Separate anyio-spawned thread picks up the event (inside an async for)
  5. Event is executed, exception hit
  6. Stack trace posted above happens

The rest of the application (the event queue) is responsive when this happens and I'm able to dispatch/process events via non-idom means.

My fix was to add a try/catch around step 5. The problem is resolved but the stack trace was getting swallowed somehow from the exception in event execution so it took a while to realize it was my code at fault.

Hopefully that all makes sense.

Originally posted by @brentbaum in #392 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions