01-01-2011, 05:33 AM
In the jpcsp.HLE.modules150.sceUtility class, add a 1ms delay inside the while loop at line 788 as follows:
// Wait for user selection.
while (!saveListSelected) {
if (!mainDisplay.isVisible()) {
break;
}
try {
Thread.sleep(1);
} catch (InterruptedException ex) {}
}
For some reason, this delay is needed when using the 64-bit JRE. It is also needed for the 32-bit JRE in server mode using the -server switch. It's strange that the 32-bit JRE in client mode runs perfectly fine without the delay though. I guess when using the 32-bit Java Hotspot Server VM or the 64-bit Java VM, the while loop goes too fast that the JVM somehow misses the break check. Obviously this is not a bug in the Jpcsp code but a strange quirk in the JVM. The added 1ms delay inside the while loop eliminates the problem.
// Wait for user selection.
while (!saveListSelected) {
if (!mainDisplay.isVisible()) {
break;
}
try {
Thread.sleep(1);
} catch (InterruptedException ex) {}
}
For some reason, this delay is needed when using the 64-bit JRE. It is also needed for the 32-bit JRE in server mode using the -server switch. It's strange that the 32-bit JRE in client mode runs perfectly fine without the delay though. I guess when using the 32-bit Java Hotspot Server VM or the 64-bit Java VM, the while loop goes too fast that the JVM somehow misses the break check. Obviously this is not a bug in the Jpcsp code but a strange quirk in the JVM. The added 1ms delay inside the while loop eliminates the problem.