Wintermute Engine Forum

Wintermute Engine => Bug reports => Won't fix => Topic started by: metamorphium on October 05, 2008, 07:32:29 PM

Title: Savegame thumbnails bug
Post by: metamorphium on October 05, 2008, 07:32:29 PM
Hi Mnemonic,

I ran into a bug with saving positions. If you save the position the thumbnail image is updated only if this was a brand new savegame position. If you however overwrite the already
existing save game, not only the image is not updated (until next game restart) but also it issues this error:

20:17: Saving game 'C:\Users\[NDA]\Saved Games\[NDA]\save004.dsv'...
20:17: Warning: invalid instance 'm_WaitObject'

The correct thumbnail shows upon the game restart.

We have a supposed release this week, do you think anything could be done? We're using thumbnail buttons for save/load so this is very vital for us.

Thanks a million!
Title: Re: Savegame thumbnails bug
Post by: Mnemonic on October 05, 2008, 08:31:39 PM
I don't think it's related to the warning.
I need more code or ideally a repro project.
Title: Re: Savegame thumbnails bug
Post by: metamorphium on October 05, 2008, 09:00:11 PM
ok, it would be quite hard to make a repro project, but here's the method I use for the thumbnails:

Code: WME Script
  1. method Fill()
  2. {
  3.  
  4.   for (var a2=0; a2<12;a2=a2+1)
  5.   {
  6.    
  7.      var a = (this.Offset * 12) + a2; // this.Offset is for page offset, every page shows 12 save slots.
  8.    
  9.      var tmp = this.GetControl("B"+(a2+1))// Buttons are named B1 till B12
  10.      if (Game.IsSaveSlotUsed(a))
  11.      {
  12.          tmp.SetImage("savegame:"+a);
  13.      }
  14.      else
  15.      {
  16.           stat.Text = "<New Savegame>";
  17.           tmp.SetImage("scripts\SaveLoad\saveframe.png");
  18.      }
  19.         
  20.   }
  21. }
  22.  

This method is invoked everytime the window is displayed. This is verified by issuing Game.Msg in the Fill method.
Title: Re: Savegame thumbnails bug
Post by: Mnemonic on October 05, 2008, 09:38:56 PM
ok, it would be quite hard to make a repro project, but here's the method I use for the thumbnails:
Well you might need to, because I really don't see a way for "savegame:xx" to return an image from non-existent saved game file.
Title: Re: Savegame thumbnails bug
Post by: metamorphium on October 06, 2008, 12:13:54 AM
Quote
I really don't see a way for "savegame:xx" to return an image from non-existent saved game file.

To me this looks like some form of ill-caching, but you'll see for yourself. I'm uploading (with creators consent) the very minimalistic version (cca 16MB) of the project which already manifests the problem. Steps to reproduce:

1, run game
2, save the position
3, go to different view
4, save the position over the saved one
5, choose load or save game -> the thumbnail image is still from the step 2
6, restart the game - the image is now new and shiny

Link to the downloadable is in your PM.

Thanks again!

Edit: one more thing, the caption of the image actually correctly changes so the description is taken from the right file.
Title: Re: Savegame thumbnails bug
Post by: metamorphium on October 06, 2008, 07:44:26 AM
After restarting my computer this problem somehow went away so I am unable to reproduce it. If you can't either, I think we could close it as MS Windows issue(tm).

Thanks.
Title: Re: Savegame thumbnails bug
Post by: metamorphium on October 06, 2008, 03:25:17 PM
Unfortunately, on another computer the issue still arise. So I'm reopening this as sometimes works sometimes don't piece of bad luck. :(

Edit: and here's a fix!!!

Code: WME Script
  1. {
  2.    Sleep(20);
  3.    tmp.SetImage("savegame:"+a);
  4. }
  5.  

please don't ask me why...

Edit2: nope. again it makes random yes or no. I'm totally tired of this thing. :(
Title: Re: Savegame thumbnails bug
Post by: lacosaweb on January 08, 2009, 05:08:17 PM
I have the same problem "Warning: invalid instance 'm_WaitObject'" message in the log file after saving game.

what was the cause?
Title: Re: Savegame thumbnails bug
Post by: Mnemonic on January 08, 2009, 08:04:59 PM
You can safely ignore the warning.