Skip to content

Crash on "!explain :3" #17

@Grissess

Description

@Grissess

SpikeBot appears to reliably crash or deadlock when asked to "!explain :3".

Reproduction

The situation can be recreated by doing the following:

  • Start SpikeBot.
  • In any channel SpikeBot is participating in, send "!explain :3" verbatim.

Effect

SpikeBot is unresponsive after this command, and will generally ping timeout within the window given by the IRC server. The last line emitted is the "Positive:" karma description.

Speculation

It is unknown what influence the karma query ":3" has to do with this crash; according to source in modules/karma.js, there should be no difference in handling ":3" and any other string that could possibly be encountered by the karma module. ":3" does not, to my knowledge, have any negative karma, but line 136 should not be an issue in any case, especially since other non-negative karma topics appear elsewhere and do not cause this issue (regression test: find an unknown topic, add one karma, and explain it).

SpikeBot has only had this issue as of late; this corresponds roughly to the time in which RoBot has been able to communicate with SpikeBot. RoBot has been entirely refitted to deal with Unicode entirely (forced to UTF-8; most IRC clients parse this properly). It is unknown how Node.js (and JS in general) deals with Unicode strings, but it is a possible issue. RoBot, however, credits Skype usernames, which should not contain non-ASCII characters; Unicode may, however, be introduced by a user into a comment without restriction.

If this is an avenue of investigation, a search for non-ASCII Unicode glyphs under ":3" (particularly, its negative part, since positive prints) might be warranted. (The implementation of the "store" appears to be delegated to the "json-store" module, whose implementation is unknown.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions