mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

Capturing Media sometimes causes PinY to not return to fully interactive table selections #111

Closed rtl19 closed 4 years ago

rtl19 commented 4 years ago

While in Game Setup and Capturing Audio and Video, sometimes when PinY completes the action, it doesn't display the games properly. To put it another way, after going into capturing media and selecting things like Audio: Capture and such, the game starts up fine. The audio is captured successfully. Upon existing, normally PinY returns to the recently captured game and allows you to select next game or previous game as usual. However, sometimes (and more frequently with Beta 19), the picture display is frozen. I'll still see the word 'running' from the captured table and I'll still be able to hit next and previous tables. The sounds of the button presses are heard, but the display doesn't change. The ticker at the bottom, however, does cycle.

I've noticed this more frequently with Beta 19, but it also happened periodically with Beta 18. The first table capture I do behaves as normal...after the 2nd or 3rd on is when the problem creeps in.

My media capture settings are as follow: `Capture.PlayfieldImage.Start = auto

Capture.PlayfieldVideo.Start = auto Capture.PlayfieldVideo.Stop = auto Capture.PlayfieldVideo.Time = 31

Capture.PlayfieldAudio.Start = auto Capture.PlayfieldAudio.Stop = auto Capture.PlayfieldAudio.Time = 32

Capture.BackglassImage.Start = auto

Capture.BackglassVideo.Start = manual Capture.BackglassVideo.Stop = auto Capture.BackglassVideo.Time = 33

Capture.DMDImage.Start = auto

Capture.DMDVideo.Start = auto Capture.DMDVideo.Stop = auto Capture.DMDVideo.Time = 34`

And my LAST capture reponses used: Capture.DMDVideo.LastMode = skip Capture.PlayfieldAudio.LastMode = capture Capture.PlayfieldVideo.LastMode = skip Capture.PlayfieldImage.LastMode = keep Capture.DMDImage.LastMode = capture Capture.BackglassVideo.LastMode = skip Capture.BackglassImage.LastMode = keep

Expected behavior I expect the PinY table selector to work as normal without freezing on the recently captured game.

Windows version Windows 10 - latest patch level

mjrgh commented 4 years ago

Let me know if you can figure out any pattern to it. I haven't been able to reproduce this myself, so it might be something configuration-specific, or some particular thing you're doing that I haven't tried. If you can spot the pattern to it, that might help - I probably won't be able to do much about it in the meantime.

rtl19 commented 4 years ago

Understood. This will probably take a few tries to get you something useful. I was, however, successful in getting it to reproduce relatively quickly. I don't know if it will always be this way.

First reproduction steps:

  1. Booted up Cap

  2. Launched PinY

  3. Advanced to the first game without an audio sample (which took about 5 right clicks). This table was VPX (as opposed to vpt)

  4. Went into Game Setup and then Edit Details

  5. Slight tweak to name

  6. Exited Edit Details

  7. Chose Capture Audio and Video

  8. Capture mode: Game loaded

  9. Capture mode: Waiting

  10. I pressed coin slot to give credits

  11. Capture mode: Game started

  12. Capture mode: Audio capture started

  13. I played a few balls to generate sound

  14. Capture mode: audio capture ended

  15. Capture mode: Menu displayed to resume or terminate game. I noticed this menu display kinda twice - like a flicker I chose to terminate game. That was the last visible response that I could control.

  16. Screen frozoen. Left and right selection button presses make sound but nothing moves. The ticker is still cycling, however. Text on screen is double printed along with the 'Exiting ...' text.

  17. Ctrl-Alt-Delete, then task manager, then kill PinY process. I'm attaching a screen picture of what I saw at the end. PinYFrozen

Second attempt after reloading PinY was the same steps. However, I happened to choose a vp9 table to capture audio. It went fine. I don't know if this was coincidence.

Third attempt was another vpx table. Locked up again after capture. I should mention the audio is captured successfully each time.

