Re: [code] [textadept] Terminal spawn support

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Fri, 18 Jul 2014 09:18:25 +0100

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. :-)

Chris

-- 
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 Fri 18 Jul 2014 - 04:18:25 EDT

This archive was generated by hypermail 2.2.0 : Fri 18 Jul 2014 - 06:48:42 EDT