Re: [code] Crash when opening a file with Chinese path in Windows

From: Alexander Misel <alexander_misel.att.live.cn>
Date: Mon, 18 Mar 2019 03:40:35 +0000

Sorry for the late reply. I followed your steps and printed the stack trace
Program received signal SIGSEGV, Segmentation fault.
0x00496c68 in ?? ()
(gdb) bt
#0 0x00496c68 in ?? ()
#1 0x64bf5db1 in ?? () from D:\Program Files (x86)\textadept\libglib-2.0-0.dll
#2 0x64bf6168 in ?? () from D:\Program Files (x86)\textadept\libglib-2.0-0.dll
#3 0x64bf6601 in ?? () from D:\Program Files (x86)\textadept\libglib-2.0-0.dll
#4 0x61a4b519 in ?? () from D:\Program Files (x86)\textadept\libgtk-win32-2.0-0.dll
#5 0x00497289 in ?? ()
#6 0x00497316 in ?? ()
#7 0x006052ad in textadept!luaopen_lfs ()
#8 0x004013e2 in ?? ()
#9 0x75aa343d in KERNEL32!BaseThreadInitThunk () from C:\Windows\syswow64\kernel32.dll
#10 0x77329802 in ntdll!RtlInitializeExceptionChain () from C:\Windows\system32\ntdll.dll
#11 0x773297d5 in ntdll!RtlInitializeExceptionChain () from C:\Windows\system32\ntdll.dll
#12 0x00000000 in ?? ()
It might be lfs's problem. There's another implementation of lfs which support multibyte characters by cloudwu. Maybe it'll help us make a patch to lfs. See
[1] https://github.com/cloudwu/luawinfile
[2] https://blog.codingnow.com/2017/10/lua_windows_utf8.html (in Chinese)
________________________________
From: Mitchell <m.att.foicica.com>
Sent: Wednesday, October 24, 2018 21:38
To: code.att.foicica.com
Subject: Re: [code] Crash when opening a file with Chinese path in Windows

Hi Alexander,

On Sat, 6 Oct 2018, Alexander Misel wrote:

> If textadept is not open, then open a file with a Chinese path, it would be fine. But if textadept is open, drag and drop that file to textadept won't work. And double clicking the file to open will call segmentation fault for textadept.
>
> The situation only occurs in Windows. I want to know the reason of bug and whether it could be fixed.

Sorry for the late reply, but the best way to figure out why this is happening is to:

1. Download a nightly build of Textadept (which has debug symbols enabled) for Win32.
2. If you don't already have the GNU debugger installed on your machine, download MinGW[1] and from the GUI package manager install the "mingw32-base" package from the "MinGW Base System" section of "All Packages" followed by "gdb".
3. Open the Windows command prompt.
4. `cd` to the Textadept nightly build's directory.
5. Make sure all instances of Textadept are closed.
6. Run `c:\mingw\bin\gdb.exe textadept.exe` (or use whatever path to gdb.exe is on your computer).
7. Type `r` followed by Enter to start Textadept.
8. Trigger the crash by double-clicking a file in Windows Explorer to open in Textadept.
9. The gdb command prompt window will report a segfault.
10. Type `bt` followed by Enter to get a stack trace. Please send that stacktrace to me.

Cheers,
Mitchell

--
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 17 Mar 2019 - 23:40:35 EDT

This archive was generated by hypermail 2.2.0 : Mon 18 Mar 2019 - 06:45:26 EDT