Re: [code] [textadept] Terminal spawn support

From: Mitchell <>
Date: Fri, 18 Jul 2014 09:58:06 -0400 (EDT)

Hi Chris,

On Fri, 18 Jul 2014, Chris Emerson wrote:

> On Thu, Jul 17, 2014 at 12:12:01PM +0100, Chris Emerson wrote:
>> I'm getting a repeatable crash when using it for a recursive grep (but it
>> works for a make). The stack trace isn't very informative:
> The problem is in lspawn_readfds(), triggered by a bug in my exit callback.
> If the exit_cb raises an error, then lua_pcall pushes an extra string on the
> stack and the lua_settable() a bit lower down tries to index the userdata.
> So the quick fix would be something like
> if (lua_pcall(L, 1, 0, 0) != 0) lua_pop(L, 1);
> And I guess a nicer fix would trigger the ERROR handler. :-)

The callbacks are triggered from a non-Lua function, so calling
`luaL_error()` to raise an error (intended for Textadept to handle) would
trigger a panic and immediate exit. Instead I committed a change that
prints callback function errors to stderr. Works fine for GTK, but not so
much for curses since stderr is not displayed... at least it doesn't crash


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 18 Jul 2014 - 09:58:06 EDT

This archive was generated by hypermail 2.2.0 : Sat 19 Jul 2014 - 06:33:20 EDT