You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Desktop main process SIGTRAPs when dragging a file with non-ASCII characters and a space in its name into the composer (Linux/Wayland) #13746
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
On Linux (KDE Plasma, Wayland), open T3 Code Nightly and any thread.
Create two files: plain.pdf (any PDF, ASCII name) and ação b.txt (a few bytes, non-ASCII characters and a space in the name).
Drag plain.pdf from the file manager (Dolphin) into the composer. It is attached normally.
Drag ação b.txt from the file manager into the composer.
Expected behavior
The file is attached like any other file.
Actual behavior
The desktop main process dies with SIGTRAP a few seconds after the drop (systemd-coredump: Signal: 5 (TRAP) si_code: SI_KERNEL). The window disappears and any thread in progress loses its session.
The trigger is the file name, not the type or size: a 1.7 MB PDF named Oportunidades … para comércio exterior no Brasil.pdf crashes the app, while a byte-identical copy renamed to pdfsemacento.pdf attaches fine. Renaming files to ASCII names without spaces avoids the crash. I have not isolated whether the accent or the space alone is enough.
Reproduced 5 times in one evening across three nightly builds (20260924.2200, 20260925.2269, 20260926.2282).
Impact
Major degradation or frequent failure
Version or commit
0.0.43-nightly.20260926.2282 (also 0.0.43-nightly.20260925.2269 and 0.0.43-nightly.20260924.2200)
Environment
Arch Linux, kernel 7.2.4, KDE Plasma (KWin 6.7.5) on Wayland (--ozone-platform=wayland), Electron 44.4.2 / Chrome 152.0.7977.130, LANG=en_US.UTF-8
Logs or stack traces
# journalctl --user: the last line from the main process before each crash is a MIME lookup
00:55:06 t3code-fleet-desktop[703420]: ERROR:base/nix/mime_util_xdg.cc:139] Invalid mime.cache file does not contain null prior to ALIAS_LIST_OFFSET=44 # plain PDF, attached fine
00:55:35 systemd-coredump: Process 703420 (t3code) of user 1000 dumped core. # after dropping "ação b.txt"
00:55:35 systemd[755]: app-t3\x2dcode\x2dnightly@….service: Main process exited, code=dumped, status=5/TRAP
# coredumpctl list t3code
2026-09-25 22:58:55 SIGTRAP releases/0.0.43-nightly.20260924.2200/t3code
2026-09-25 22:59:19 SIGTRAP releases/0.0.43-nightly.20260925.2269/t3code
2026-09-25 22:59:43 SIGTRAP releases/0.0.43-nightly.20260925.2269/t3code
2026-09-26 00:51:49 SIGTRAP releases/0.0.43-nightly.20260926.2282/t3code
2026-09-26 00:55:35 SIGTRAP releases/0.0.43-nightly.20260926.2282/t3code
The mime.cache warning also appears for files that attach fine and in other Electron apps on this machine, so it is probably noise. The binary is stripped, so the core dumps have no symbols. I can provide them or run a debug build if that helps.
Workaround
Rename the file to an ASCII name without spaces before dragging it in.
This is an Electron/Chromium crash, not the composer attachment code. Dropping a file on Linux Wayland is handled in the browser process before makeWorkspaceFileDropHandlers or addComposerAttachments run. Those only see a File after Chromium has accepted the drop. The SIGTRAP with si_code: SI_KERNEL is Chromium's fatal check, and the dump is the t3code main process, so the window and the bundled server both go away. A renderer crash would be reloaded; this one is not.
The same signature is already tracked upstream in electron/electron#54153 (Electron 44.4.3, KDE Wayland, non-ASCII filename, ASCII rename works, file bytes irrelevant). Maintainers reproduced it on Chrome and closed it as upstream on September 24. It is not fixed. This repo is still on Electron 44.4.2, including the nightlies you tested. The mime.cache line is unrelated Chromium noise; it also shows up for drops that attach.
The space is probably not required. Both of your failing names contain non-ASCII characters, and the Electron report crashes on an em dash alone. Renaming to ASCII is the workaround that is known to work. The paperclip button uses the file chooser (<input type="file">) instead of the Wayland drag path, so it may also work. That is not confirmed.
Root cause found. This is not a T3 Code bug. It is a Chromium CHECK in the browser process, triggered because the process runs with a non-UTF-8 LC_CTYPE. The space in the name is irrelevant; one non-ASCII character is enough.
Symbolized stack
I symbolized the core dump with the official Electron 44.4.2 breakpad symbols (build-id e3816f4c… matches). Main thread:
The crash happens while Chromium converts the drop, before the renderer receives any drag event. No T3 Code code (composer, preload, IPC) runs.
Why
data_transfer_util.cc:114 checks that the FilePath display name is non-empty, but line 118 passes display_name.AsUTF8Unsafe() to PathInfo, which does CHECK(!display_name.empty()) (file_system_access_permission_context.h:85).
On desktop Linux, AsUTF8Unsafe() goes through SysNativeMBToWide() / mbrtowc(), which returns an empty string for any non-ASCII byte when LC_CTYPE is C.
content_main.cc calls setlocale(LC_ALL, ""). glibc fails that call as a whole when any locale variable names a locale that is not installed. On my machine, KDE's Region settings export LC_TIME=en_GB.UTF-8, but only en_US.UTF-8 is generated. So the process stays in C even though LANG=en_US.UTF-8.
I replayed the same libc calls with the app's environment:
Make every locale variable name an installed locale, for example by enabling en_GB.UTF-8 UTF-8 in /etc/locale.gen and running locale-gen, or by setting LC_TIME to an installed locale. LC_ALL=C reproduces the crash.
T3 Code cannot work around this: the locale is fixed by Chromium before any app JavaScript runs, and the crash happens before the drop reaches the renderer.
Same crash upstream: electron/electron#54153 (Electron maintainers confirmed it reproduces in Chrome and asked for an upstream Chromium report) and probably electron/electron#49804 ("crashes when launched from the desktop file, not from a terminal"). I'm filing the Chromium report and will link it here.
Closing: this is not a T3 Code bug. It is a Chromium crash in the browser process, and it only happens when the process runs with a non-UTF-8 LC_CTYPE. Summary for anyone who lands here with the same symptom (the detailed analysis is in the comment above).
Symptom
On Linux, dropping a file whose name contains any non-ASCII character (ação.txt, repro — test.md, …) onto an Electron/Chromium window kills the main process with SIGTRAP (si_code: SI_KERNEL). Nothing is logged, and no dragenter/dragover/drop handler runs. ASCII names work, and the space in the name is irrelevant. It affects any Electron app, not only T3 Code.
Root cause
Symbolized stack (Electron 44.4.2 = Chromium 152.0.7977.130, official breakpad symbols):
content_main.cc calls setlocale(LC_ALL, "") at startup. glibc fails that whole call, and leaves every category at C, when any locale variable names a locale that is not installed. In my case KDE's Region settings exported LC_TIME=en_GB.UTF-8 while only en_US.UTF-8 was generated, so the process ran in C even though LANG=en_US.UTF-8.
On a drop, FileInfosToDataTransferFiles() checks that the FilePath display name is non-empty (line 114), but passes display_name.AsUTF8Unsafe() to PathInfo (line 118).
On desktop Linux, AsUTF8Unsafe() converts through SysNativeMBToWide()/mbrtowc(), which returns an empty string for any non-ASCII byte in the C locale.
PathInfo then hits CHECK(!this->display_name.empty()) (content/public/browser/file_system_access_permission_context.h:85), and the browser process traps.
The crash happens before the drop reaches the renderer, and the locale is fixed before any app JavaScript runs, so T3 Code cannot work around it. The same code is still on Chromium main.
Am I affected?
Run locale from the same environment that launches the app. Lines like locale: Cannot set LC_ALL to default locale: No such file or directory mean yes. Compare your LANG/LC_* values with locale -a. Launching from a terminal can behave differently from launching from the desktop menu if the session exports extra LC_* variables, which matches the "only crashes when launched from the GUI" report in electron/electron#49804.
Fix
Make every LANG/LC_* variable name an installed locale. On Arch: uncomment the locale in /etc/locale.gen and run locale-gen, or change the variable (for example in KDE's Region settings) to a locale you have. Restart the app afterwards. LC_ALL=C reproduces the crash on purpose.
The Chromium-side fix is to guard on the converted string instead of the FilePath in data_transfer_util.cc (or to convert without depending on the C library locale). Note that the PathInfo(PathType, FilePath) constructors derive the display name the same way, so other File System Access entry points may hit the same CHECK in a C-locale process.
Activity
juliusmarminge commentedon Sep 26, 2026
This is an Electron/Chromium crash, not the composer attachment code. Dropping a file on Linux Wayland is handled in the browser process before
makeWorkspaceFileDropHandlersoraddComposerAttachmentsrun. Those only see aFileafter Chromium has accepted the drop. TheSIGTRAPwithsi_code: SI_KERNELis Chromium's fatal check, and the dump is thet3codemain process, so the window and the bundled server both go away. A renderer crash would be reloaded; this one is not.The same signature is already tracked upstream in electron/electron#54153 (Electron 44.4.3, KDE Wayland, non-ASCII filename, ASCII rename works, file bytes irrelevant). Maintainers reproduced it on Chrome and closed it as upstream on September 24. It is not fixed. This repo is still on Electron 44.4.2, including the nightlies you tested. The
mime.cacheline is unrelated Chromium noise; it also shows up for drops that attach.The space is probably not required. Both of your failing names contain non-ASCII characters, and the Electron report crashes on an em dash alone. Renaming to ASCII is the workaround that is known to work. The paperclip button uses the file chooser (
<input type="file">) instead of the Wayland drag path, so it may also work. That is not confirmed.marcuscastelo commentedon Sep 26, 2026
Root cause found. This is not a T3 Code bug. It is a Chromium
CHECKin the browser process, triggered because the process runs with a non-UTF-8LC_CTYPE. The space in the name is irrelevant; one non-ASCII character is enough.Symbolized stack
I symbolized the core dump with the official Electron 44.4.2 breakpad symbols (build-id
e3816f4c…matches). Main thread:The crash happens while Chromium converts the drop, before the renderer receives any drag event. No T3 Code code (composer, preload, IPC) runs.
Why
data_transfer_util.cc:114checks that theFilePathdisplay name is non-empty, but line 118 passesdisplay_name.AsUTF8Unsafe()toPathInfo, which doesCHECK(!display_name.empty())(file_system_access_permission_context.h:85).AsUTF8Unsafe()goes throughSysNativeMBToWide()/mbrtowc(), which returns an empty string for any non-ASCII byte whenLC_CTYPEisC.content_main.cccallssetlocale(LC_ALL, ""). glibc fails that call as a whole when any locale variable names a locale that is not installed. On my machine, KDE's Region settings exportLC_TIME=en_GB.UTF-8, but onlyen_US.UTF-8is generated. So the process stays inCeven thoughLANG=en_US.UTF-8.I replayed the same libc calls with the app's environment:
Workaround
Make every locale variable name an installed locale, for example by enabling
en_GB.UTF-8 UTF-8in/etc/locale.genand runninglocale-gen, or by settingLC_TIMEto an installed locale.LC_ALL=Creproduces the crash.T3 Code cannot work around this: the locale is fixed by Chromium before any app JavaScript runs, and the crash happens before the drop reaches the renderer.
Same crash upstream: electron/electron#54153 (Electron maintainers confirmed it reproduces in Chrome and asked for an upstream Chromium report) and probably electron/electron#49804 ("crashes when launched from the desktop file, not from a terminal"). I'm filing the Chromium report and will link it here.
marcuscastelo commentedon Sep 26, 2026
Closing: this is not a T3 Code bug. It is a Chromium crash in the browser process, and it only happens when the process runs with a non-UTF-8
LC_CTYPE. Summary for anyone who lands here with the same symptom (the detailed analysis is in the comment above).Symptom
On Linux, dropping a file whose name contains any non-ASCII character (
ação.txt,repro — test.md, …) onto an Electron/Chromium window kills the main process with SIGTRAP (si_code: SI_KERNEL). Nothing is logged, and nodragenter/dragover/drophandler runs. ASCII names work, and the space in the name is irrelevant. It affects any Electron app, not only T3 Code.Root cause
Symbolized stack (Electron 44.4.2 = Chromium 152.0.7977.130, official breakpad symbols):
content_main.cccallssetlocale(LC_ALL, "")at startup. glibc fails that whole call, and leaves every category atC, when any locale variable names a locale that is not installed. In my case KDE's Region settings exportedLC_TIME=en_GB.UTF-8while onlyen_US.UTF-8was generated, so the process ran inCeven thoughLANG=en_US.UTF-8.FileInfosToDataTransferFiles()checks that theFilePathdisplay name is non-empty (line 114), but passesdisplay_name.AsUTF8Unsafe()toPathInfo(line 118).AsUTF8Unsafe()converts throughSysNativeMBToWide()/mbrtowc(), which returns an empty string for any non-ASCII byte in theClocale.PathInfothen hitsCHECK(!this->display_name.empty())(content/public/browser/file_system_access_permission_context.h:85), and the browser process traps.The crash happens before the drop reaches the renderer, and the locale is fixed before any app JavaScript runs, so T3 Code cannot work around it. The same code is still on Chromium
main.Am I affected?
Run
localefrom the same environment that launches the app. Lines likelocale: Cannot set LC_ALL to default locale: No such file or directorymean yes. Compare yourLANG/LC_*values withlocale -a. Launching from a terminal can behave differently from launching from the desktop menu if the session exports extraLC_*variables, which matches the "only crashes when launched from the GUI" report in electron/electron#49804.Fix
Make every
LANG/LC_*variable name an installed locale. On Arch: uncomment the locale in/etc/locale.genand runlocale-gen, or change the variable (for example in KDE's Region settings) to a locale you have. Restart the app afterwards.LC_ALL=Creproduces the crash on purpose.Upstream
FilePathindata_transfer_util.cc(or to convert without depending on the C library locale). Note that thePathInfo(PathType, FilePath)constructors derive the display name the same way, so other File System Access entry points may hit the same CHECK in aC-locale process.