Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error running first example (chapter 3 triangle)
#1
First of all im sorry i did not use the other forum, but i was only allowed to post in this for some reason.

Anyways, my project compiles but it does not run.

I am getting the following error 
Code:
* failed to add service - already in use?

Have no idea how to fix it.
Reply
#2
Hi Michal, that's not a problem, thats why I made this an open forum, i've moved the thread to the error sub forum. Your account has now been activated so feel free to post anywhere.

Now about your error, which program are you trying to run? I'm not familiar with that error, talk me through what you are trying to do.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#3
I googled for this error..and there's a thread here, see if an update helps

https://www.raspberrypi.org/forums/viewt...hp?t=12581
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#4
Hey, 

Yeah its the chapter 3 triangle. And yeah i forgot to mention that i googled that as well. And nothing they suggest seems to help. My last resort seems to be go with mesa like this suggests: https://raspberrypi.stackexchange.com/qu...mmatically but i guess ill do that another day been fighting this for hours now.
Reply
#5
ok so you did an update/upgrade distro and its still doing it?
and you are using Raspbian? Not noobs?

Can you zip up the project and send it to me, brian@scratchpadgames.net
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#6
So. I finally got it to work

I am running Raspbian 9 Stretch - Linux 4.14.30-v7. Everything was updated and upgraded.


I followed the workaround from https://raspberrypi.stackexchange.com/qu...aspberry-3

Quote:One workaround on Raspbian Stretch is to edit 
Code:
/boot/config.txt
 and comment out dtoverlay=vc4-kms-v3d. This will not only enable the hello_pi
 examples, but also Quake 3 and other applications known to encounter this issue.


But idk if the rest of the samples will work in the future. (will have to check that out)

It took me a while to find that this actually worked as i by misstake commented out the glCompileShader(TheShader); call Smile
Reply
#7
Hi Michal

Well done on getting it to work, I wish I knew why you were having this issue, as I've never see this before, I've had over 50 students happily installing new Raspbian Stretch on university Pi's then running my demo's with no issues, its its quite confusing that you had such a frustrating error and others here have also not reported anything like this.

I honestly don't know if you will have any other problems, since you should not have had that problem in the 1st place. But if it is working you should be ok...

As i type this, a question comes to mind, do you have the Raspberry Pi's experimental OpenGL activated? If so then that may be an issue. All the demo's are based on OpenGLES2.0!

You can make sure by going to a terminal, entering sudo rasp-config, and selecting option: Advanced options and then option 3 for Legacy, or Disable GL Drivers, which will disable the OpenGL drivers and methods that are not compatible with OpenGLES2.0.

I just set my OpenGL to on, ran hello triangle, and sure enough I get a failed to add service error, so this is a very strong possibility for your problem. Switching it off again the project worked fine

If you've never set the OpenGL on, then ignore this, its something else, but I really don't know what at the moment, but I'll try to find out
Let me know how you are getting on
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#8
Cool, well i honestly dont remember if i set the drivers or not. But as you mentioned for the moment its working. So ill keep going until it fails again. Will keep you updated.
Thanks!
Reply
#9
Just double check and use raspi-config to switch off Opengl drivers and return to legacy OpenGLES2.0 drivers
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#10
Hi I'm also experiencing this problem except that changing the GL driver to Legacy gives me a new error:

Error linking program:
ERROR:LEX/PARSE-2 (vertex shader, line 6) Undefined identifier.

I'm going to try flashing a new card with a fresh install of Raspian and if that doesn't work I'll try the mesa work around.

Also it might be worth noting that I'm using Geany and g++ to compile the code and although it's compiling it's also finding error with the declaration of "int32_t success = 0;" and is saying it's unused. I've also tried compiling on Visual Studio and VisualGDB but that just returns the original failed to add service message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)