Align menu animation to JPCSP (linear tween); capture crashes to log

JPCSP's AbstractAnimAction interpolates linearly and ignores accelMode, so
match that instead of adding easing. Log any uncaught exception from all
threads (video/audio/animator/timer/FX) to /tmp/umd-crash.log to diagnose the
Scenes/Languages crash.
This commit is contained in:
2026-09-16 12:39:22 -04:00
parent ba21426b77
commit 80421d1cba
2 changed files with 11 additions and 5 deletions
@@ -49,10 +49,7 @@ public final class Tween {
}
private static float ease(float p, int accelMode) {
return switch (accelMode) {
case EASE_IN -> p * p;
case EASE_OUT -> 1f - (1f - p) * (1f - p);
default -> p;
};
// JPCSP interpolates linearly and ignores accelMode (see AbstractAnimAction).
return p;
}
}
@@ -492,6 +492,15 @@ public final class PlayerApp extends Application {
}
public static void main(String[] args) {
// Capture any uncaught exception (video/audio/animator/timer/FX threads) to a file.
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> {
try (java.io.PrintWriter writer = new java.io.PrintWriter(new java.io.FileWriter("/tmp/umd-crash.log", true))) {
writer.println("=== Uncaught in thread " + thread.getName() + " ===");
throwable.printStackTrace(writer);
} catch (Exception ignored) {
}
throwable.printStackTrace();
});
launch(args);
}
}