Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
Ah well, good, I must have missed that the first time (apparently). Anyway, I'll put in some debugs (printfs, right) and do some tracing tomorrow and see what I can narrow down, unless someone else manages to find it before then. On Wednesday, March 2, 2016 8:53 PM, Chris Angelico wrote:

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
I tried to add the extra parameter to both signal_connect's, but that didn't do it. I'll try to troubleshoot more in the morning, I can't really work on it anymore tonight. On Wednesday, March 2, 2016 8:53 PM, Lance Dillon wrote: Weird, if I don't click the button it works, but if I

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
Weird, if I don't click the button it works, but if I do click the button, I get the segfault... On Wednesday, March 2, 2016 8:50 PM, Lance Dillon wrote: Wait  I read it wrong. Sorry, that was all wrong.  That is callback_args, which is a required parameter.    get_all_args(

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 12:50 PM, Lance Dillon wrote: > Sorry, that was all wrong. That is callback_args, which is a required > parameter. > > > get_all_args("signal_connect",args,"%s%*%*.%s%d",&a,&tmp1,&tmp2,&detail,&connect_before); > > assign_svalue_no_free(&b->cb,tmp1); > assign_svalue_no_

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 12:45 PM, Lance Dillon wrote: > However: > > > int main() > { > GTK2.setup_gtk(); > object btn=GTK2.Button("Raise an exception"); > object win=GTK2.Window(0)->add(btn)->show_all(); > win->signal_connect("destroy",lambda() {exit(0);},0); > btn->signal_conn

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
Wait  I read it wrong. Sorry, that was all wrong.  That is callback_args, which is a required parameter.    get_all_args("signal_connect",args,"%s%*%*.%s%d",&a,&tmp1,&tmp2,&detail,&connect_before);   assign_svalue_no_free(&b->cb,tmp1);   assign_svalue_no_free(&b->args,tmp2); So when it t

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
BTW, that is in gobject.pre. On Wednesday, March 2, 2016 8:45 PM, Lance Dillon wrote: However: int main() {     GTK2.setup_gtk();     object btn=GTK2.Button("Raise an exception");     object win=GTK2.Window(0)->add(btn)->show_all();     win->signal_connect("destroy",lambda() {exit(0)

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
However: int main() {     GTK2.setup_gtk();     object btn=GTK2.Button("Raise an exception");     object win=GTK2.Window(0)->add(btn)->show_all();     win->signal_connect("destroy",lambda() {exit(0);},0);     btn->signal_connect("clicked",lambda() {error("Baboom!\n");});     return -1; } Adding a

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
Also happens with me with : [riffraff@hobbes src]$ pike --version Pike v8.0 release 1 Copyright © 1994-2013 Linköping University compiling 8.1 right now, but that is weird. On Wednesday, March 2, 2016 8:25 PM, Chris Angelico wrote: On Thu, Mar 3, 2016 at 9:14 AM, Chris Angelico wrote

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 9:14 AM, Chris Angelico wrote: > On Thu, Mar 3, 2016 at 9:06 AM, Lance Dillon wrote: >> Guessing that since win and btn go out of scope at end of main(), maybe they >> get cleaned up? I usually set things that need to persist into backend past >> main as global variables,

Re: Pike 8.0.182 release candidate

2016-03-02 Thread Stephen R. van den Berg
Peter Bortas wrote: >On Tue, Mar 1, 2016 at 5:15 PM, Stephen R. van den Berg wrote: >> Incidentally: this fix is incomplete. So it fixes some of those >> race-conditions, but not all of them. >Is there a way of reducing that to a reproducable test? It doesn't >have to be simple enough to go into

Re: Pike 8.0.182 release candidate

2016-03-02 Thread Peter Bortas
On Tue, Mar 1, 2016 at 5:15 PM, Stephen R. van den Berg wrote: > Peter Bortas wrote: >>o programs > >> The runtime now attempts to wait for any compilations in progress to >> complete before complaining about cloning of unfinished programs. >> This fixes a race-condition when the same program i

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 9:06 AM, Lance Dillon wrote: > Guessing that since win and btn go out of scope at end of main(), maybe they > get cleaned up? I usually set things that need to persist into backend past > main as global variables, or at least i have in the past. That part shouldn't be a pr

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
You could try to move those to global, see if it still happens.  If not, that's probably where the problem lies. On Wednesday, March 2, 2016 5:06 PM, Lance Dillon wrote: Guessing that since win and btn go out of scope at end of main(), maybe they get cleaned up?  I usually set things

Re: Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Lance Dillon
Guessing that since win and btn go out of scope at end of main(), maybe they get cleaned up?  I usually set things that need to persist into backend past main as global variables, or at least i have in the past. On Wednesday, March 2, 2016 3:49 PM, Chris Angelico wrote: int main()

Tracking down corruption after exception in GTK signal handler

2016-03-02 Thread Chris Angelico
int main() { GTK2.setup_gtk(); object btn=GTK2.Button("Raise an exception"); object win=GTK2.Window(0)->add(btn)->show_all(); win->signal_connect("destroy",lambda() {exit(0);}); btn->signal_connect("clicked",lambda() {error("Baboom!\n");}); return -1; } Run this, click the