Game crash - There was an error drawing object1.

Started by cat, Sun 22/01/2012 19:33:53

Previous topic - Next topic

cat

Maybe solved!
Doc_Savage found a possible solution to this problem. As I was not able to reproduce the problem, I cannot verify if it helps.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45945.msg617135#msg617135

Hi!

Selmiak reported an error in my game:
"There was an error drawing object1. It's current sprite, 56, is invalid."



He used 2x antialiased filter. I can't reproduce it and the error did not reoccur when he restarted the game.

Another player reported the same error but with completely different screen settings (fullscreen, no filters).

Both were using Direct3D 9 (I set this as default because in direct draw mode the music stuttering happens on room change)

Additionally I have to say that all sprites use alpha channel.

There is no line number in the error message but I think this lines cause the problem:

Code: ags

      oBowlEmpty.Visible = true;
      Wait(40);
      oUdder.Graphic = 56;
      Wait(20);
      oUdder.Graphic = 100;
      Wait(20);
      oUdder.Graphic = 56;
      Wait(20);
      oUdder.Graphic = 100;
      Wait(20);
      oUdder.Graphic = 55;


Any idea what this could be?

Edit: Forgot to mention - I use AGS Editor .NET (Build 3.2.1.111)
v3.2.1, March 2011

Dualnames

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

cat

Yes it does. For me it always works, I can't reproduce the error. Also, in Spritemanager the properties of 56 look ok to me.

Gilbert

Hmmm. Just a quick guess. Is sprite #56 of the same colour depth as the game's?

Also, did the error reported by the other player involve the same sprite?

Ponch

When this bug was first reported, I tried every combination of resolution, filter, and setting. I can't get the game to crash.

Very strange.   :-X

Ghost

#5
Same here, I tried it out this morning. No crash at all.

And by its description this sounds like a bug that should always happen- an object's sprite doesn't change its colour depth or attributes at runtime, after all. I can't break your game, cat!

cat

Thanks guys for testing!

Quote from: Iceboty V7000a on Mon 23/01/2012 11:05:24
Hmmm. Just a quick guess. Is sprite #56 of the same colour depth as the game's?
Yes, all 32 bit.
Quote
Also, did the error reported by the other player involve the same sprite?
Just got the confirmation from Tabata (she is the other person) - yes it is the same sprite. Luckily she has offered to help me reproducing and finding the error.

She also mentioned that before the crash the cursor vanished but got visible again after rightclick (deselect inv item).

selmiak

ZOMG, I think I played the german translation, and tabata probably too, so further investigation there might lead to another imagefile with a translation on it. Or the cow should moo in german and this crashed the game ;)

cat

I tried the German translation too but couldn't crash it. Tabata did use the German translation, but wasn't able to reproduce it either.

Actually, the reference pic for the cow was a photo I took in Switzerland a few years ago, so the cow will indeed moo in German  ;)

tzachs

Just a few thoughts.
- Are you using sprite 56 anywhere else in the code?
- Try and reproduce it by running it a lot of times. Change (temporarily) the code to this:
Code: ags

oBowlEmpty.Visible = true;
Wait(40);
int i = 0;
while (i < 1000)
{
      oUdder.Graphic = 56;
      Wait(20);
      oUdder.Graphic = 100;
      Wait(20);
      i++;
}
oUdder.Graphic = 55;




cat

Nope, only usage of this sprite. And even turbo milking with only Wait(5) didn't result in an error.

There is nothing more for me to do than hoping it doesn't happen again...

SMF spam blocked by CleanTalk