<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Michael,<br>
      <br>
      Yes, I located the exactly line where the seg fault is raised. I
      did a full report with a description and a stacktrace. Is reported
      here: <a class="moz-txt-link-freetext" href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214396">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214396</a><br>
      <br>
      <pre class="bz_comment_text" id="comment_text_0">After debugging gdb says that the exception is raised on line 679 of file /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-5.1.8/src/VBox/GuestHost/OpenGL/util/hash.c

void *crHashtableSearch( const CRHashTable *h, unsigned long key )
{
    unsigned int index = crHash( key );
    CRHashNode *temp;
#ifdef CHROMIUM_THREADSAFE
BUG IS HERE  =======>  crLockMutex((CRmutex *)&h->mutex);
#endif
    for ( temp = h->buckets[index]; temp; temp = temp->next )
    {
        if ( temp->key == key )
            break;
    }
#ifdef CHROMIUM_THREADSAFE
    crUnlockMutex((CRmutex *)&h->mutex);
#endif
    if ( !temp )
    {
        return NULL;
    }
    return temp->data;
}</pre>
      <br>
      <pre class="bz_comment_text" id="comment_text_1">(gdb) backtrace
#0  check_and_init_mutex (mutex=0x20c8, m=0x7fffffffe650) at /usr/src/lib/libthr/thread/thr_mutex.c:588
#1  0x0000000802923506 in __pthread_mutex_lock (mutex=0x20c8) at /usr/src/lib/libthr/thread/thr_mutex.c:743
#2  0x0000000801e531f1 in crHashtableSearch (h=0x0, key=56623106) at /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-5.1.8/src/VBox/GuestHost/OpenGL/util/hash.c:679
#3  0x000000080088f1cb in glXMakeCurrent (dpy=0x80481f000, drawable=56623106, ctx=0x1f4) at /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-5.1.8/src/VBox/Additions/common/crOpenGL/glx.c:694
#4  0x00000008010ce5be in fgSetWindow () from /usr/local/lib/libglut.so.3
#5  0x00000008010cc44c in fgDestroyWindow () from /usr/local/lib/libglut.so.3
#6  0x00000008010cc895 in fgDestroyStructure () from /usr/local/lib/libglut.so.3
#7  0x00000008010c9841 in fgDeinitialize () from /usr/local/lib/libglut.so.3
#8  0x0000000801b9add6 in __cxa_finalize (dso=<value optimized out>) at /usr/src/lib/libc/stdlib/atexit.c:237
#9  0x0000000801b2a141 in exit (status=0) at /usr/src/lib/libc/stdlib/exit.c:72
#10 0x0000000000400976 in _start ()
#11 0x0000000800622000 in ?? ()
#12 0x0000000000000000 in ?? ()</pre>
      <br>
      <br>
      But, if you prefer I can report in a vbox bugtracking also.<br>
      <br>
      Cheers<br>
      -Otacílio<br>
      <br>
      Em 21/11/2016 08:25, Michael Thayer escreveu:<br>
    </div>
    <blockquote
      cite="mid:7be0cd95-46e2-90b4-15ed-dedc08523867@oracle.com"
      type="cite">Hello Otacílio,
      <br>
      <br>
      10.11.2016 13:07, Otacílio wrote:
      <br>
      <blockquote type="cite">I'm using this minimalist program to test
        OpenGL. When running on a true
        <br>
        machine (FreeBSD 11, clang 3.8.0) this program runs fine. But,
        when
        <br>
        compiling and running in a Virtualbox guest with
        <br>
        virtualbox-ose-additions-5.1.8 installed (FreeBSD 11, clang
        3.8.0,
        <br>
        OpenGL enabled)  I'm getting a core dump when the program exits.
        So its
        <br>
        not clear to me if this is a FreeBSD port problem or not. So,
        please, I
        <br>
        wold like ask you to compile and running in your's guest machine
        running
        <br>
        Linux or FreeBSD and report to me the results.
        <br>
      </blockquote>
      <br>
      I can confirm that this affects Linux guests too.  Unfortunately
      we do not have time to investigate X11 guest 3D issues for the
      foreseeable future, so your best bet is probably to debug it
      yourself.  If you can clearly locate the problem (as in
      understanding it) chances are good that we will fix it.
      <br>
      <br>
      Regards,
      <br>
      <br>
      Michael
      <br>
      <br>
      <blockquote type="cite">
        <br>
        Program:
        <br>
        <br>
        #include <stdio.h>
        <br>
        #include <GL/glew.h>
        <br>
        #include <GL/gl.h>
        <br>
        #include <GL/glu.h>
        <br>
        #include <GL/glut.h>
        <br>
        #include <GL/glext.h>
        <br>
        <br>
        int main(int argc, char **argv) {
        <br>
        <br>
                glutInit(&argc, argv);
        <br>
                glutCreateWindow("GLUT");
        <br>
                glewInit();
        <br>
        <br>
                printf("OpenGL version supported by this platform (%s):
        \n",
        <br>
                glGetString(GL_VERSION));
        <br>
        <br>
                fprintf(stdout, "Exiting...\n");
        <br>
                fflush(stdout);
        <br>
        <br>
                return 0;
        <br>
        }
        <br>
        <br>
        <br>
        Compiler command:
        <br>
        <br>
        cc -I/usr/local/include -L/usr/local/lib -o testegl testegl.c
        -lGL
        <br>
        -lGLEW -lGLU   -lglut
        <br>
        <br>
        <br>
        My results in a guest machine:
        <br>
        <br>
        [ota@nostromo /usr/home/ota/Desktop]$ ./testegl
        <br>
        OpenGL version supported by this platform (2.1 Chromium 1.9):
        <br>
        Exiting...
        <br>
        Segmentation fault (imagem do núcleo gravada)
        <br>
        <br>
        <br>
        Thanks a lot!
        <br>
        <br>
        []'s
        <br>
        <br>
        -Otacilio
        <br>
        <br>
        _______________________________________________
        <br>
        vbox-dev mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>