Le 16/01/2015 12:58, Koko a écrit : > Hi, > among other problems that i did not solved, but at least worked around, > there is one i cannot solve by myself, nor i know if it is a bug in gambas > or a mistake by myself. > > libmpv is a library to access mpv mediaplayer, the library header is here: > https://raw.githubusercontent.com/mpv-player/mpv/master/libmpv/client.h > > Basically, what i do is: > > '============================================ > ' Gambas class file > Extern mpv_create() As Pointer In "libmpv:1" > Extern mpv_initialize(Pmpv_handle As Pointer) As Integer In "libmpv:1" > Extern mpv_detach_destroy(Pmpv_handle As Pointer) In "libmpv:1" > Extern mpv_terminate_destroy(Pmpv_handle As Pointer) In "libmpv:1" > Extern mpv_command_string(Pmpv_handle As Pointer, args As String) As Integer > In "libmpv:1" > > Public Pmpv_handle As Pointer > > Public Sub Form_Open() > Pmpv_handle = mpv_create() > mpv_initialize(Pmpv_handle) > Pmpv_handle = mpv_create() > mpv_initialize(Pmpv_handle) > mpv_command_string(Pmpv_handle, "loadfile /path/to/videofile.mkv") > End > > Public Sub Button1_Click() > mpv_command_string(Pmpv_handle, "quit") > Wait 10 > mpv_terminate_destroy(Pmpv_handle) > End > '============================================ > > That's it. > The program starts and begin playing the file. > As i push the button, it stops playing and the player window will close, > but as soon as i close the main form, the gambas interpreter shows a window > saying the program crashed wuth a segmentation fault. > > This is the kernel message: > traps: gbx3[16400] general protection ip:7f17cdb9c824 sp:7fffff2682a0 > error:0 in libpthread-2.20.so[7f17cdb93000+17000] > > Thanks to anyone who can spot a light on this issue. > > -- > Antonio Orefice >
Can you provide a project that reproduces the crash? Thanks. -- Benoît Minisini ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user