[Bug]: Android app crashes opening a chat with SVG auto-start-reverse markers#32789
My Android app keeps crashing when I open one particular chat. I asked an agent to investigate using ADB, and it found the exception below in the phone's crash log. The same exception appears across repeated attempts to open the chat.
The chat contains an inline SVG drawing. Its dimension arrows use a marker with orient="auto-start-reverse". The Android SVG renderer tries to parse that value as a number and throws an uncaught NumberFormatException on the main thread, closing the whole app.
Area
apps/mobile
Steps to reproduce
- Use T3 Code Android 2.2.0 (versionCode 735).
- Have an agent save the SVG below as
marker-repro.svgin the thread's workspace. - Have the agent include it as an inline Markdown image in its reply, using the absolute workspace path:
. It needs to render as an image in the chat, not as a code block or an HTML visual reply. - Open that thread in the Android app and bring the image into view. Leave the thread and reopen it to exercise the original failure path.
| 1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 100"> |
| 2 | <defs> |
| 3 | <marker id="arrow" markerWidth="7" markerHeight="7" |
| 4 | refX="3.5" refY="3.5" orient="auto-start-reverse"> |
| 5 | <path d="M7 0L0 3.5L7 7" fill="none" stroke="#333333"/> |
| 6 | </marker> |
| 7 | </defs> |
| 8 | <path d="M30 50H210" fill="none" stroke="#333333" |
| 9 | marker-start="url(#arrow)" marker-end="url(#arrow)"/> |
| 10 | </svg> |
This is a reduced example of the marker definition and its use in the drawing that triggers my crashes. I have not tested this reduced example separately on the phone. The repeated crashes and stack trace were captured from the original chat.
Expected behavior
The image should render without closing the app. I should be able to open the chat.
Actual behavior
The entire Android app crashes while drawing the SVG. Reopening the affected chat triggers the crash again.
Impact
Blocks access to the affected chat in the Android app.
Version and environment
- T3 Code Android: 2.2.0, versionCode 735
- Android 17
- Samsung Galaxy S23 Ultra (SM-S918B)
- Package:
com.t3tools.t3code
Logs or stack traces
Relevant lines from adb logcat -b crash -d (timestamps, process IDs, and build mapping identifiers omitted):
| 1 | FATAL EXCEPTION: main |
| 2 | Process: com.t3tools.t3code |
| 3 | java.lang.NumberFormatException: For input string: "auto-start-reverse" |
| 4 | at jdk.internal.math.FloatingDecimal.check(FloatingDecimal.java:2324) |
| 5 | at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1928) |
| 6 | at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) |
| 7 | at java.lang.Double.parseDouble(Double.java:661) |
| 8 | at com.horcrux.svg.RenderableView.renderMarkers(...:519) |
| 9 | at com.horcrux.svg.RenderableView.draw(...:133) |
| 10 | at com.horcrux.svg.RenderableView.render(...:49) |
adb shell dumpsys activity exit-info com.t3tools.t3code records the corresponding exits as reason=4 (APP CRASH(EXCEPTION)), rather than a low-memory kill.