mbrlabs / Lorien

Infinite canvas drawing/whiteboarding app for Windows, Linux and macOS. Made with Godot.
MIT License
5.55k stars 241 forks source link

Segmentation fault when switching modes mid-stroke #153

Closed sigaloid closed 2 years ago

sigaloid commented 2 years ago

Lorien version: 0.5.0

OS/device including version: Fedora 35

Issue description: Drawing on my tablet (using OpenTabletDriver), and it crashed.

Steps to reproduce:

  1. Be using tablet with OpenTabletDriver
  2. Press eraser hotkey mid-pen-stroke
  3. Release pen
  4. Re-touch pen to tablet, and SIGSEGV occurs

https://user-images.githubusercontent.com/69441971/173972831-3d5941f9-2a77-490c-a230-ecc0dccb0b2f.mp4

hansemro commented 2 years ago

Looks like this occured because end_stroke() did not get invoked in BrushTool.gd:_input before switching tools. Issue also does not require tablet to replicate.

hansemro commented 2 years ago

Same issue occurs for rectangle, circle, and line tools.

hansemro commented 2 years ago

@sigaloid Please download a build artifact from https://github.com/mbrlabs/Lorien/actions/runs/2507239607 and let me know how it works on your end.

sigaloid commented 2 years ago

Works on my end, thanks for the quick fix! :smile: