04-15-2020, 01:06 PM
(This post was last modified: 04-15-2020, 01:09 PM by Sebastian Staacks.)
Wow, thanks a lot for all the information. I have not yet had the chance to try the ESP32 myself, but from checking the bugreport this seems to be a very weird one. The crash occurs in a line that creates the tic labels (i.e. "-2.0", "-1.0", "0.0", "1.0") and measures their height to determine the required margin for the graph. The strange part is that the crash does not originate from our code but it is an ArrayIndexOutOfBoundsException triggered within the system function that formats the value into the text.
After a quick research, I suspect that this is an older Java bug (https://bugs.java.com/bugdatabase/view_b...id=7088271) that triggers the exception when we try to format the value "zero" with one or zero significant digits. This would explain why it is so specific to your phone (it just uses the specific Java Runtime Engine that has this bug, while the other phones use newer / different versions), it explains why the crash occurs on specific graphs (the value elements use a different formatter not affected by the bug) and it explains why I have not heard of this problem before (as far as I know, none of the default phyphox experiments uses xPrecision or yPrecision set to 0 or 1).
The only thing that does not entirely make sense to me is why "ESP32_07_einfach08.phyphox" works for you. I can only imagine that you do not get any data that triggers a tic at zero on the y axis...?
So, if my assumption is correct, there is no point for me in trying to reproduce this. It would indeed be extremely specific to your device and the exact system version of your phone. The simplest why to verify this, is to modify the not working experiments and to set "xPrecision" and "yPrecision" for all the graphs to 2 or higher.
If it does not crash in that case, I will try to catch the problem in the next version of phyphox and use a work-around for this case. It may be very specific to this device, but a simple catch and fallback is simple to implement and the Samsung S6 is a rather common device and there might be other devices with the Java version out there.
After a quick research, I suspect that this is an older Java bug (https://bugs.java.com/bugdatabase/view_b...id=7088271) that triggers the exception when we try to format the value "zero" with one or zero significant digits. This would explain why it is so specific to your phone (it just uses the specific Java Runtime Engine that has this bug, while the other phones use newer / different versions), it explains why the crash occurs on specific graphs (the value elements use a different formatter not affected by the bug) and it explains why I have not heard of this problem before (as far as I know, none of the default phyphox experiments uses xPrecision or yPrecision set to 0 or 1).
The only thing that does not entirely make sense to me is why "ESP32_07_einfach08.phyphox" works for you. I can only imagine that you do not get any data that triggers a tic at zero on the y axis...?
So, if my assumption is correct, there is no point for me in trying to reproduce this. It would indeed be extremely specific to your device and the exact system version of your phone. The simplest why to verify this, is to modify the not working experiments and to set "xPrecision" and "yPrecision" for all the graphs to 2 or higher.
If it does not crash in that case, I will try to catch the problem in the next version of phyphox and use a work-around for this case. It may be very specific to this device, but a simple catch and fallback is simple to implement and the Samsung S6 is a rather common device and there might be other devices with the Java version out there.