[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Segfault after fl_finish and fix

From: Jens Thoms Toerring
Subject: Re: [XForms] Segfault after fl_finish and fix
Date: Tue, 4 Oct 2016 17:57:09 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Steven,

On Tue, Oct 04, 2016 at 11:16:26AM -0400, Steven G. Messervey wrote:
>   Yes, I see what you are saying.
> I got hung up on a line from the manual:
> "The most important function for doing the actual interaction with forms is
> FL_OBJECT *fl_do_forms(void);
> It starts the main loop of the program and returns only when either the
> state of an object changes that has no callback bound to it or fl_finish()
> is called in a callback. In the first case the address of the object is
> returned, in the latter NULL."
> (xforms_38.html#Part-V-Overview-of-Main-Functions,  a little after the
> discussion of fl_hide_form).

Thanks for bringing this to my attention since this is obviously
untrue! I think the expectation was that the callback calls exit()
after fl_finish(). As you've found out the hard way things go
badly wrong when hoping for it to make fl_do_forms() return
NULL. My gut feelung at the moment is the proper fix is to check
after each call of obj->object_callback() if XForms is still
alive (e.by by checking fli_context for NULL or fl_display for
None) and, if not, immediatel return, similar to what you
proposed, but at every such call.

> I need it to return so the interpreter can process an exit call and do other
> cleanup (close shared libraries, close files, etc.).

I see. That sounds like a perfectly reasonable use of that
feature. Please give me a bit of time to think this through,
at the moment my workload is a bit on the high side...

                           Best ergards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]