This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | JavaFX application still running after terminate | ||
---|---|---|---|
Product: | javafx | Reporter: | aplatypus <aplatypus> |
Component: | Project | Assignee: | Roman Svitanic <rsvitanic> |
Status: | REOPENED --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Small clock program - does NOT terminate when run from NetBeans |
Description
aplatypus
2014-06-27 10:41:29 UTC
I can't reproduce the issue, please make sure that you are calling Platform.exit() when you are terminating your Java FX application. If you would be still able to reproduce the problem, please attach some small sample project where it can be reproduced and reopen this issue. Thanks. Created attachment 147815 [details]
Small clock program - does NOT terminate when run from NetBeans
I have attached a example for the problem. The MainApp calls Platform.exit() in the Stop() method. I've tracked that in the debugger.
There are two issues to resolve:
1. There must be a way for shutting down the MainApp (Application) class. Without hangovers.
2. Netbeans should stop any errant program still running after it has been told is exited. It is not detecting or letting the program continue.
Comments welcome, but that's the whole program. Window 64 bit with jre 8 u5. I've seen problems with 64-bit that don't show in 32-bit before.
Thanks ... Will
Hi -- I have found some measure or resolution. My code needed to call the * ScheduledExecutorService.shutdown() Method for active schedulers (see example below). However, I think Netbeans can identify that a program is in "over-run" time after it exist. I think it should at least report that as an error so programmers are at least alerted to the situation. ---------------- public class MainApp extends Application { @Override public void start(Stage stage) throws Exception { ..... } /** * Close down the application * @see * -- http://docs.oracle.com/javafx/2/api/javafx/application/Application.html#stop%28%29 **/ @Override public void stop() { Platform.exit(); for( ScheduledExecutorService sched : activeExecutorServices ) { sched.shutdown(); } } I have tried to run the attached sample application. Running from the command line outside the NetBeans followed by the exiting the application also does not terminate the application. Therefore it is definitely not a problem of the IDE. Thanks for the understanding. I've found this to be a problem too. I have called Platform.exit(); on stop. |