Weird CC crash

customcommands
crash
error
bug

#1

PhantomBot Version: 2.3.9.1
OS Version: Ubuntu Server 16.04

Java Version: 1.8.0_131
Browser and Version (for Panel Support):
Stock PhantomBot: Yes (Yes if you have not modified the scripts or Java Core)
Any Recent Changes to Your System: No

Description of Issue:

Bot attempts to load, then when loading up the customCommands.js module:

[11-01-2017 @ 03:50:01.104 GMT] Loaded module: discord/games/gambling.js (Disabled)
[11-01-2017 @ 03:50:01.222 GMT] [ERROR] [loadScript()@ScriptManager.java:44] Failed to load module: init.js: RangeError: Inappropriate array length. (customCommands.js#623)
[11-01-2017 @ 03:50:01.223 GMT] [ERROR] [loadScript()@ScriptManager.java:49] Terminating PhantomBot due to Bad JavaScript File

after which the bot immediately exits. I updated to latest version, and also attempted a clean reinstall on the advice of Zelakto. Even still, the issue persists.


#2

When you say you did a “clean install” did that include a brand new phantombot.db file? Like one generated through the bot console.

This is (i think) line # 623:
customCommands[commands[i]] = $.inidb.get('command', commands[i]);

Firefox documentation suggests the array is either negative in size, or it’s above max size (thus making it negative).

Not really sure how this would be caused unless the array didn’t get initialized, but then it should be null?


#3

No, no clean phantombot.db file. Will test now


#4

Let the bot generate a new DB, starts up fine, move the real DB back, and the failure comes back.


#5

Alright so it’s an error in your database file then.

I don’t use linux so I don’t know what tool you can use, but you need a SQL editor. There’s one for windows call DB Browser for SQLite that works fine. If it can be ran in wine, great. If there’s an alternative, even better.

What I’d like you to do is post a screenshot of the data within the “phantombot_command” table.

It’d probably look a bit like this:
sql example

Feel free to censor anything you don’t want seen.


#6

Send me your DB in a private message please.

Thanks.


#7

Fixed in the latest version, was talked about in Discord.

More about it here.


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.