Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] King Kong high scores not parsed correctly #697

Open
gorgatron1 opened this issue Jan 5, 2025 · 8 comments
Open

[Bug] King Kong high scores not parsed correctly #697

gorgatron1 opened this issue Jan 5, 2025 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@gorgatron1
Copy link

Describe the bug

King Kong high scores not parsed correctly -- shows ) in VPin Studio.

To Reproduce

Table: https://www.vpforums.org/index.php?app=downloads&showfile=15118 (King Kong - Data East)

Here is the nvram file:

kiko_a10.nv.zip

it shows like this in VPin Studio:

image

but pinemhi looks reasonable:

image
@syd711
Copy link
Owner

syd711 commented Jan 5, 2025

Odd, it also looks good on my end.
Does it look broken when working with the Studio client on the cabinet (Windows then) too?
If it looks good there too, can you attach the log file of the macOS client here? I assume it is related to the system encoding then which is logged on startup.

@syd711 syd711 changed the title King Kong high scores not parsed correctly [Bug] King Kong high scores not parsed correctly Jan 5, 2025
@syd711 syd711 self-assigned this Jan 5, 2025
@syd711 syd711 added bug Something isn't working wait-for-user-feedback labels Jan 5, 2025
@gorgatron1
Copy link
Author

Yes, looks broken on the windows studio client as well. Here are the logs from the server side regarding reading these scores:

05-01 17:26:29.710 INFO  [/api/v1/games/scanscore/927]d.m.v.r.u.SystemCommandExecutor - System Command: D:\vpx\VPin-Studio\.\resources\pinemhi> cmd.exe /c PINemHi.exe kiko_a10.nv
05-01 17:26:29.775 INFO  [/api/v1/games/scanscore/927]d.m.v.s.h.p.n.NvRamOutputToScoreTextConverter - Converted score using NewLineAfterFirstScoreAdapter
05-01 17:26:29.776 INFO  [/api/v1/games/scanscore/927]d.m.v.s.h.HighscoreService - Skipped highscore change event for "kiko_a10" because there was no score change for rom 'King Kong (Data East 1990) 1.03 Grimm VR' detected.
05-01 17:26:29.821 INFO  [/api/v1/cards/preview/927/13]d.m.v.s.h.p.ScoreListFactory - Failed to parse highscore string 'AK    3)032)500', ignoring segment 'AK    3)032)500'
05-01 17:26:29.821 INFO  [/api/v1/cards/preview/927/13]d.m.v.s.h.p.ScoreListFactory - Failed to parse highscore string '3)032)500', ignoring segment '3)032)500'
05-01 17:26:29.822 INFO  [FX Card Generator Thread for King Kong (Data East 1990) 1.03 Grimm VR]d.m.v.s.h.c.CardService - Skipped card generation for "King Kong (Data East 1990) 1.03 Grimm VR", no scores found.
05-01 17:26:29.854 INFO  [/api/v1/games/scores/927]d.m.v.s.h.p.ScoreListFactory - Failed to parse highscore string 'AK    3)032)500', ignoring segment 'AK    3)032)500'
05-01 17:26:29.855 INFO  [/api/v1/games/scores/927]d.m.v.s.h.p.ScoreListFactory - Failed to parse highscore string '3)032)500', ignoring segment '3)032)500'
05-01 17:26:29.861 ERROR [/api/v1/games/scorehistory/927]d.m.v.s.h.p.ScoreListFactory - Failed to parse highscore: Index 1 out of bounds for length 1
Raw Data:
==================================
HIGHEST SCORES

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at java.base/java.util.Arrays$ArrayList.get(Unknown Source)
	at de.mephisto.vpin.server.highscores.parsing.ScoreListFactory.create(ScoreListFactory.java:53)
	at de.mephisto.vpin.server.highscores.parsing.HighscoreParsingService.parseScores(HighscoreParsingService.java:49)
	at de.mephisto.vpin.server.highscores.HighscoreService.parseScores(HighscoreService.java:148)
	at de.mephisto.vpin.server.highscores.HighscoreService.getScoreSummary(HighscoreService.java:338)
	at de.mephisto.vpin.server.highscores.HighscoreService.getScoresBetween(HighscoreService.java:224)
	at de.mephisto.vpin.server.highscores.HighscoreService.getScoreHistory(HighscoreService.java:214)
	at de.mephisto.vpin.server.games.GameService.getScoreHistory(GameService.java:251)
	at de.mephisto.vpin.server.games.GamesResource.getScoreHistory(GamesResource.java:144)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at de.mephisto.vpin.server.ShutdownResetFilter.doFilter(ShutdownResetFilter.java:30)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Unknown Source)
05-01 17:26:29.862 WARN  [/api/v1/games/scorehistory/927]d.m.v.s.h.HighscoreService - Failed to create score history summary for version with id '4417', may happen because of older unsupported formats.

I was going to try and reset the nvram but the button is disabled:

image

I wonder if this is because the table has an NVOffset of 1 (there is another table with the same nvram)?

I manually copied in the reset nvram and still see the same issue with the ):

image

@gorgatron1
Copy link
Author

(screenshots from macOS client but looks identical on the windows client on the cabinet machine)

@gorgatron1
Copy link
Author

I removed the other table that used kiko_a10 and removed the NVOffset line from King Kong (just in case it made any difference) but it still behaves the same: ) in the scores and the reset button is disabled (both server and client were also restarted).

@syd711
Copy link
Owner

syd711 commented Jan 6, 2025

Can you paste the screenshot of this Windows setting:

https://github.com/syd711/vpin-studio/wiki/Troubleshooting#i-got-encoding-problems-on-my-highscore-cards

@gorgatron1
Copy link
Author

image

This is the default setting for English (United States).

@gorgatron1
Copy link
Author

Some scores are formatted with #1 ... instead of 1), but here is a game that uses ) and it parses fine:

image

@syd711
Copy link
Owner

syd711 commented Jan 9, 2025

It seems to be a localization issue. By accident I noticed that the same error occurs on our github tests (which only tested if there are entries, not the actual formatting). So I have finally a reproducer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants