Cant Save Game, Unexpected Error (Index outofBounds Exception)

SunYatSen

  • Posts: 59
Hey, title pretty much says it. Whenever I try to save my game, I get this "Unexpected Problem" error. I've tried deleting all the past few things I've worked on, but didn't seem to help.

I'm not too savvy with this stuff, I as hoping someone who knew better could check out the logs and maybe lead me in some direction, although I'm unsure how much info they'll give...

Thanks so much in advance!

rob1221

  • *
  • Posts: 9430
There seems to be a problem with an image but I can't determine any more detail than that.  Do you happen to have any really large images?

JeffreyDriver

  • *
  • Posts: 2149
If you haven't tried yet DEBUG > GAME > CLEANUP
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

morphman86

  • Posts: 141
It's generally easier to find IndexOutOfBound errors in the code than in the log. Any chance you could share a screenshot of your code?
Programming equivalent of Jack-of-all-trades

SunYatSen

  • Posts: 59
Hey guys, thanks for all your replies.

@rob: Yes, my game has quite a few images I would consider pretty large, the art is stop motion animation so it's HD photographs. I never had a problem with this in the past though, I've been doing that sort of art for a while and it only just became a problem now. Not only that, I've deleted the past few actors I've imported and it still happens(where it didnt happen before they were imported)

@Jeff: Tried, didn't work :(


@morphman: I'm sorry, I don't fully undertand what you mean. My game has a lot of code and I'm unsure where the source is from. Unless you meant the code it gives you when you hit "details" at the unexpected problem popup, but im pretty sure that's in the logs..


morphman86

  • Posts: 141
Well, the log didn't specify any specific behavior, it was all very generic. Since it does mention images though, you can probably narrow it down to any behavior that contains codes for images.
You mentioned stop motion, perhaps the one that handles the animations for those?
Programming equivalent of Jack-of-all-trades

rob1221

  • *
  • Posts: 9430
Morphman, that's a Java error and not a Haxe error, so the content of the blocks probably doesn't matter here.

SunYatSen

  • Posts: 59
Ok. Exciting new update on the case...

I went back to one of my back up files, and I'm now getting the same "unexpected error" but now it's because it can't read the image for "folder-23" Which I'm assuming is just the folder icon stencyl makes when you make a folder.

Looking in the file for the game, when you first open the file(not in resources file, not sure if supposed to be), you see the pictures for the folder icons. But for whatever reason, the first half of the folder icon images have the generic .png icon and windows photo viewer wont open them.  If I try deleting these images I get the previously explained error.

I'd imagine this is where the problem lies. I've looked around and haven't discovered anyone else having an issue like this.

Again, thanks for your time, any help is very much appreciated...

SunYatSen

  • Posts: 59
And here's the logs for that

SunYatSen

  • Posts: 59
Alright, last little update, I tried upgrading to newest stencyl build and the problem didn't get fixed. I've been trying a bunch of different things all day, and no solution :(.

I'll probably go back to my last stable version from a few days ago and just be set back a few days if no one has any more possible leads/solutions, so it's nbd.

But now I am curious, should I be concerned about importing really large images? Like I said, I feel like I have a bunch, but they've been giving me no problems before.

JeffreyDriver

  • *
  • Posts: 2149
Define large images. Dimensions and file size?
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

SunYatSen

  • Posts: 59
Kinda both. I have plenty that are about 500kb an 1x and sometimes around 500x500 at 1x as well. These are actors, not backgrounds, which are larger.

SunYatSen

  • Posts: 59
Oh jeez. So I was re-doing all the work I did the past few days on the game and it suddenly happened again! I didn't import any new art or anything!! I obviously tried deleting the code I just added, but the problem persisted even then! I'm getting a little worried now, I'm not sure if you need more info from me or what, just let me know, I really hope someone has a solution! I'm not sure what I'll do if not!

Thanks!

JeffreyDriver

  • *
  • Posts: 2149
500x500px images shouldn't give you any problems, but I'd say that 500kb for a single image is quite a lot. Look at compressing those. If done properly, you can reduce the file size greatly without losing quality.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

iii

  • *
  • Posts: 194
What platform are you targeting? Are you using more than one scale?
A 500x500 1x, at 4x can become 2000x2000.
If you only targeting Desktop platform, just use 1x scale, and disable all the others.

Check your game folder, "..\stencylworks\games\[Your_Game_Name]\resources\",
see if there's any images that have a large dimension. One/several of your actor's animation could be the culprit.

Make sure to also do a "Run>Clean Project", and "Debug>Game>Cleanup Unused Files"