error running first example (chapter 3 triangle) - Printable Version +- Forums (http://www.scratchpadgames.net/forums) +-- Forum: Main Forums (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=1) +--- Forum: Help my code won't work?? (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=22) +--- Thread: error running first example (chapter 3 triangle) (/showthread.php?tid=65) Pages:
1
2
|
error running first example (chapter 3 triangle) - michal - 04-14-2018 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. RE: error running first example (chapter 3 triangle) - Brian Beuken - 04-14-2018 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. RE: error running first example (chapter 3 triangle) - Brian Beuken - 04-14-2018 I googled for this error..and there's a thread here, see if an update helps https://www.raspberrypi.org/forums/viewtopic.php?t=12581 RE: error running first example (chapter 3 triangle) - michal - 04-14-2018 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/questions/75219/fixing-failed-to-add-service-already-in-use-error-programmatically but i guess ill do that another day been fighting this for hours now. RE: error running first example (chapter 3 triangle) - Brian Beuken - 04-14-2018 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 RE: error running first example (chapter 3 triangle) - michal - 04-15-2018 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/questions/56124/eglgetdisplay-fails-on-raspberry-3 Quote:One workaround on Raspbian Stretch is to edit 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 RE: error running first example (chapter 3 triangle) - Brian Beuken - 04-15-2018 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 RE: error running first example (chapter 3 triangle) - michal - 04-15-2018 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! RE: error running first example (chapter 3 triangle) - Brian Beuken - 04-15-2018 Just double check and use raspi-config to switch off Opengl drivers and return to legacy OpenGLES2.0 drivers RE: error running first example (chapter 3 triangle) - DieSkaarj - 06-07-2018 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. |