kel-z/HSR-Scanner

[bug] Character wrongly assigned in output json

Closed this issue · 7 comments

When scanning characters, the json will sometimes include the same character key twice.
This results in the recommended websites not including specific characters because the wrong name has been assigned to them.

HSRScanData_20240202_211630.json

        {
            "key": "Seele",
            "level": 80,
            "ascension": 6,
            "eidolon": 3,
            "skills": {
                "basic": 1,
                "skill": 1,
                "ult": 1,
                "talent": 6
            },
            "traces": {
                "ability_1": true,
                "ability_2": false,
                "ability_3": true,
                "stat_1": true,
                "stat_2": false,
                "stat_3": false,
                "stat_4": false,
                "stat_5": false,
                "stat_6": true,
                "stat_7": false,
                "stat_8": true,
                "stat_9": false,
                "stat_10": false
            }
        },
        ...
        {
            "key": "Seele",
            "level": 80,
            "ascension": 6,
            "eidolon": 2,
            "skills": {
                "basic": 6,
                "skill": 10,
                "ult": 10,
                "talent": 10
            },
            "traces": {
                "ability_1": true,
                "ability_2": true,
                "ability_3": true,
                "stat_1": true,
                "stat_2": true,
                "stat_3": true,
                "stat_4": true,
                "stat_5": true,
                "stat_6": true,
                "stat_7": true,
                "stat_8": true,
                "stat_9": true,
                "stat_10": true
            }
        },

Logs:

[20:42:07] > Starting scan...
[20:42:07] > Scanning light cones...
[20:42:13] > Quantity: 162/1500.
[20:43:21] > Finished scanning light cones.
[20:43:21] > Scanning relics...
[20:43:27] > Quantity: 1073/1500.
[20:50:12] > Reached minimum rarity filter (got rarity 4).
[20:50:14] > Finished scanning relics.
[20:50:14] > Scanning characters...
[20:50:17] > Character total: 32/41.
[20:52:51] > Finished scanning characters.
[20:52:51] > Starting OCR process. Please wait...
[21:16:02] > Bronya: Failed to parse 'basic' level. Setting to 1.
[21:16:02] > Sushang: Failed to parse 'basic' level. Got '/' instead. Setting to 1.
[21:16:03] > Guinaifen: Failed to parse 'basic' level. Got '/' instead. Setting to 1.
[21:16:03] > Qingque: Failed to parse 'basic' level. Setting to 1.
[21:16:03] > Seele: Failed to parse 'basic' level. Setting to 1.
[21:16:03] > Welt: Failed to parse 'basic' level. Setting to 1.
[21:16:04] > Silver Wolf: Failed to parse 'basic' level. Setting to 1.
[21:16:06] > Guinaifen: Failed to parse 'skill' level. Got '42' instead. Setting to 1.
[21:16:06] > Seele: Failed to parse 'skill' level. Got '42' instead. Setting to 1.
[21:16:06] > Welt: Failed to parse 'skill' level. Got '2' instead. Setting to 1.
[21:16:07] > Clara: Failed to parse 'skill' level. Got '/12' instead. Setting to 1.
[21:16:07] > Sushang: Failed to parse 'skill' level. Setting to 1.
[21:16:07] > Bronya: Failed to parse 'skill' level. Setting to 1.
[21:16:09] > Qingque: Failed to parse 'skill' level. Setting to 1.
[21:16:10] > Sushang: Failed to parse 'ult' level. Got '141 1' instead. Setting to 1.
[21:16:10] > Silver Wolf: Failed to parse 'skill' level. Setting to 1.
[21:16:12] > Welt: Failed to parse 'ult' level. Setting to 1.
[21:16:13] > Bronya: Failed to parse 'ult' level. Setting to 1.
[21:16:14] > Asta: Failed to parse 'basic' level. Got '44' instead. Setting to 1.
[21:16:16] > Pela: Failed to parse 'basic' level. Got '/' instead. Setting to 1.
[21:16:16] > Silver Wolf: Failed to parse 'ult' level. Setting to 1.
[21:16:17] > Fu Xuan: Failed to parse 'basic' level. Setting to 1.
[21:16:17] > Guinaifen: Failed to parse 'talent' level. Setting to 1.
[21:16:17] > Asta: Failed to parse 'skill' level. Got '44' instead. Setting to 1.
[21:16:18] > Qingque: Failed to parse 'talent' level. Got '/' instead. Setting to 1.
[21:16:18] > Natasha: Failed to parse 'basic' level. Setting to 1.
[21:16:21] > Silver Wolf: Failed to parse 'talent' level. Setting to 1.
[21:16:22] > Fu Xuan: Failed to parse 'skill' level. Setting to 1.
[21:16:22] > Asta: Failed to parse 'ult' level. Setting to 1.
[21:16:23] > Pela: Failed to parse 'ult' level. Setting to 1.
[21:16:23] > Fu Xuan: Failed to parse 'basic' level. Setting to 1.
[21:16:25] > Serval: Failed to parse 'basic' level. Setting to 1.
[21:16:25] > Pela: Failed to parse 'talent' level. Got '1' instead. Setting to 1.
[21:16:27] > Fu Xuan: Failed to parse 'skill' level. Setting to 1.
[21:16:27] > Bailu: Failed to parse 'basic' level. Setting to 1.
[21:16:27] > Serval: Failed to parse 'skill' level. Setting to 1.
[21:16:28] > Natasha: Failed to parse 'talent' level. Setting to 1.
[21:16:29] > Bailu: Failed to parse 'skill' level. Setting to 1.
[21:16:29] > Serval: Failed to parse 'ult' level. Setting to 1.
[21:16:30] > Bailu: Failed to parse 'ult' level. Setting to 1.
[21:16:30] > Serval: Failed to parse 'talent' level. Got '/' instead. Setting to 1.
[21:16:31] > Creating accompanying export in SRO format...
[21:16:31] > Scan complete. Data saved to D:/Users/light/Documents/StarRailData

The behaviour between sites also seem to differ here, but I'm not certain how relevant that is to this issue. Noting here primarily so it's logged somewhere.

  • Fribbels HSR Optimizer
    image

  • Relic Harmonizer
    image

The Inventory Viewer does not check for duplicate characters and simply shows all of them:
image

Please let me know if there's any additional information you'd like, or if you want me to perform additional runs.

A similar bug has happened other people in the past but I haven't been able to track down the cause of this.

Does the same thing happen when you try a character scan again? With what window resolution?

Window resolution is 1920x1080. Issue persists:

image

HSRScanData_20240202_222007.json

Hmm, I know this is a tall ask but it would be very helpful for me to figure out what's going on (I can't replicate it on my machine) -- are you able to screen record your HSR window while it does the character scan and share it with me?

Unfortunately, my laptop is rather underpowered. I cannot run this while streaming/recording. What came to mind as a potential issue was loading times, however since as far as I can tell the screenshots are not stored on disk, I could not look at those to find out.

No worries. I'll definitely add an option to save screenshots to disk for debugging. In the meantime, it could be because your game is rendering too slowly. You can try adding a few hundred milliseconds of delay to scanning speed in the configure tab, and see if that fixes it?

Setting the scan speed delay to +300ms does not seem to resolve the issue.

image

HSRScanData_20240203_001510.json

Adjusted to +800ms and it produced the expected output. It's still a bit weird, since the patterns I saw with which character was duplicated appeared random. With the new debug mode however, this should be easier to troubleshoot in the future.

HSRScanData_20240203_195942.json