Re: [code] [textadept] Possible bug?

From: triplejam <triplejam.att.protonmail.com>
Date: Wed, 09 May 2018 12:27:28 -0400

I've tried my best to figure it out. Although compiling Hunspell gives more debugging info, the place where it segfaults still says ??. It's hard to trigger debugging too because it only seems to crash like a third or fourth of the times after I do reset(). The most helpful info I got sometimes is a warning message from gdb in after the reset() which says:

Continuing.
warning: Temporarily disabling breakpoints for unloade
d shared library "/home/james/.textadept/modules/spell
check/spell64.so"

Then as soon as I save:

Thread 1 "textadept" received signal SIGSEGV, Segmenta
tion fault.
0x00007f649a004e66 in ?? ()

And when it does work right those other times I can step through the lspell.cxx file and hunspell.

​Cordially,

James

Sent with ProtonMail Secure Email.​

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On May 8, 2018 3:09 PM, Mitchell <m.att.foicica.com> wrote:

> Hi James,
>
> On Tue, 8 May 2018, triplejam wrote:
>
> > Reading symbols from ./textadept...done.
> >
> > (gdb) set disable-randomization off
> >
> > (gdb) r
> >
> > Starting program: /home/james/Software/textadept_10.0_beta.x86_64/textadept
> >
> > [Thread debugging using libthread_db enabled]
> >
> > Using host libthread_db library "/lib64/libthread_db.so.1".
> >
> > [New Thread 0x7f0e5d86f700 (LWP 20113)]
> >
> > [New Thread 0x7f0e5d06e700 (LWP 20114)]
> >
> > Thread 1 "textadept" received signal SIGSEGV, Segmentation fault.
> >
> > 0x00007f0e5c1acc11 in ?? ()
> >
> > (gdb) bt
> >
> > #0 0x00007f0e5c1acc11 in ?? ()
> >
> > #1 0x00005570c16b83cb in luaD_precall (
> >
> > L=0x5570c2924108, func=0x5570c31cb3b0,
> >
> > nresults=1) at lua/src/ldo.c:434
> >
> > [snip]
> >
> > Is there something else to get more info?
>
> Unfortunately, it looks like at this point the only way I can think to get more info would be to have you build your ownspell64.so module with debug symbols and then try to debug it. There may be a shortcut, but you'll certainly need to fetch the spellcheck source and put it in your ~/.textadept/modules/spellcheck/.
>
> 1. Download https://foicica.com/hg/spellcheck/archive/tip.zip.
> 2. Extract its contents into ~/.textadept/modules/spellcheck/
> 3. [Begin shortcut] Try running `gdb textadept`.
> 4. Before running the program, try putting a breakpoint `b ls_spell` and accept the "pending" query. This is the Lua `spell()` function that you determined was the entry point to the source of the crash.
> 5. Now run the program and trigger spell checking.
> 6. The debugger should break at lspell.cxx:22.
> 7. Type `n` for "next" twice.
> 8. There should be a crash after the second "next" (it should not get to line 24, the end of the function).
> 9. If the crash indeed happens, try and get the backtrace.
> 10. If the crash does not happen, then the crash is not happening in `spell()` and you'll have to do some more sleuthing.
> 11. [End shortcut] If you cannot break at `b ls_spell` in step 5, then you'll have to build your own spell64.so.
> 12. Run `make hunspell` and then `make CXX="g++ -g" spell64.so`. Now try steps 3-11.
>
> If you are still getting an unhelpful backtrace, and the crash is occuring inside hunspell, then you may be able to debug hunspell itself by putting a breakpoint `b Hunspell::spell` (hunspell.cxx:325) and rooting around there after continuing (`c`) from the `spell()` function breakpoint.
>
> I am sorry for all the trouble you've been having, but I do very much appreciate your patience and taking the time to try and help me out.
>
> 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 Wed 09 May 2018 - 12:27:28 EDT

This archive was generated by hypermail 2.2.0 : Thu 10 May 2018 - 06:50:32 EDT