# Video Crashes with JNA: could not detach thread

**URL:** <https://discourse.processing.org/t/video-crashes-with-jna-could-not-detach-thread/14889>\
**Category:** Libraries\
**Created:** [October 23, 2019, 5:58am UTC](https://discourse.processing.org/t/video-crashes-with-jna-could-not-detach-thread/14889 "2019-10-23T05:58:05Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [October 20, 2022, 5:31pm UTC](https://discourse.processing.org/t/video-crashes-with-jna-could-not-detach-thread/14889/6 "2022-10-20T17:31:59Z")

</div>

> [@Gus\_Fermin](#):
>
> I have found your solution here, and had also found this solution by @GoToLoop  
> [https://forum.processing.org/two/discussion/14990/movie-begin-and-end-events.html#Item\_1](https://forum.processing.org/two/discussion/14990/movie-begin-and-end-events.html#Item_1)

I’ve remade that old sketch as a new subclass so it works to the current video library:

> [@Hacked Movie EoS Event Library](https://discourse.processing.org/t/hacked-movie-eos-event-library/39375):
>
> Processing’s [Video library](https://processing.org/reference/libraries/video/index.html) doesn’t offer any means to flag a Movie stream has ended. A long time ago I’ve posted a hack solution that used to work back then: [Movie begin and end events - Processing 2.x and 3.x Forum](http://Forum.Processing.org/two/discussion/14990/movie-begin-and-end-events#Item_1) But more recent changes to the library made that hackish workaround to stop working. This time around I’ve decided to create a HackedMovie subclass which extends the [Movie class](https://GitHub.com/processing/processing-video/blob/latest-processing3/src/processing/video/Movie.java): [Hacked Movie EoS Event · GitHub](http://Gist.GitHub.com/GoToLoop/67023ba3e9ba1d0301c40f7c030d176a) It features a new boolean field ended which is set to true when a…

---

_[View the full topic](https://discourse.processing.org/t/video-crashes-with-jna-could-not-detach-thread/14889)._
