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

A new map crashing scm-extractor #12

Open
alexpineda opened this issue Jan 5, 2022 · 1 comment
Open

A new map crashing scm-extractor #12

alexpineda opened this issue Jan 5, 2022 · 1 comment

Comments

@alexpineda
Copy link

alexpineda commented Jan 5, 2022

https://cdn.discordapp.com/attachments/891299308597571654/927193061367373884/2Laputa_1.1.scx

replay with the map: https://cdn.discordapp.com/attachments/891299308597571654/927193061598064671/TvZBest_Replay.rep

Test:

test('extracts Laputa', function(t) {
  const e = createExtractor()

  fs.createReadStream(__dirname + '/laputa.scx').pipe(e).pipe(concat(function(data) {
  })).on('error', function(err) {
    t.fail('extracting error: ' + err)
  })
})

Error message:

node:events:385
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. (<ref *1> ScmExtractor {
  _readableState: ReadableState {
    objectMode: false,
    highWaterMark: 16384,
    buffer: BufferList { head: null, tail: null, length: 0 },
    length: 0,
    pipes: [ [ConcatStream] ],
    flowing: true,
    ended: false,
    endEmitted: false,
    reading: true,
....
@neivv
Copy link
Collaborator

neivv commented Jan 5, 2022

Thanks for reporting this issue!

I updated scm-extractor to fix handling for some of the tricks this map is using, but
one thing that still makes it fail is that the map stores scenario.chk with locale
1033 (Same as Issue #8).

As this makes the map not load when using any of the non-English 1.16.1-compatible languages
(French/Italian/German/Spanish), even in current SC:R patch, it would be semi-acceptable IMO to
consider these kinds of maps something StarCraft doesn't fully support either.

But I guess we have to end up supporting this in the long run if any popular maps do this kind
of locale trick, so leaving the issue open for now.

In practice, if I can get ShieldBattery patched to work with these maps regardless of user language,
having scm-extractor accept this unconditionally would probably be fine as well. Alternatively extending
scm-extractor's API to include parameter for supporting these maps / adding a way to ask the
extractor if the map only works on certain locale would work too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants