Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ Mush 5 crashed during loading script
Mush 5 crashed during loading script
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Zhenzh
China (68 posts) 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? | Top |
|
Posted by
| Nick Gammon
Australia (23,163 posts) 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 | Top |
|
Posted by
| Zhenzh
China (68 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,163 posts) 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 | Top |
|
Posted by
| Zhenzh
China (68 posts) 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. | Top |
|
Posted by
| Zhenzh
China (68 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,163 posts) 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 | 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.
19,905 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top