Yes, from a few days old CVS. I'll update to latest and try again, and also check if the lockups are dependent on setCursorVisible or not.
Edit: I've updated to latest CVS and it still happens. I've had it lock up once without calling setCursorVisible but that took a lot more tries so I think setCursorVisible makes a difference. While calling setCursorVisible I've even had the test lock up on me 3 times in a row…
Ok, I've found out what causes my problems. It seems the constructor for the "Singleton" GameTaskQueueManager is actually run twice in some rare cases, which causes the problems I'm seeing.
Perhaps a lock or something could be added after "if (MANAGER_INSTANCE == null)" to make it double-check before calling the constructor? That shouldn't affect performance in any way? I'd love to fix up a smallish patch but I'm tiered and I really have to get to bed now. I'll make a suggested fix tomorrow though, unless someone else beats me to it.
It did solve my problems, thanks for the quick fix!
But from a pure performance point of view, why not use something like this? Isn't there a very slight performance impact from making the whole getManager() synchronized?
public static GameTaskQueueManager getManager() {
if (MANAGER_INSTANCE == null)
synchronized (GameTaskQueueManager.class) {
if (MANAGER_INSTANCE == null)
MANAGER_INSTANCE = new GameTaskQueueManager();
}
return MANAGER_INSTANCE;
}
You're right on both points. I just saw GameTaskQueueManager in the subject and assumed it was being used for the cursor status. Yes, it should be in the OpenGL thread to reliably work.
Is anyone else still experience lock-ups in-game related to GameTaskQueue?