Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: mala crash on resume from standby  (Read 14172 times)

0 Members and 1 Guest are viewing this topic.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #40 on: August 18, 2008, 07:29:08 pm »
Awesome! Any thoughts on my other standby suggestion (2 posts up, right above yours)?

To be honest I forgot about it  ;)

I will have a look at it tonight while that section of the code is in my head.

JukeBox Bug fix is next on the list after that..

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #41 on: August 18, 2008, 08:35:34 pm »
Quote
Not ideal since it's a shifted key anyway, and also because I have no way to say "no" (no key on my keyboard would cancel it).

ESC should do that

Awesome! Any thoughts on my other standby suggestion (2 posts up, right above yours)?

To be honest I forgot about it  ;)

I will have a look at it tonight while that section of the code is in my head.

JukeBox Bug fix is next on the list after that..
« Last Edit: August 19, 2008, 01:18:17 am by loadman »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #42 on: August 18, 2008, 11:59:10 pm »
Well I don't think I have whatever that key mapping is called mapped to ESC or anything else. But that's kind of beside the point. Hopefully you're just suggesting that as a temporary measure and you're still going to consider my request? I'm still hoping for a "standby" option on the shutdown tab.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #43 on: August 19, 2008, 12:14:09 am »
Well I don't think I have whatever that key mapping is called mapped to ESC or anything else. But that's kind of beside the point. Hopefully you're just suggesting that as a temporary measure and you're still going to consider my request? I'm still hoping for a "standby" option on the shutdown tab.

Well since you have already posted out my mail order bride I guess I have no choice  :laugh2:

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #44 on: August 19, 2008, 01:16:06 am »
Who told you? It was supposed to be a surprise! :laugh2:
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #45 on: August 19, 2008, 01:36:16 am »
Just to be sure you mean it to be another configuration option to add to the list
in options MaLa Exit?

* Quit
* Shutdown
* Standby     (NEW)

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #46 on: August 19, 2008, 09:15:24 am »
Exactly. Seems like it should be easy to add there since you already have general standby support, so I'm hoping you'll see it as a logical addition that will round out the standby support nicely. :)
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #47 on: August 24, 2008, 08:36:27 am »
Some thoughts on enhancements supporting the standby concept. I would really like to have a way to do standby AND a way to shut down fully (in case of a rare need to reboot). So I set up the exit key to be a shifted key, and set exit to do shutdown. Great, except it prompts to confirm. Not ideal since it's a shifted key anyway, and also because I have no way to say "no" (no key on my keyboard would cancel it).

* So first it would be nice if there was an option to avoid the prompt, or if it simply never prompts if it's a shifted key.

* Second it would be nice on the shutdown tab in the dropdown list to also have a "standby" option. If that option existed (and no prompt occurred!) then that would probably be my ideal solution. I'd map unshifted exit to standby, and switch my power button back to doing a normal shutdown. Of course, this would technically not be a mala shutdown, but from a user's point of view I think this is the place that makes the most sense for it.

This has been done and will be in next release

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #48 on: August 24, 2008, 11:25:07 am »
Awesome! Thanks!
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #49 on: August 29, 2008, 09:16:05 am »
loadman, hopefully this variant on the resume from standby problem is fixed already in the upcoming release: I resumed my cab and my mame list was showing no image files as I went through my game list. When I tried to launch a game, I got a daphne error! So mala was confused, halfway thinking it was showing the daphne game list when in fact the gamelist was from mame. And when I did "standby" it was in the mame list.

BTW, this has never happened before so I'm not sure what to say in regards to how it can be reproduced (other than that I did switch between emulators during that session).

Knowing the code changes you needed to make to fix the game selection post-standby, do you think this is also fixed?
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #50 on: August 30, 2008, 12:12:05 am »
Hmmm I could not make this happen  :dunno

After the next release if it still happening and you can find the set of circumstances it fails then I will look into it.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #51 on: September 01, 2008, 01:25:04 am »
I look forward to it, because now every time I power on it comes up in this bad state!
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #52 on: October 24, 2008, 10:48:53 pm »
The last couple of days I've noticed a problem. When I resume from standby (after using the exit key to go into standby), it goes right back into standby. Apparently mala reprocesses that keystroke again? :dunno Worse yet, sometimes it does it over and over and over and over. I have to power the system off and do a reboot to get it out of that state.

No, the exit key isn't being pressed when I resume.

Not sure how to reproduce it since all along I've never had it happen until yesterday. Hoping you'll be able to spot the cause by looking at the standby on exit code. :-\
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #53 on: October 24, 2008, 10:57:03 pm »
So it only just started happening to you did it?

Here is the code just in case you see something obvious

There is an option to deny the standby. Possibky I use that and deny and windows message sent within 10 secs of each other  :dunno

Code: [Select]
procedure TfrmMain.WMPOWERBROADCAST(var Msg: TMessage);
 var
  buttonSelected : Integer;
const
  PBT_APMQUERYSUSPEND=$0000;
  PBT_APMRESUMESUSPEND=$0007;
begin
  if Msg.WParam=PBT_APMQUERYSUSPEND then
  begin
    Log(mtInfo,'**** Windows asking to go into Standby');
   // stop video
   //VideoPlayer.Stop;
   VideoPlayer.Enabled := False;
   VideoWindow.Visible := False;
   // stop attract mode timer
   timLEDAttractMode.Enabled := False;
   timLEDStartAttractMode.Enabled := False;
   // stop screensaver
   timScreensaver.Enabled := False;
   // Disable Mouse
   FUseMouse:= false;
   ScreenActive := FALSE;

   ModalResult := mrOK;

   //  ** Option?
  //   Msg.Result:=BROADCAST_QUERY_DENY;

  end;
   // ****************************************
  if Msg.WParam=PBT_APMRESUMESUSPEND then
  begin
  Log(mtInfo,'**** MaLa Resume from Standby');

   if FGUIShowVideo then
   begin
   VideoPlayer.Enabled := true;
   VideoWindow.Visible := true;
   end;

  end;
end;

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #54 on: October 24, 2008, 11:05:36 pm »
It's when mala initiates the standby, not when windows does. So my guess is that's not the code that is relevant - I would think it's the code that handles the exit (standby) keypress. Just hoping you might see a reason that might happen in the code. I don't mean to send you on a wild goose chase though. I wish I could figure out a way to reproduce it, but because of having to do the hard power off, I don't exactly want to do this a bunch. If it happens any more I'll probably have to disable the exit to standby function in mala, and go back to using my pc power button to go into standby.

I don't suppose the log file would have anything relevant to say about this? I could try to capture some log data if it does. Or do you think it might help to give you my ini file?
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #55 on: October 25, 2008, 12:24:06 am »
I dunno  :dunno

Quote
I would think it's the code that handles the exit (standby) keypress

What makes you think this. What are you seeing when it happens?

What I don't get is why you are only having problems now?

The log should give us some clues.
« Last Edit: October 25, 2008, 12:27:40 am by loadman »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #56 on: October 25, 2008, 12:44:26 am »
What makes me think that is because the initial standby is initiated by the exit key press (I have the exit key configured in mala to initiate standby). So a key press puts it in standby, and then when when the computer turns back on and mala picks up from where it left off, I'm guessing that it still thinks the exit key is being pressed (even though it's not). Of course it's nothing more than a guess.

To be more precise about what I see, when I hit the power button to resume the computer, as soon as the monitor shows something other than black, it is showing the "preparing to go into standby" windows dialog, and then turns off.

I also have no idea why I haven't seen this before. I've seen it about half a dozen times in the last 2 days though. :dizzy:

If the log will help, then I'll make sure it's turned on, and check it whenever this happens again.

Thanks loadman. :cheers:
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

Blanka

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2248
  • Last login:January 25, 2018, 03:19:28 pm
Re: mala crash on resume from standby
« Reply #57 on: October 25, 2008, 02:53:25 am »
Are you using S3 standby instead of S1 standby (BIOS setting?)
S3 works totally different and I can imagine it give big problems with strange resolutions. Even for normal use I have issues with S3 restores. S1 is much better covered in modern software, S3 is more a laptop thing.
On the other way, if you tweak bootup, it can be done in say 15 seconds. I would not want to have my machine being standby all the time eating elektron pills from the net when not in use.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: mala crash on resume from standby
« Reply #58 on: October 25, 2008, 09:06:07 am »
OK I had a look at that section of the code and it could be possible that is causing the problem.

Basically I had a flag set that standby was required but I don't reset it until after I give the standby command.

So It is possble that this is the cause  :dunno   as it is bit of a mystery to me how windows handles standby resumption.

anyway....I have changed it that the flag get reset then the standby command is given.  It couldn't hurt

You will have to wait though as I don't have a stable beta right now for you to test  ;)
« Last Edit: October 25, 2008, 09:09:29 am by loadman »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #59 on: October 25, 2008, 11:58:16 am »
Cool! Hopefully that fixes it. I'll survive if I have to wait! :cheers:
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: mala crash on resume from standby
« Reply #60 on: October 27, 2008, 12:03:29 am »
It happened a couple more times today, and I got the log snippet. Not sure it's helpful, but here it is:

Code: [Select]
2008/10/26  18:21:05.81   Info: **** MaLa Resume from Standby
2008/10/26  18:21:08.15   Info: Screensaver: Win Suspend Request
2008/10/26  18:21:12.64   Info: **** Windows asking to go into Standby
2008/10/26  18:21:28.79   Info: **** MaLa Resume from Standby
2008/10/26  18:21:36.54   Info: Screensaver: Win Suspend Request
2008/10/26  18:21:36.56   Info: **** Windows asking to go into Standby
2008/10/26  18:22:10.79   Info: **** MaLa Resume from Standby
2008/10/26  18:22:12.68   Info: Screensaver: Win Suspend Request
2008/10/26  18:22:12.68   Info: **** Windows asking to go into Standby
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup