[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Mush 5 crashed during loading script
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Mush 5 crashed during loading script

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Posted by Zhenzh   China  (44 posts)  [Biography] bio
Date Tue 12 Jun 2018 05:52 PM (UTC)
Message
My mush 5.06-pre sometimes may get crashed during loading script files with unknown reason.
It does not occur every time. Is there any log for mush itself can be used to isolate the issue?
[Go to top] top

Posted by Nick Gammon   Australia  (21,677 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 12 Jun 2018 10:07 PM (UTC)
Message
Which pre-release do you have? The latest? Some of the earlier ones fixed some crashes.

However there is no log file. Try to narrow the problem down by removing some plugins until the problem goes away and gradually adding them back.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Zhenzh   China  (44 posts)  [Biography] bio
Date Reply #2 on Wed 13 Jun 2018 08:11 AM (UTC)
Message
I used the pre-release committed on Mar 24, 2018
No plugin was used in my environment.

I plan to use the latest pre-release. But I don't find any fix for crash during loading script committed after Mar 24, 2018.
[Go to top] top

Posted by Nick Gammon   Australia  (21,677 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 14 Jun 2018 05:07 AM (UTC)
Message
Well in that case, what is in the script?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Zhenzh   China  (44 posts)  [Biography] bio
Date Reply #4 on Thu 14 Jun 2018 01:54 PM (UTC)

Amended on Thu 14 Jun 2018 02:01 PM (UTC) by Zhenzh

Message
The script is an auto job robot I wrote for the MUD.
What it dose is just load a sqlite3 db for generating gps map.

Quote:

conn=assert(sqlite3.open(GetInfo(67).."JHL/map.db"))

for rooms in conn:nrows("select rowid,name,desc,exits,escroom,zone,escroom,npcs,items,links from rooms") do
map[tostring(rooms["rowid"])] = {
name = rooms["name"],
zone = rooms["zone"]
}
if rooms["desc"] and rooms["desc"] ~= "" then
map[tostring(rooms["rowid"])].desc = rooms["desc"]
end
if rooms["exits"] and string.find(rooms["exits"], ",") then
dynamic_exit_rooms[tostring(rooms["rowid"])] = utils.split(rooms["exits"], ",")
else
if (rooms["desc"] and rooms["desc"] ~= "") or (rooms["exits"] and rooms["exits"] ~= "") then
map[tostring(rooms["rowid"])].exits = rooms["exits"]
end
end
if rooms["escroom"] and rooms["escroom"] ~= "" then
map[tostring(rooms["rowid"])].escroom = rooms["escroom"]
end
if rooms["npcs"] and rooms["npcs"] ~= "" then
map[tostring(rooms["rowid"])].npcs = rooms["npcs"]
end
if rooms["items"] and rooms["items"] ~= "" then
map[tostring(rooms["rowid"])].items = rooms["items"]
end
map[tostring(rooms["rowid"])].links = stringEx.totable(rooms["links"])
end



But I don't think it is the root cause of mush crash as the robot works fine in moste cases. The gps section has been successfully loaded again and again.

It's do hard to isolate the crash issue as I'm not sure whether the crash is caused by some script bug or mush bug.

It may be helpful if there is any way to get crash dump at the point of time failure occur.
[Go to top] top

Posted by Zhenzh   China  (44 posts)  [Biography] bio
Date Reply #5 on Mon 18 Jun 2018 02:01 PM (UTC)
Message
After investigating crash cases I have had in the past, I think the root case may point to the sqlite3 db loading script I posted above.

I have 3300+ rooms with 10+ fields each room recorded in the db. And some fields may call sub loops also.

The map generation is such a large loop operation so that MUSH may get a computing peak at the point of time when loading script, which may lead to a crash.

I'm not sure wheter the crash is caused by mush of windows itself. Will keep on monitoring the issue.

I'll try shrinking db to double check whether the cause of crash is related to the size of db.
[Go to top] top

Posted by Nick Gammon   Australia  (21,677 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Tue 19 Jun 2018 06:10 AM (UTC)
Message
Possibly you have some sort of recursion issue where you loop and use all the stack? Perhaps put some debugging prints into the script to try to isolate what it is doing at the time (eg. after loading every 500 rooms).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


181 views.

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]