I’ve had this problem hit me 3 or 4 times now over the past couple of months. Using Astropad Studio, kept up to date from App Store, iPad 12.9 first generation, Apple Pencil. MacBook Pro late 2013, macos Sierra 10.12.6. I seems to hit when I have Adobe Dreamweaver CC running, although it may or not hit when I am using that program. I should also mention I run macos with scroll bars visible to scroll with a stylus (Wacom or Astropad&Pencil).
What happens sometimes (not all the time) when I’m scrolling using scrollbars with the Pencil, Astropad Studio seems to hang. I get the stylus trace marker. If I check my MacBook, it’s at a login screen. Somehow I have been logged out of the computer. I log back in at it tries to recover me where I was, sometimes succesfully, sometimes not (i.e. beachball, hard reset required). Even if it’s successful it takes a while to get back and of course there is a risk that some work has been lost.
Anyone else have this happen?