Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Savegame thumbnails bug  (Read 21549 times)

0 Members and 1 Guest are viewing this topic.

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Savegame thumbnails bug
« 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!
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Savegame thumbnails bug
« Reply #1 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Savegame thumbnails bug
« Reply #2 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.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Savegame thumbnails bug
« Reply #3 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Savegame thumbnails bug
« Reply #4 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.
« Last Edit: October 06, 2008, 12:41:18 AM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Savegame thumbnails bug
« Reply #5 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.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Savegame thumbnails bug
« Reply #6 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. :(
« Last Edit: October 06, 2008, 03:44:32 PM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Savegame thumbnails bug
« Reply #7 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?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Savegame thumbnails bug
« Reply #8 on: January 08, 2009, 08:04:59 PM »

You can safely ignore the warning.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.05 seconds with 25 queries.