Skip to content

Joker solver crashes #156

@edderiofer

Description

@edderiofer

Just thought I should document this bug here. It's been known for a while now, but I only noticed last week that it's also affecting the site itself (not just my local testing instance).

This bug affects just about every variant that uses a joker in some way:

  • American
  • Vietnamese
  • Bloody 30-Faan Jokers
  • Malaysian
  • Sakicards
  • and probably a bunch more.

Specifically, whenever a player would win with a joker in hand, the joker solver is called. (Note that it is perfectly possible for a player to win in these variants without jokers.) However, during this process, the joker solver often crashes. Sometimes, it's because the joker solver appears to be fed a nil tile (not sure why, haven't been able to reliably reproduce this version of the error). Other times, the joker solver crashes right at the final get-value step.

This appears to be a bug (or multiple bugs?) in the Elixir parts of the code (more specifically, probably in smt.ex), and my knowledge of Elixir is insufficient to further diagnose the issue or fix it.


Weirdly, this bug does NOT affect the following variant(s), which do use jokers:

  • Riichi with aka/ao/kindora (the dora tiles are aliased to their regular counterparts, but this doesn't appear to call the joker solver)

and it affects the following variants, but ONLY in my local testing instance and not on the site itself:

  • Galaxy Mahjong
  • Shouhai
  • Golden Chun (the Golden Chun is either a standard chun, or it's a joker for any 5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions