Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[RESOLVED] NVRAM not saved after quiting game with PBX


Mike_da_Spike

Recommended Posts

I've seen this topic multiple times and noticed it with some tables as well.
I must say that most of the times nvram is saved correctly when closing a table, but think I found an issue that causing the nvram file locked and cannot be saved on exit table (through Pinballx)

Background :
I was playing the kiddie challenge from Pinemhi leaderboard.
I was focusing on the nvram file and the pinemhi leaderboard log, because everytime I had the score to beat, it wasn't send to PinemHI leaderboard.
PinemHI leaderboard, reads the nvram when starting a table, grab the hishscore from player 1, when table is closed, it will reads the nvram file again and if the highscore is different , it will send the score to the website.

As I noticed, when having  a normal score (so no highscore was reached), the nvram was saved ad send to the website.
When reaching a personal highscore, and quiting the table via pinballX, the nvram wasn't saved.
I have noticed this before with other tables as well (24 was the first one I noticed).

I could not found the real root cause, but my suspicion is that after closing the table, PinballX wants to read the highscores from the nvram with  PinEmhi.exe
It looks like that Pinballx Is quicker than vpinmame and locks the nvram by the read action. Vpinmame cannot write the file and highscores are not saved.

Renaming the pinemhi.ini_ so, PinballX cannot use pinemhi for reading the nvram, the nvram is saved correctly when having a highscore.
Could it be a timing issue from PBX when reading the nvram that the nvram isn't saved ?

The log file doesn't show any issues 
Here's one where I had a highscore and closing it via PBX doesn't save the nvram

 

log.txt PinballX.ini

Edited by Mike_da_Spike
Resolved
Link to comment
Share on other sites

I'm having an issue that may be related, but slightly different symptoms.  Since enabling @Dna Disturber's leaderboard i am getting occasional rom resets when i go back into a game (after exiting) , 'bookkeeping totals cleared' or something like that messages and i need to exit and go back into the game again, by then nvram has cleared (no high scores, no credits, need to reset volume etc).  But as far as i can tell all my scores were processed successfully by pinemhi  monitor to the online leaderboard.

Not sure if there's a conflict of some sort reading the nvram on game start/exit causing different symptoms for me and Mike. I hadn't seen a non intentional rom reset before.

I'm going to disable the pinemhi leaderboard monitor for now and see if i get another rom reset or not. Will report back in a few days..

Edit - no more rom resets with leaderboard disabled. Would love to have PinballX and the pinemhi leaderboard playing nicely together though.

Edit 2 - Please disregard this post. The rom resets aren't related to nvram not saving via PinballX. I've now had a rom reset with repeated launching of VPX outside PinballX. Looks like a different issue entirely.

Link to comment
Share on other sites

I need to do some captures, but for me it looks like not all the time my nvrams are saved correctly by vpinmame by the exit button in PBX.

When closing a table gracefully by hitting Q and than exit vpx by using the exit button, my nvram written every time

This could be a lag of how visual pinball is handeling an exit as well.

 

Link to comment
Share on other sites

Hi Tom, an example table where the nvram never normally saves for me on exit via PinballX is Jack-Bot (https://vpinball.com/VPBdownloads/jack-bot-williams-1995/) using rom jb_10r

Just testing adding and using credits i can see that nvram is saved ok if i launch and close the table in VPX only, but not via PinballX.

I'm using VPX 10.6, with freezy v1.8 to display on a virtual DMD.

If i disable the external DMD (freezy) in vpinmame the nvram will save ok if i run the table from PinballX, so maybe it's a freezy issue or just a timing thing? :unsure:

Hope that helps and you can reproduce.

Link to comment
Share on other sites

  • 2 weeks later...

Strange... it looks like my issue with Jack-Bot is actually due to the table script.

The script has two Table1_Exit routines;

Sub Table1_Exit(): Controller.Stop:End Sub

Sub Table1_Exit()
	
End Sub

Removed the 2nd block and now nvram saves ok for me when exiting from PinballX. I have no idea why it behaved differently exiting from PinballX than when launched from VPX direct (or why the external DMD affected it) :unsure:

@Mike_da_Spike Does this work for you too?

  • Thanks 1
Link to comment
Share on other sites

Thanks @scutters .
That works for PinBot and JackBot

And think  find the Gremlin in my system.
for some reasons, when PBX closes the tables (or kill it, not sure what method PBX is using), I noticed NVrams didn't save.
I thought it was a PBX timing, but discovered that windows VSS (Volume Shadow copy Service) was trying to access the file as well.
This gave an access denied, and the nvram wasn't saved at all
Event ID 8194 generated a lot on my machine :

image.thumb.png.f95f34dfadba79b46351d1c09e6ebb5a.png

(Sorry for my Dutch events)


I completely stopped VSS on my computer to have a correct save of the nvram
Note: By disabling this feature you’ll also disable System Restore, so keep that in mind.

Here's a quick tutorial to stop VSS if you encounter the same issue :

  • Press Windows Key + S and enter advanced system. Now select View advanced system settings.

advanced-system-settings-2.png.bc0cfedcb060a69564dbbe96a172525b.png

  • Navigate to the System Protection tab and select the drive that has protection enabled. Click the Configure button.

system-protection.png.6e0bb40ce5840f88a2c97f4a0fdf6668.png

  • Select Disable system protection. Now click Apply and OK to save changes.

disable-system-protection.png.5bb40865b9229903b555784d8a7f09ce.png

Note: By disabling this feature you’ll also disable System Restore, so keep that in mind.

Alternatively, you can disable Volume Shadow Copy service by doing the following:

  • Press Windows Key + R. Enter services.msc and press Enter or click OK.

services-1.png.f241aa3d0676d8aa93ddb1380bb481aa.png

  • Locate the Volume Shadow Copy and double-click it.

volume-shadow-copy.png.1e489c58716d1fa2ace8b47b07968945.png

  • Set the Startup type to Disabled. If the service is running, click the Stop button to disable it. Lastly, click Apply and OK to save changes.

startup-type-disabled.png.f257dc9ed35a384e207a172dddec8581.png

 

Note: By disabling this feature you’ll also disable System Restore, so keep that in mind.

  • Like 1
Link to comment
Share on other sites

  • Mike_da_Spike changed the title to [RESOLVED] NVRAM not saved after quiting game with PBX
2 hours ago, Tom Speirs said:

Hey guys,

Does not sound like a perfect solution. I wonder if there is anything I can do?

I dont think you can help Tom, or you need to fix VSS for Microsoft :P

I first thought that PinballX was causing this issues,by closing/terminating vpx and pinmame.

But after many hours/weeks searching,  it was caused by VSS. Maybe also because I have a backup util running that will backup all files to my NAS. 

Link to comment
Share on other sites

Hi Tom, 

I think i'm good now thanks. My first issue with roms resets was unrelated (that was the leaderboard program locking the nvram and causing an issue with pinmame, dna disturber has addressed that). The 2nd issue with nvram not saving on exit from PinballX for jackbot and pinbot turned out to be a table script problem.  I've not had issues with other tables or VSS like Mike , so i guess that is backup related like he suggests.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...