title: Segmentation fault on i.MX6 when running Qt5 application with -platform eglfs
body: <p>I am trying to run the <code>hellogl_es2</code> Qt example without X Server by specifying the <code>eglfs</code> platform:</p>
  
  <pre><code>&gt; ./hellogl_es2 -platform eglfs
  No protocol specified
  Segmentation fault (core dumped)
  </code></pre>
  
  <p>CPU is Freescale i.MX6.</p>
  
  <p>Linux kernel is 3.10.17.</p>
  
  <p>Distribution is Ubuntu 14.04.4 LTS (trusty).</p>
  
  <p>Qt version is 5.2.1, installed from <a href="http://packages.ubuntu.com" rel="nofollow noreferrer">http://packages.ubuntu.com</a>, <code>armhf</code> architecture, packages <code>qtbase5-dev</code>, <code>qtbase5-examples</code>, <code>qtbase5-examples-dbg</code>.</p>
  
  <p>The core dump is (problem at <code>gcoOS_InitLocalDisplayInfo</code> in <code>libGAL.so</code>):</p>
  
  <pre><code>GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
  Copyright (C) 2014 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "arm-linux-gnueabihf".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;.
  Find the GDB manual and other documentation resources online at:
  &lt;http://www.gnu.org/software/gdb/documentation/&gt;.
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from hellogl_es2...Reading symbols from /usr/lib/debug/.build-id/6f/8a8dfdb5abe920e37000a98092b4058b56da0a.debug...done.
  done.
  [New LWP 2802]
  [New LWP 2803]
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
  Core was generated by `./hellogl_es2 -platform eglfs'.
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0xb5dd0c84 in gcoOS_InitLocalDisplayInfo () from /usr/lib/arm-linux-gnueabihf/vivante/libGAL.so
  (gdb) bt
  #0  0xb5dd0c84 in gcoOS_InitLocalDisplayInfo () from /usr/lib/arm-linux-gnueabihf/vivante/libGAL.so
  #1  0xb5d095f8 in ?? () from /usr/lib/arm-linux-gnueabihf/libEGL.so.1
  /build/buildd/gdb-7.7.1/gdb/frame.c:472: internal-error: get_frame_id: Assertion `fi-&gt;this_id.p' failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  </code></pre>
  
  <p>The behavior is the same with other Qt example projects.</p>
  
  <p>When the X Server is running, specifying the <code>xcb</code> platform (<code>-platform xcb</code>, i.e. the default) is working fine.</p>