• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows "Error attempting to draw sprite"

Jabbers

Member
EDIT: Solved, this is a Spine problem. Spine sprites are causing black screen and texture problems for Windows 10, Windows module, in version 1763. Apparently this is true for other modules too. It is due to skeleton_attachment_create, thanks to CHANG and rIK for pointing this out: http://bugs.yoyogames.com/view.php?id=23980

When I move to one of my rooms I get "Error attempting to draw sprite" spammed in the IDE console. Most of the room looks black, maybe one or two sprites draw. Backgrounds are missing. Text is distorted. Spine characters are black and white and missing most pieces.

Got rid of all the code related to surfaces and views. Issue remains. Clearing the cache does not work.

This only started happening after I updated to version 1.4.1760 and continues to happen for later versions. The previous edition did not have this trouble.

Please help. Nobody seems to know what is going on. I can't recreate it and I can't give the project away, so it makes for a useless bug report.


EDIT: Might be a bug, turns out any sprite put in my default texture group will not draw. If I shift it to another group it will.
 
Last edited:

rIKmAN

Member
You don't mention your export target, but 1763 has a black screen issue with Spine sprites when exporting to HMTL5, possible 1760 has a related / similar issue?

If you aren't exporting to HTML5, and can't share any code etc then it's hard to help you.
 

Jabbers

Member
You don't mention your export target, but 1763 has a black screen issue with Spine sprites when exporting to HMTL5, possible 1760 has a related / similar issue?

If you aren't exporting to HTML5, and can't share any code etc then it's hard to help you.
Good point. I'm using Windows 10, target is the standard Windows module.

Thank you so much for your post. Nobody has been able to answer this, not even some of the YoYo guys I've been able to speak to. You were absolutely correct. I'm using a Spine sprite, and no matter what texture group I put my Spine sprite on, it causes corruption. I got rid of all Spine sprites and ran the game, and I get no graphical issues whatsoever. Looks like this problem affects more than just HTML5.
 

rIKmAN

Member
Good point. I'm using Windows 10, target is the standard Windows module.

Thank you so much for your post. Nobody has been able to answer this, not even some of the YoYo guys I've been able to speak to. You were absolutely correct. I'm using a Spine sprite, and no matter what texture group I put my Spine sprite on, it causes corruption. I got rid of all Spine sprites and ran the game, and I get no graphical issues whatsoever. Looks like this problem affects more than just HTML5.
Glad I could help narrow it down.

I have not used texture groups myself yet, but I can confirm that Spine sprites work in 1763 using the Windows export target as I ran into the black screen issue and distorted Spine sprites so had to do some testing to narrow down what it was.

Might be worth trying 1763 and then adding them to texture groups to see if that breaks things in 1763 as well.
If it does add your results to that thread.
 

Jabbers

Member
Yep, I am using 1763 and using the Windows target. Yesterday I was experimenting with moving sprites on a new texture group and I believed that it was caused by the default group corrupting somehow. Unfortunately there is no combination that totally fixes it. I've tried isolating my Spine sprites onto their own texture group but it doesn't work. The only solution I have found thus far is to delete the offending sprites.

I will keep looking into it and see if I can find anything else.

EDIT: I have discovered something interesting. The sprites will work fine to begin with, but if I have an object that uses a Spine sprite, then move to a new room and try to use a Spine object again, it will graphically corrupt. For some reason moving rooms and trying to create a Spine skeleton for a second time is causing problems.
 
Last edited:

rIKmAN

Member
Yep, I am using 1763 and using the Windows target. Yesterday I was experimenting with moving sprites on a new texture group and I believed that it was caused by the default group corrupting somehow. Unfortunately there is no combination that totally fixes it. I've tried isolating my Spine sprites onto their own texture group but it doesn't work. The only solution I have found thus far is to delete the offending sprites.

I will keep looking into it and see if I can find anything else.

EDIT: I have discovered something interesting. The sprites will work fine to begin with, but if I have an object that uses a Spine sprite, then move to a new room and try to use a Spine object again, it will graphically corrupt. For some reason moving rooms and trying to create a Spine skeleton for a second time is causing problems.
Ah sorry, you said in your OP you updated to / were using 1760.

What version of Spine are you using?

There is definitely some weirdness with 1763 and Spine and also physics enabled rooms with HTML5 causing black screens, looks like you have discovered some other funky stuff going on with Wndows as well.

Using Spine sprites worked fine for me display wise (no texture groups and a simple animation) using the Windows export, but I had an issue where all 4 scale values (2 local, 2 world) returned using skeleton_bone_state_get were always 1 even though the animation was playing and clearly scaling the bone I was checking.

Could you possibly check that out for me and let me know if it works and reports correct values for you? I'd really appreciate it.

There are so many little bugs, glitches and incompatibilities that it's hard to know whether it's one of those, a code error or something else.

Anyway, see if you can reliably reproduce your glitch in a simple project and report it as a bug as the quicker this stuff gets reported the quicker it might get fixed.
 
Last edited:

Jabbers

Member
The problem with this issue is skeleton_attachment_create () function.
It was already three months.
yoyogame seems to have no idea to fix this.
Aha, bulls-eye! I got rid of all the skeleton_attachment_create() code and it fixed it.

I am concerned that this has been a problem that is unresolved. Very destructive glitch...

Thank you both.
 
Z

ZettianJuggernaut

Guest
Does anyone know if this problem has been fix by chance in Gamemaker Studio 2?
 
Top