# Train program seg faults (remote X display only)

**URL:** <https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319>\
**Category:** PowerVR Insider\
**Tags:** pvrvframe\
**Created:** [April 9, 2009, 12:04am UTC](https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319 "2009-04-09T00:04:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbmom1008](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kbmom1008](https://forums.imgtec.com/u/kbmom1008)\
**Post date:** [April 9, 2009, 12:04am UTC](https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319/1 "2009-04-09T00:04:53Z")

</div>

I’m a newbie to OpenGL.&nbsp; I’m going to eventually be working with an MPC\<SPAN =“highlight”\>5121e board.&nbsp; Until I get that board set up, I thought I’d get started with OpenGL using the Linux emulation SDK (SDK\_OGLES-1.1\_LINUX.tar.gz).&nbsp;&nbsp; I compiled and ran training course programs 1-5 and all work fine.&nbsp; Training course program #6 (Introducing PVR Tools), however, gets a segmentation fault.&nbsp; Here’s the traceback from gdb:

&nbsp;
  

Starting program: /home/brenda/linux\_em/SDKPackage/TrainingCourse/06\_IntroducingPVRTools/OGLES/Build/LinuxPC/ReleaseX11/OGLESIntroducingPVRTools  
[Thread debugging using libthread\_db enabled]  
[New Thread 0xb793c8d0 (LWP 23674)]  
PVRShell: EGL 1.3 initialized  
Profile Chosen: MBXLITE
  

Program received signal SIGSEGV, Segmentation fault.  
[Switching to Thread 0xb793c8d0 (LWP 23674)]  
0xb7e3158b in glDrawElements ()  
&nbsp;&nbsp; from /home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Lib/libGLES\_CM.so  
(gdb) where  
#0&nbsp; 0xb7e3158b in glDrawElements ()  
&nbsp;&nbsp; from /home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Lib/libGLES\_CM.so  
#1&nbsp; 0x080514aa in CPVRTPrint3D::Flush ()  
#2&nbsp; 0x0804a8ad in OGLESIntroducingPVRTools::RenderScene ()  
#3&nbsp; 0x0804caea in PVRShellInit::Run ()  
#4&nbsp; 0x0804dd8c in main ()  
(gdb)
  

&nbsp;
  

Any thoughts appreciated.&nbsp; Not sure if it matters but I tested by openGL/X window set up with glxgears and that looked good.
  

&nbsp;
  

Thanks,  
Brenda
  

&nbsp;
kbmom10082009-04-14 20:56:26

---

<div class="post-metadata">

**Author:** ![jacekc](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@jacekc](https://forums.imgtec.com/u/jacekc)\
**Post date:** [April 9, 2009, 3:34pm UTC](https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319/2 "2009-04-09T15:34:09Z")

</div>

1. Â Could You describe exactly the procedure that you have executed after unpacking the archive eg. command Â you type to build this demo , shell variable you set (if any) before you compile and before you run demo and directory from which you are typing building command.

2. what is the full name of the archive of this SDK?.Â

3. Â please Â put training course nr 4 , following line:

glGetString(GL\_RENDERER);

in console you should see identication of pc emulation which I would like to ask you to present here.

Looking forward to have an response from you

  
jacekc2009-04-09 17:34:48

---

<div class="post-metadata">

**Author:** ![kbmom1008](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kbmom1008](https://forums.imgtec.com/u/kbmom1008)\
**Post date:** [April 10, 2009, 12:18am UTC](https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319/3 "2009-04-10T00:18:22Z")

</div>

Thanks for the reply.&nbsp; Here's the info you requested.&nbsp; Sorry for the line wrapping.
  

&nbsp;
  

1.&nbsp; Procedures to build and execute training program that faults (SDKPackage unpacked at ~/linux\_em):
  

&nbsp;
  

a. set environment variables
  

\>export LD\_LIBRARY\_PATH=/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Lib  
\>export PLATFORM=LinuxPC
  

&nbsp;
  

b. cd to Build/.../LinuxGeneric directory of component being built, in this case:
  

\> cd ~/linux\_em/SDKPackage/TrainingCourse/06\_IntroducingPVRTools/OGLES/Build/LinuxGeneric$ 
  

&nbsp;
  

c. build the executable:
  

\> make Common=1  
Makefile:24: warning: overriding commands for target `clean'  
../../../../../Builds/OGLES/LinuxGeneric/make\_demo.mak:119: warning: ignoring old commands for target `clean'  
+t+ Making content.mak  
make[1]: Entering directory `/home/brenda/linux\_em/SDKPackage/TrainingCourse/06\_IntroducingPVRTools/OGLES'  
make[1]: `all' is up to date.  
make[1]: Leaving directory `/home/brenda/linux\_em/SDKPackage/TrainingCourse/06\_IntroducingPVRTools/OGLES'  
+c+ ../LinuxPC/ReleaseX11/Image.o  
gcc -c -I/home/brenda/linux\_em/SDKPackage/Tools/OGLES -I/home/brenda/linux\_em/SDKPackage/Shell -I/home/brenda/linux\_em/SDKPackage/Shell/API/KEGL -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Shell/OS/LinuxX11 -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/usr/X11R6/include -I../../.. -m32 -DBUILD\_OGLES -Wall -DRELEASE -O2 ../../Content/Image.cpp -o../LinuxPC/ReleaseX11/Image.o  
+c+ OGLESIntroducingPVRTools ../LinuxPC/ReleaseX11/OGLESIntroducingPVRTools.o  
gcc -c -I/home/brenda/linux\_em/SDKPackage/Tools/OGLES -I/home/brenda/linux\_em/SDKPackage/Shell -I/home/brenda/linux\_em/SDKPackage/Shell/API/KEGL -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Shell/OS/LinuxX11 -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/usr/X11R6/include -I../../.. -m32 -DBUILD\_OGLES -Wall -DRELEASE -O2 ../../OGLESIntroducingPVRTools.cpp -o../LinuxPC/ReleaseX11/OGLESIntroducingPVRTools.o  
+c+ OGLESIntroducingPVRTools ../LinuxPC/ReleaseX11/PVRShell.o  
gcc -c -I/home/brenda/linux\_em/SDKPackage/Tools/OGLES -I/home/brenda/linux\_em/SDKPackage/Shell -I/home/brenda/linux\_em/SDKPackage/Shell/API/KEGL -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Shell/OS/LinuxX11 -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/usr/X11R6/include -I../../.. -m32 -DBUILD\_OGLES -Wall -DRELEASE -O2 /home/brenda/linux\_em/SDKPackage/Shell/PVRShell.cpp -o../LinuxPC/ReleaseX11/PVRShell.o  
+c+ OGLESIntroducingPVRTools ../LinuxPC/ReleaseX11/PVRShellAPI.o  
gcc -c -I/home/brenda/linux\_em/SDKPackage/Tools/OGLES -I/home/brenda/linux\_em/SDKPackage/Shell -I/home/brenda/linux\_em/SDKPackage/Shell/API/KEGL -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Shell/OS/LinuxX11 -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/usr/X11R6/include -I../../.. -m32 -DBUILD\_OGLES -Wall -DRELEASE -O2 /home/brenda/linux\_em/SDKPackage/Shell/API/KEGL/PVRShellAPI.cpp -o../LinuxPC/ReleaseX11/PVRShellAPI.o  
+c+ OGLESIntroducingPVRTools ../LinuxPC/ReleaseX11/PVRShellOS.o  
gcc -c -I/home/brenda/linux\_em/SDKPackage/Tools/OGLES -I/home/brenda/linux\_em/SDKPackage/Shell -I/home/brenda/linux\_em/SDKPackage/Shell/API/KEGL -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Shell/OS/LinuxX11 -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/Include -I/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Include -I/usr/X11R6/include -I../../.. -m32 -DBUILD\_OGLES -Wall -DRELEASE -O2 /home/brenda/linux\_em/SDKPackage/Shell/OS/LinuxX11/PVRShellOS.cpp -o../LinuxPC/ReleaseX11/PVRShellOS.o  
+l+ ../LinuxPC/ReleaseX11/OGLESIntroducingPVRTools  
g++ -o ../LinuxPC/ReleaseX11/OGLESIntroducingPVRTools ../LinuxPC/ReleaseX11/Image.o ../LinuxPC/ReleaseX11/OGLESIntroducingPVRTools.o ../LinuxPC/ReleaseX11/PVRShell.o ../LinuxPC/ReleaseX11/PVRShellAPI.o ../LinuxPC/ReleaseX11/PVRShellOS.o -/home/brenda/linux\_em/SDKPackage/Tools/OGLES/Build/LinuxGeneric/../LinuxPC/ReleaseX11 -loglestools -Wl,--rpath-link=/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Lib -L/home/brenda/linux\_em/SDKPackage/Builds/OGLES/LinuxPC/Lib -lGLES\_CM  

  

d. cd to the directory where the program was built
  

\>cd ../LinuxPC/ReleaseX11
  

&nbsp;
  

e. run the program
  

\>OGLESIntroducingPVRTools
  

PVRShell: EGL 1.3 initialized  
Profile Chosen: MBXLITE  
Segmentation fault
  

&nbsp;
  

* * *

  

2. Full name of archive is SDK\_OGLES-1.1\_LINUX\_PCEMULATION\_2.04.24.0811.tar.gz
  

  

&nbsp;
  

* * *

  

3. Renderer string:
  

(gdb) p str  
$1 = (  
&nbsp;&nbsp;&nbsp; const GLubyte \*) 0xb7f87ce0 "PowerVR PVRVFrame 4.2 MBXLite (Host GL: `Intel 965/963 Graphics Media Accelerator`) SDK Build: 2.04.24.0809"  

  

&nbsp;
  

* * *

  

jacekc wrote:

  

  

1. &nbsp;Could You describe exactly the procedure that you have executed after unpacking the archive eg. command &nbsp;you type to build this demo , shell variable you set (if any) before you compile and before you run demo and directory from which you are typing building command.

  

2. what is the full name of the archive of this SDK?.&nbsp;

  

3. &nbsp;please &nbsp;put training course nr 4 , following line:

  

glGetString(GL\_RENDERER);

  

in console you should see identication of pc emulation which I would like to ask you to present here.

  

Looking forward to have an response from you

---

<div class="post-metadata">

**Author:** ![kbmom1008](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kbmom1008](https://forums.imgtec.com/u/kbmom1008)\
**Post date:** [April 14, 2009, 7:13pm UTC](https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319/4 "2009-04-14T19:13:31Z")

</div>

I changed the title to reflect that I discovered that the training program only faults when I'm using my Windows laptop as the display.&nbsp; Since the Linux box I'm using for developement isn't very accessible, I've been using Putty to ssh to the Linux box.&nbsp;&nbsp;To display&nbsp;openGL/X apps I have Xming running on my Windows laptop and I have Putty set up with X11 forwarding.&nbsp; And this seems to work fine for glxgears and for training programs 1-5.&nbsp; Training program 06\_IntroducingPVRTools, however, gets a segmentation fault as described in my earlier post if I use this type of remote display.&nbsp; Training program 6 does not get a segmentation fault if I display directly on the monitor for the Linux box.

  

  

Any suggestions welcomed.&nbsp; Could it be some kind of xming configuration issue?&nbsp; I'm surprised that the application, itself, would segmentation fault though.&nbsp; I've been searching online for similar problems but so far no luck.&nbsp;&nbsp;&nbsp; It's not very feasible for me to use the Linux box monitor so hope to get this working.

---

<div class="post-metadata">

**Author:** ![jacekc](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@jacekc](https://forums.imgtec.com/u/jacekc)\
**Post date:** [April 16, 2009, 2:15pm UTC](https://forums.imgtec.com/t/train-program-seg-faults-remote-x-display-only/319/5 "2009-04-16T14:15:33Z")

</div>

Hi,

I'm sorry for such a delay. Unfourtunetly we do not have any experience with Xming and Putty with X forwarding. If you could send us configuration details of your Xming , Putty enviroment then we would like to recreate that situation and introduce necessery fixes.

Best Regards,

  
jacekc2009-04-16 16:19:30
