Hello,
I got a reminder of this issue today with a degrees symbol ° in my code!
These actions on the the variable test will hang Processing 4.4.4 and I must end task with Task Manager in Windows 10:
- Show Usage…
- Jump to decoration
- Rename
This simple code will hang Processing 4.4.4
int test;
String s = "Yaw (Y axis): 0°";
This is what is in my Processing temp folder after running (and hanging):
// Code removed from start
int test;
String s = "Yaw (Y axis): 0\u00b0";
//Code removed from end
This is safe to use the actions on:
int test;
String s = "Yaw (Y axis): 0\u00b0";
Including to be thorough:
Adding this to my Notes:
- Do not use any special characters!
- Substitute them with the
\u
character sequence (Unicode escape sequence).
Other issues < This need further exploration!
It also seems to freeze with the Lamba style in this code example and using actions:
import processing.javafx.*;
import javafx.application.Platform;
void setup() {
size(600, 600, P3D); // Set 3D canvas size
noLoop();
}
// Secondary PApplet used to bootstrap the JavaFX UI
public class FXBoot extends PApplet {
public void setup() {
size(200, 200, FX2D); // Minimal invisible canvas
Platform.runLater(() -> launchUI()); // Lambda style — active
}
// Creates the JavaFX slider UI
void launchUI() {
}
}
Not the best example because it requires the JavaFX JAR files and is shared as example only to show what is failing.
This was part of much larger code and I reduced it down to this.
I will try to find a better example!
Deleting the line allows me to use actions without freezing:
Platform.runLater(() -> launchUI()); // Lambda style — active
This works so it is not just the Lamba style:
import javax.swing.SwingUtilities;
void setup() {
SwingUtilities.invokeLater(() -> launchUI()); // <- Test rename/jump on launchUI
}
void launchUI() {
println("launchUI called");
}
:)