XForms: Segmentation Fault using xyplot

From: Daniela Soares de Almeida (daniela.soares@openlink.com.br)
Date: Sun Jun 04 2000 - 13:33:55 EDT

  • Next message: Steve Lamont: "Re: XForms: Segmentation Fault using xyplot"

    # To subscribers of the xforms list from Daniela Soares de Almeida <daniela.soares@openlink.com.br> :

    Hi, i compiled the code below and didn't have any warning or error but when
    i tried to execute it i got segmentation fault. It's a simple code and i
    didn't find where is my error, if someone could help me i would be
    grateful. Regards,

                                                                                    Daniela.

    /* Form definition file generated with fdesign. */

    #include <stdlib.h>
    #include <errno.h>
    #include <math.h>
    #include <fcntl.h>
    #include <sys/time.h>
    #include <sys/types.h>
    #include <stdio.h>
    #include <unistd.h>

    #include "forms.h"
    #include "interface.h"
    #include "rtl_fifo.h"
    #include "placa16.h"

    parametros_PID PID;
    int fd0, fd1, fd2, fd3;

    FD_interface *create_form_interface(void)
    {
     
      FL_OBJECT *obj;
      FD_interface *fdui = (FD_interface *) fl_calloc(1, sizeof(*fdui));

      fdui->interface = fl_bgn_form(FL_NO_BOX, 440, 380);
      obj = fl_add_box(FL_UP_BOX,0,0,440,380,"");
      obj = fl_add_labelframe(FL_ENGRAVED_FRAME,40,50,690,430,"Posicao e
    Controle");
      fdui->Posicao = obj =
    fl_add_xyplot(FL_ACTIVE_XYPLOT,80,70,310,210,"Posicao");

      fl_end_form();

      fdui->interface->fdui = fdui;

      return fdui;
    }
    /*---------------------------------------*/

    int main(int argc, char *argv[])
    {
     
      
      FD_interface *fd_interface;
     
       fd_interface = create_form_interface();

       /* fill-in form initialization code */

       /* show the first form */
      

    fl_show_form(fd_interface->interface,FL_PLACE_CENTERFREE,FL_FULLBORDER,"Cont
    role PID de um duplo integrador ");

    do{
          fl_set_xyplot_data(fd_interface->Posicao,(void *) 1, (void *) 1,
    1,"Title","Eixo X","Eixo Y");

       }while(1);
       return 0;
    }

    _________________________________________________
    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 : Sun Jun 04 2000 - 13:41:13 EDT