Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error on running triangle: Received a SIGABRT: Aborted
#1
Edit: I've removed the attached zip file and sent it you you via e-mail instead as I wasn't sure if you'd be happy for the code to be hanging around on the forum.

Good day to you Brian,

Thanks for the great book - I'm a recent CS convert from a different discipline (audio) in games, and quite like the idea of SBCs, so your book is a perfect start!

I'm having a bit of trouble running the code for the first example, and was wondering if you might be able to help? The first error message I get is a thrown exception:

Received a SIGABRT: Aborted

The line in question is the following:

Code:
assert(state->surface != EGL_NO_SURFACE);


The VisualStudio (I'm running 2019, and a Pi 3 B+) output is this:

&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
GameProject1: GameProject1.cpp:229: void init_ogl(Target_State*, int, int): Assertion `state->surface != EGL_NO_SURFACE' failed.

I'm guessing this is going to be some pointer-related issue, though for the life of me I can't track it down.

I'd appreciate it if you could have a look at some point - I've attached my code in a zip file.
Reply
#2
Hey Lawro
thanks for the message, I got your email and will have a look later today for you, I'll post my findings here because it might be useful to others.

There's a couple of reasons why you can get this error, the most common is that you didn't set the Pi3B+ to use legacy drivers?

I'll catch up later
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 had a look at your code thanks for sending it, and letting me know the scratchpad mailbox was clogged up with spam. I cleared it out.

yup, as I suspected, it's the drivers (though do make sure you also have the legacy gldrivers set in raspi-config) ... you had the 3 listed in the book, which is totally correct for Raspbian Jessie, but Rasbian Buster needs

GLESv2_static EGL_static vchiq_arm vcos khrn_static bcm_host pthread 

if you go to your Visual GDB makefile settings and change the libs to these, it works perfectly, so you entered it all fine.
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
(07-17-2020, 11:32 AM)Brian Beuken Wrote: I had a look at your code thanks for sending it, and letting me know the scratchpad mailbox was clogged up with spam. I cleared it out.

yup, as I suspected, it's the drivers (though do make sure you also have the legacy gldrivers set in raspi-config) ... you had the 3 listed in the book, which is totally correct for Raspbian Jessie, but Rasbian Buster needs

GLESv2_static EGL_static vchiq_arm vcos khrn_static bcm_host pthread 

if you go to your Visual GDB makefile settings and change the libs to these, it works perfectly, so you entered it all fine.

Fantastic, thanks Brian, it worked!

A small note for anyone in the same boat: it's important to remove the libs in the Visual GDB makefile for Jessie (GLESv2 EGL bcm_host) if you're using Buster. Adding the Buster libs to the existing Jessie ones didn't work for me, so just have the Buster ones.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)