richardwilkes / gcs

GURPS Character Sheet
http://gurpscharactersheet.com
Mozilla Public License 2.0
217 stars 60 forks source link

Web: importing a portrait image from an Android device crashes GCS #841

Closed saint-thomas-more closed 2 months ago

saint-thomas-more commented 2 months ago

OS: Linux Mint 21.3 Version: 5.22

The crash also erases any settings changed in the current session.

Logs
INF | 2024-06-02 | 18:56:19.050 | listening | protocol="http" addresses=[localhost] port=8422
INF | 2024-06-02 | 18:56:24.185 | web | method="GET" url=/api/sheets status=401 bytes=13 elapsed="0.130ms"
INF | 2024-06-02 | 18:56:26.833 | web | method="GET" url=/ status=304 bytes=0 elapsed="0.043ms"
INF | 2024-06-02 | 18:56:26.919 | web | method="GET" url=/assets/index-C8mp4pw5.js status=304 bytes=0 elapsed="0.048ms"
INF | 2024-06-02 | 18:56:26.933 | web | method="GET" url=/assets/index-BRcuIWWB.css status=304 bytes=0 elapsed="0.071ms"
INF | 2024-06-02 | 18:56:27.003 | web | method="GET" url=/api/session status=401 bytes=13 elapsed="0.049ms"
INF | 2024-06-02 | 18:56:27.006 | web | method="GET" url=/api/version status=200 bytes=205 elapsed="0.145ms"
INF | 2024-06-02 | 18:56:27.021 | web | method="GET" url=/api/sheets status=401 bytes=13 elapsed="0.049ms"
INF | 2024-06-02 | 18:56:27.133 | web | method="GET" url=/favicon.webp status=304 bytes=0 elapsed="0.043ms"
INF | 2024-06-02 | 18:56:27.133 | web | method="GET" url=/app.webp status=304 bytes=0 elapsed="0.043ms"
INF | 2024-06-02 | 18:56:27.147 | web | method="GET" url=/favicon.webp status=304 bytes=0 elapsed="0.045ms"
INF | 2024-06-02 | 18:56:29.085 | web | method="POST" url=/api/login status=200 bytes=0 elapsed="0.190ms"
INF | 2024-06-02 | 18:56:29.140 | web | method="GET" url=/api/sheets session=0557507a-d294-4594-afc1-36aba27749ba user="k" status=200 bytes=66 elapsed="0.571ms"
INF | 2024-06-02 | 18:56:33.190 | web | method="GET" url=/api/sheet/user/Testing.gcs session=0557507a-d294-4594-afc1-36aba27749ba user="k" status=200 bytes=3260 elapsed="8.614ms"
richardwilkes commented 2 months ago

The log doesn't have anything in it about a crash. What specifically did you do? Please supply the image you were trying to import so that I can take a look -- I suspect it is non-standard in some way, which is causing a problem with decoding it.

saint-thomas-more commented 2 months ago

Maybe this will be more useful. At least, it states a segmentation violation. gcs.error.log

saint-thomas-more commented 2 months ago

The images and the process are certainly usual. I've tested several of them.

https://github.com/richardwilkes/gcs/assets/126619536/7c912c54-f9f3-490f-9e22-af9d150758cc

IMG_20240529_232029_884

IMG-2ee0f705fe89df51ef961acd6dd62c8f-V

richardwilkes commented 2 months ago

Thanks for the error log with the stack traces. That pinpoints it to the jpeg decoder inside Skia (the underlying graphics library I use) crashing. What's odd is that loading it from GCS itself doesn't fail. But trying to do so via the browser does. At least it is reproducible. Not sure if I'll be able to fix it, though, as I don't have any control over that library, nor is there a safe way for my code to catch crashes inside it.