Re: XForms: file_selector seg fault

From: Graham Smith (gqs@zip.com.au)
Date: Sat Oct 14 2000 - 21:44:31 EDT

  • Next message: T.C. Zhao: "Re: XForms: xforms internal crash"

    # To subscribers of the xforms list from Graham Smith <gqs@zip.com.au> :

    On 13-Oct-2000 Steve Lamont wrote:
    ># To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
    >
    >> There appears to be a problem with fl_show_file_selector( ) function
    >> which
    >> when you select a directory which you do not have permission to access the
    >> program seg faults immediately. Also if you type in the directory field an
    >> incorrect path it will core dump.
    >>
    >> I'm using xforms vers 0.88 on SuSE Linux 6.3.
    >
    > I assume you mean fl_show_fselector().
    >
    Yes, it appears fl_show_file_selector( ) is defined in the forms.h as
    fl_show_fselector( ), don't know why I was using it as all the doc refers to
    the latter..

    > I was unable to duplicate the problem under 0.89 on Sun Solaris 2.6.
    > I got the error messages below with a dialog box saying the same thing.
    >
    > In ReadDir [fselect.c 463] Can't read
    > /home/spl/tmp/forms_try/secret_stuff
    > In GetDir [fselect.c 381] invalid dir: /home/spl/tmp/foo/bar/baz--No
    > such file or directory
    >
    > ncmir:spl> ls -l
    > [...]
    > d--------- 2 root sys 512 Oct 13 06:40 secret_stuff/
    > [...]
    >
    > I, of course, did not try all the combinations and permutations of the
    > permission and ownership fields, so there may still be a problem
    > lurking somewhere.
    >
    > fl_show_fselector(), of course, returns NULL if nothing is selected
    > (the "Cancel" button is pressed). If you're not checking for this,
    > the program will, segmentation fault if you try to use the pointer
    > returned but I assume from your description that this isn't the
    > problem.

    Vers 0.88 seg faults as soon as you select an invalid/unavailable directory,
    not after it returns NULL.
    >
    > Can you upgrade to 0.89 and try that?

    Appears to be all fixed with Vers 0.89. Thanks:-)

    >
    > spl

    Thanks,

    Graham Smith
    ----------------------------------
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Sat Oct 14 2000 - 21:47:55 EDT