Fourth attempt was a fresh load of PinY and same vpx table as the first attempt. It froze.

mjrgh commented 4 years ago

If you have time to experiment, you might try going back to an earlier version (start with Beta 17, say) to check more methodically whether or not you can get the same behavior. If you can pinpoint the exact version where this started, that might offer another way to track it down.

Also, a question: when you say PinballY "froze", do you really mean it "froze" in the sense that the process is completely unresponsive? It doesn't sound to me like it is, since you said you were able to see the wheel switch games on Next/Previous. Some other things to try in that state:

rtl19 commented 4 years ago

I'll try to get to it sometime this evening. In answer to your questions:

mjrgh commented 4 years ago

How about the right-click and menu button behavior?

rtl19 commented 4 years ago

How about the right-click and menu button behavior?

There is no menu that displays but hitting buttons makes a sound. Right clicking doesn't do anything either.

mjrgh commented 4 years ago

How about:

rtl19 commented 4 years ago

How about:

* Escape - Right - Escape (for Exit Menu, Next, Exit PinballY)

Doesn't appear to do anything except make sounds.

* Start - Start (for Main Menu, Play)

Doesn't appear to do anything except make sounds

* Alt+F4 (for Exit Program)

Eventually exits. I say eventually because my keyboard has an Fn button that I have to hold down in addition to the F4 and I'm not sure if I hit the 4 before it became F4. However, something here did exit PinY

mjrgh commented 4 years ago

Try turning on Game Launch and Media Capture logging in the options (Log File page). Then get it into the wedged state and use Alt+F4 to exit. That'll do a clean exit, so it'll close out the log file properly. Let's see what the log file thinks about the launch/capture process, particularly:

rtl19 commented 4 years ago

Right clicking in the window worked for me this time. I was able to close cleanly that way. Alt-F4 didn't work for some reason. I'm attaching the log. PinballY.log

mjrgh commented 4 years ago

It looks like you're using some Javascript - have you tried disabling that? That might explain why it only happens on your machine and not mine.

mjrgh commented 4 years ago

By the way, what I've been trying to determine from all of these tests is if the program is actually wedged. It doesn't look like it is - it appears to respond to all inputs correctly. What it looks like is that you've just got the loading screen stuck in front, so it looks like nothing's happening, but I'm guessing that everything is actually operating pretty normally apart from that. So maybe you're putting up a custom loading screen in Javascript and not removing it?

rtl19 commented 4 years ago

I'll have to try that tomorrow. The javascript is the snippet of code you gave me for filtering on tables that are missing the table files. https://www.vpforums.org/index.php?showtopic=40679&p=440762

rtl19 commented 4 years ago

By the way, what I've been trying to determine from all of these tests is if the program is actually wedged. It doesn't look like it is - it appears to respond to all inputs correctly. What it looks like is that you've just got the loading screen stuck in front, so it looks like nothing's happening, but I'm guessing that everything is actually operating pretty normally apart from that. So maybe you're putting up a custom loading screen in Javascript and not removing it?

I don't have any custom loading screens that I'm aware of. As mentioned in my previous comment which you haven't seen yet :), the javascript is just for a new custom filter.

I'm not sure I agree that it's behaving normally under the covers because it's not actually launching any games or exiting by do the click right, esc, type steps. I wonder if it'd be possible to have a different sound for game launch. I'm sure there is already a way so I'll look into putting in a different sound bite for game launch only. At least that way I can say it's getting to that part of the now invisible menu. (Just spitballing)

rtl19 commented 4 years ago

So I removed the custom main.js which contained the filter code and it made no difference. One thing I keep observing which I think is relevent...When the audio and dmd capture is done, it normally displays a mini-menu with options like 'Resume', 'Terminate', etc. I noticed this menu displays kinda twice. Once immediately after the game ends, and then it displays like half a second later again. I choose terminate and then the screen is "frozen".

