JPro-one / JPro

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

JPro becomes unresponsive after Closing instance (reason: no-views) message #138

Open hgasmiadlsa opened 1 year ago

hgasmiadlsa commented 1 year ago

My application containts two main pages teacher and student. After a coupe of minutes of opening my application in the browser, I get the highlighted Closing instance with the reason "no-views".

[info] c.j.i.s.ViewInfo$ - Closing view (id 569270838, name: teacher, reason: tab closed) [info] c.j.i.s.ViewInfo$ - [info] c.j.i.s.ViewInfo$ - Application closed: [info] c.j.i.s.ViewInfo$ - startTime : Tue Mar 14 18:54:13 AST 2023
[info] c.j.i.s.ViewInfo$ - averageLatency : 00:00:00.001 [info] c.j.i.s.ViewInfo$ - averageJitter : 00:00:00.000
[info] c.j.i.s.ViewInfo$ - framerateServer: 00:00:00.000 [info] c.j.i.s.ViewInfo$ - framerateClient: 00:00:00.000 [info] c.j.i.s.ViewInfo$ - raw : 40600 [info] c.j.i.s.ViewInfo$ - zipped : 5940 [info] c.j.i.s.ViewInfo$ - [info] c.j.i.c.InstanceImpl - Closing instance (id 569270838, name: teacher, reason: no-views)

The problem is that after this message I am not able to open any page. I see the request in the log but JPro just keeps spinning:

[info] c.jpro - application requested: default [info] c.jpro - Creating Application: default [info] c.jpro - remoteAddress 0:0:0:0:0:0:0:1 [info] c.jpro - host localhost:8077 [info] c.jpro - uri /app/ws/default [info] c.jpro - application requested: student [info] c.jpro - Creating Application: student [info] c.jpro - remoteAddress 0:0:0:0:0:0:0:1 [info] c.jpro - host localhost:8077 [info] c.jpro - uri /app/ws/student [info] c.jpro - application requested: student [info] c.jpro - application requested: teacher [info] c.jpro - Creating Application: teacher [info] c.jpro - remoteAddress 0:0:0:0:0:0:0:1 [info] c.jpro - host localhost:8077 [info] c.jpro - uri /app/ws/teacher [info] c.jpro - application requested: student [info] c.jpro - Creating Application: student [info] c.jpro - remoteAddress 0:0:0:0:0:0:0:1 [info] c.jpro - host localhost:8077 [info] c.jpro - uri /app/ws/student

Appreciate it if you could tell me the meaning of this message and why JPro becomes unresponsive after the message.

FlorianKirmaier commented 1 year ago

The reason "no-views". means, it's closed because no one is using/seeing it.

The messages afterwards tell you, that JPro is created new instances of this application, for student and teacher. Guess the remaining question is, why it's not working.

My first guess would be, that the FX-Thread is unavailable. You can quickly check the fx-stacktrace by opening /info/fxstack . Can you paste this output to the issue?

hgasmiadlsa commented 1 year ago

Appended /info/fxstack to the JPro server url but I got no response.

The same behavior. When I first run JPro, I get a response when I try /info/fxstack but after I get the Closing Instance message and try it again, the server doesn't respond.

hgasmiadlsa commented 1 year ago

Issue fixed. The reason for the issue was this code:

@Override 
public void stop() { // The JavaFx Application stop
   Platform.exit(); // This was causing the issue
}

So I removed the line and everything went well.