Please what does ""Assertion failed: 0, file ..\src\opengl\graphics_opengl.cpp, line 768"" mean?

when some particular game objects where instanced on the game the engine stopped and that message was shown in the console log please what is it and how do I fix it?

Would you mind posting the object that caused the error?

Hello,

An assert is a sort of alert put in the source code.
It’s usually used in C , for detecting potentials problems , usually with bound checking.

For example, it could be a divide by zero detection.

Here is an example of using it:

#include<stdio.h>
#include<assert.h>

float divide(int num, int div)
{
  assert("attempt to divide by zero!" && div!=0);
  return (float)num/div;
}

int main(void)
{
  int num=2, div=0;
  printf("%d/%d = %f\n",num,div,divide(num,div));
  return 0;
}

As it’s in the Defold source file, you cannot correct by yourself. But you can give to the devs the method to reproduce the bug.

Thank for reading.

That particular file and line number is an assert on the glCheckError() function, inside our Flip() function. As @sicher says, it would be good to know what you added before this error occurred.

2 Likes

the game objects that caused the error had label components in them so i remove the label components and that fixed it

1 Like

Can you create a label conponent that causes the error again? If so, it would be very helpful with an instruction how we can reproduce the error.

2 Likes

I created 2 game objects with a label component, sprite component, and a script component in them.
I then created factory components with the above game objects as their prototypes. I then put the factory ids in a table along long with other factory ids .
I ran a factory.create command that iterated on the table .
On building the engine exited a the error show up on the console log.
so I isolated the factory components and the error showed up only when i ran the engine with the factory components of the above game objects in the factory.create command.

1 Like

I hope that was helpful

I’m trying to reproduce this:

Here’s one of the game objects (the other one is identical):

I’m then using these as prototypes to factories and then I call factory.create() but there’s no error. Did you do anything specific with the labels?

Are you using Editor 2, and what platform are you running on?

MacOS.
Yes, editor 2.

EDIT: :slight_smile:

Aha aha, yes yes… But what editor and platform is @ashherb2u using? :slight_smile:

I use editor 1

no i didnt

Can you reproduce this error?

@ashherb2u what platform are you running the editor on (win/osx/linux)?

i use windows

yes whenever i spawn a game object with a label component in it

Could you reproduce this crash in a small project? If not, would you be willing to add one of us to the project so we could take a look?

(You can add me using sven.andersson@king.com, please also write which project you added me to so I can find it in the list. :slight_smile: )

alright