Interestingly, when that little menu displays the quick first time, it shows the static playfield image, then when it displays a second time, it again shows the static playfield image again but at a slightly different location. I think it's this that is causing the "phantom of the opera" wheel to be displayed twice. That is shown in the attached picture from above. Right clicking in the window IS working.

mjrgh commented 4 years ago

Okay, thanks for the trying the js test - that rules that out at least.

I think the best bet is going to be identifying the exact version where this started, and then try rolling back changes until we identify the culprit. Let me know if you have a chance to try the earlier versions. The goal is to find the last version where this didn't happen - presumably some change made between that version and the next version must be the cause. If you can identify the transition point with certainty, I can be systematic about rolling back changes until we find it. Since it seems to be a somewhat sporadic issue, you'll want to make sure to observe a sufficiently large number of successful runs in a row (without the bug appearing) to be confident that it's not going to happen at all.

rtl19 commented 4 years ago

Goodish news. I rolled back to beta 16 and went forward.

Beta 16 - No freezes - attempted 7 times Beta 17 - No freezes - attempted 5 times Beta 18 - Freeze on the first try

All versions did display the terminate, resume menu twice in quick succession. I mention this because I was previously putting forth the theory it was related. Now I don't think it is.

mjrgh commented 4 years ago

Great - thanks for trying it. So it sounds like it's a change between 17 and 18. I'll look at that to see if I can spot anything that might be causing it. If I might suggest, you might want to run 17 for the time being, so that you're using it routinely. The more you can use it without seeing the problem appear, the more it'll increase confidence that that really is where the problematic change is.

rtl19 commented 4 years ago

Ok. I'll plan to put 17 back on my cab. If there is anything else I can help with, let me know. I'll be glad to put a version on there that captures more info if you feel that would help.

mjrgh commented 4 years ago

I have something for you to try. This is based on the Beta 19, so you should go back to that (hopefully you still have it installed separately - if not, sorry for making you jump through all of the install hoops!). Just copy the PinballY.exe from the appropriate ZIP below over your existing Beta 19 PinballY.exe.

http://mjrnet.org/pinscape/downloads/PinballY/PinballY_Beta19_test1_x86.zip (32-bit) http://mjrnet.org/pinscape/downloads/PinballY/PinballY_Beta19_test1_x64.zip (64-bit)

I reviewed the changes between 17 and 18, and found a couple that seem like they could be responsible for the problem. We'll try one thing at a time, so we can pinpoint the exact change. This is the first attempt - it's the one that looks most likely responsible to me, so hopefully it'll do the trick, but if it doesn't change anything I'll do another build with the next change rolled back. Eventually we'll find it. When you have a chance to try it, let me know what you find.

rtl19 commented 4 years ago

Happy to help. I'll get this installed directly.

rtl19 commented 4 years ago

Good news... after about 8 attempts, I couldn't get it to freeze.

mjrgh commented 4 years ago

Hooray! I'll carry that fix forward into the next beta, then, and hopefully we can consider it fixed at that point. Keep an eye on it in the meantime and let me know if it comes back.

rtl19 commented 4 years ago

Just a quick update... so far so good. No freezes. I've done captures on about 5 new tables.

Sidebar...is there a way to filter on tables that need media? (ie: show tables needing a backglass image, or show tables needing audio, etc)

mjrgh commented 4 years ago

Great - looks promising that this really fixed it.

If you want to get a list of tables that need particular media, one way would to be to set up a batch capture for that media type only, with "Missing Only" selected, and then view the list of tables in the last step before the capture (you can cancel at that point if you just wanted the list). Another way would be to set up a custom Javascript filter that selects games without media of the given type. The selection rule in the filter would look something like:

game.resolveMedia("bg video", true).length == 0

See these help sections for more on that:

rtl19 commented 4 years ago

I went the batch capture route and it worked great. Thanks!

mjrgh commented 4 years ago

The changes with the fix are in the Beta 20, so I'm going to close this out. Let me know if it recurs at any point.