Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Hennes
Newbie


Joined: 25 Mar 2012
Posts: 5

PostPosted: Sun Mar 25, 2012 5:06 pm   

Fix Cmud map (with ReedN's cmud_map_doctor? )
 
Brief version:

Cmud seems to crash every dozen rooms when I used the mapper.
Old forum posts seems to indicate I need ReedN's cmud_map_doctor.

I googled for it but somehow I can't find it.
Can somebody point me at the download link or tell me how to fix this without deleting the map and restarting?




Long version:

I have an old map created in zmud. It worked more or less. Every time I started zmud a few random rooms got one way exits, but that was easy to fix. It got boring though to do this every time zmud got restarted. Now and then zmud would crash with a read from 0x0....4, but as long as I only used zmud for mapping and not for combat area's that was manageable.


When I got a new computer I decided to upgrade. I bought cmud v2.37 and imported the old map.
Occasionally there was still a random room with a one way exit.
Occasionally the program would crash with an illegal read from address 0x00000004
I made screenshots of the maps and went back to tinyfugue as main client.

Last Thursday I installed cmud 3.34 with the old map.
The new cmud seems to work a lot better. Auto configuration of the mapper worked.
Importing the old map was easy. (I struggled with the import from zmud to cmud2).

I spent a hours creating a map of Velana. (This is a 300x300 realm on elephant mud),
All day long cmud did NOT crash. It mapped neautifully.

Today I continued mapping but cmud crashed with 'SQL Error: PRIMARY KEY must be unique.'

Restarting cmud did not help.

Deleting recently mapped rooms did not help.

Deleting all rooms with mysterious one way exits did not help.

I downloaed the MapConvert program and tried the repair option.
This resulted in a map file which is slightly smaller (42Mb rather than 43MB), but does not solve the problem.

I tried converting the map to the old zmud format and back.
This did not solve the problem either.


A quick google search yielded a post with almost the same problem:
(http://forums.zuggsoft.com/forums/viewtopic.php?t=35216 ) which suggest to use ReedN's cmud_map_doctor utility on it.

It seems I got a brainfart though. I can't seem to locate that utility.
If someone can point me to a still valid download location, or mail it to me, or tell me how I can fix this I would be very happy.




date/time : 2012-03-25, 18:08:04, 10ms
computer name : CORE
user name : hennes
registered owner : hennes
operating system : Windows 7 x64 Service Pack 1 build 7601
system language : English
system up time : 6 hours 52 minutes
program up time : 55 minutes 8 seconds
processors : 8x Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
physical memory : 15956/18429 MB (free/total)
free disk space : (C:) 52.88 GB
display mode : 1920x1200, 32 bit
process id : $430
allocated memory : 138.19 MB
executable : cMUD.exe
exec. date/time : 2011-04-20 21:20
version : 3.34.0.0
compiled with : BCB 2006/07
madExcept version : 3.0k
data dir : d:\games\cmud\
contact name : Hennes Passmann
contact email : Hennes@stack.nl
callstack crc : $06a99d80, $b81a0810, $b81a0810
exception number : 17
exception class : EZDatabaseError
exception message : SQL Error: PRIMARY KEY must be unique.

Main ($ed8):
009003cd +00e9 cMUD.exe ZAbstractDataset 417 +14 TZAbstractDataset.InternalAddRecord
76f4012e +000a ntdll.dll KiUserExceptionDispatcher
0089a202 +002a cMUD.exe ZDbcStatement 2000 +1 TZEmulatedPreparedStatement.ExecuteUpdate
0089a302 +002a cMUD.exe ZDbcStatement 2040 +1 TZEmulatedPreparedStatement.ExecuteUpdatePrepared
00882364 +014c cMUD.exe ZDbcGenericResolver 776 +26 TZGenericCachedResolver.PostUpdates
008a7fe8 +0038 cMUD.exe ZDbcSqLiteResultSet 853 +1 TZSQLiteCachedResolver.PostUpdates
00883a9c +0018 cMUD.exe ZDbcCachedResultSet 439 +5 TZAbstractCachedResultSet.PostRowUpdates
00883c14 +005c cMUD.exe ZDbcCachedResultSet 545 +14 TZAbstractCachedResultSet.PostUpdates
0088458c +0080 cMUD.exe ZDbcCachedResultSet 1526 +16 TZAbstractCachedResultSet.InsertRow
0090039c +00b8 cMUD.exe ZAbstractDataset 415 +12 TZAbstractDataset.InternalAddRecord
00900574 +010c cMUD.exe ZAbstractDataset 465 +19 TZAbstractDataset.InternalPost
0060d349 +0029 cMUD.exe DB TDataSet.CheckOperation
0060cfe4 +0048 cMUD.exe DB TDataSet.Post
00dc17a8 +0284 cMUD.exe MapList3 3484 +32 TMapNode.MakeRoom
00dabf03 +0453 cMUD.exe MapLoc3 2005 +99 TMapLoc.NewRoom
00daf472 +0212 cMUD.exe MapLoc3 2970 +34 FollowLink
00db1b5c +229c cMUD.exe MapLoc3 3493 +373 CheckForRoom
00db20c2 +016a cMUD.exe MapLoc3 3548 +17 TMapLoc.MapLine
00dadaf0 +0330 cMUD.exe MapLoc3 2517 +52 TMapLoc.AddLine
00d22975 +191d cMUD.exe MAIN 9032 +462 TMUDForm.HandleTrigger
00d20b23 +000f cMUD.exe MAIN 8392 +1 TMUDForm.UserOutNewLine
00a7480f +0067 cMUD.exe term 9863 +6 TTerm.DoTriggerLine
00a7314e +020e cMUD.exe term 9421 +34 HandleNewLine
00a739ad +06e1 cMUD.exe term 9549 +104 TTerm.PutText
00a73f7f +0053 cMUD.exe term 9656 +2 TTerm.Add
00d0a0de +00b6 cMUD.exe MAIN 1897 +8 TMUDForm.OutputStr
00d0a493 +01ab cMUD.exe MAIN 1996 +39 TMUDForm.NextMUDLine
00d0a966 +0022 cMUD.exe MAIN 2078 +4 TMUDForm.DoNextLine
004bc0b7 +02bb cMUD.exe Controls TControl.WndProc
004c00bb +04fb cMUD.exe Controls TWinControl.WndProc
004a261b +0553 cMUD.exe Forms TCustomForm.WndProc
004bf7e4 +002c cMUD.exe Controls TWinControl.MainWndProc
0047d448 +0014 cMUD.exe Classes StdWndProc
747c7bc5 +000a USER32.dll DispatchMessageA
004aa790 +00fc cMUD.exe Forms TApplication.ProcessMessage
004aa7ca +000a cMUD.exe Forms TApplication.HandleMessage
004aaabf +00b3 cMUD.exe Forms TApplication.Run
00e8cdec +0088 cMUD.exe CMUD 371 +20 initialization
0046001e +0022 cMUD.exe Variants DateToWStrViaOS
74683398 +0010 kernel32.dll BaseThreadInitThunk
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Mar 25, 2012 5:16 pm   
 
Is that happening often? I have gotten that error, but very rarely, and just clicking continue and trying to make the room again has always fixed it for me...
Reply with quote
Hennes
Newbie


Joined: 25 Mar 2012
Posts: 5

PostPosted: Sun Mar 25, 2012 5:37 pm   
 
Yes, it happens often.

Sometimes I can map 20 to 30 rooms without the error. Sometimes I have to try a few times just to map a single room.
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sun Mar 25, 2012 10:54 pm   
 
Damn, Wish i could remember what I did when i had that problem, but i didn't need to use any special map doctor....sorry i just can't remember what I did to fix it.
but it was a simple fix, cause i did it hehe
_________________
Spin
Reply with quote
Hennes
Newbie


Joined: 25 Mar 2012
Posts: 5

PostPosted: Sun Mar 25, 2012 11:23 pm   
 
I kept a log to see how often it happened. It started with 109 good working rooms. A lot better than the 'about on in 10-20 rooms' which I guessed at earlier. :-)


Tomorrow I will install cmud and my map on two other computers to verify that it is indeed the fault of my old map.
I really should have done that before, but somehow I forgot to test that.
Hopefully it will suddenly work and point a problem on my desktop.



== Log of mapping ===
Exploring Valena forests as a druid. Mapping roads, rivers, forest rooms and mistletoe.
--------------
Mapped 109 forest rooms. 109th room was special (it had mistletoe)
Selected all 109 rooms, colour them green (forest). Save changes.
Select mistletoe room. Colour it dark green. Save changes.
South to continue mapping. SQL error: PRIMARY KEY most be unique.
[Continue application]
--
Mapper off.
Backtracked one room (moved in mud but not moved on the map).
Mapper on. "south"
Room succesfully mapped..
Mapped 16 more rooms until the next room with mistletoe.
Updated 1+10+5 rooms to green (regular forest)
Updated 1 room to dark green (mtoe forest)
South to continue mapping. SQL error: PRIMARY KEY most be unique.
[Continue application]
Mapper off since the location on the map is now wrong. North. Select room and [set] position.
Mapper on, south to continue mapping. SQL error: PRIMARY KEY most be unique.
---
[Continue application]
Mapper off since the location on the map is now wrong. North. Select room and [set] position.
Mapper on, south to continue mapping. (succesful)
Map 53 more rooms (end of local bit of forest, time to colour)
Updated 55 rooms to green.
Updated 4 rooms to green.

Swap to water gear, movemode to wade, lets explore the river.
ne
SQL error: PRIMARY KEY most be unique.
[Continue application]
sw
SQL error: PRIMARY KEY most be unique.
[Continue application]
ne (river room now succesfully mapped).
Colour river room blue
Map 42 more rooms
(map off, AFK for tea)

Return. map on.
Fixed three rooms (not recently mapped ones) which showed arrows indicating one way exits.
Two were in error, one had a double sw exit.
Selected 40 rooms and coloured them green.
Selected 2 rooms and coloured them green.
Noticed a fourth room with a wrong one way arrow. Double SE exit. Deleted erronous exit.
east SQL error: PRIMARY KEY most be unique. [Continue application]
west SQL error: PRIMARY KEY most be unique. [Continue application]
Mapper off and back on. Retried. Room now mapped succesful.
Walked around for more food. Returned to mapping area.
Coloured 5 rooms blue (river)
Coloured 3 rooms blue (river)
Two more rooms on the map had scrolled into vision with erronous one way exits. Fixed those.
Coloured 4 rooms green (forest)
NE
SQL error: PRIMARY KEY most be unique.
[Continue application]
Walk around since I lost my bearings. No errors here.
Walk back to the place I was mapping. mapper on.
SE
SQL error: PRIMARY KEY most be unique.
[Continue application]
The usual (mapper off, walk back, SET position, mapper back on)
SE
SQL error: PRIMARY KEY most be unique.
[Continue application]
The usual (mapper off, walk back, SET position, mapper back on)
SE
SQL error: PRIMARY KEY most be unique.
[Continue application]
The usual (mapper off, walk back, SET position, mapper back on)
SE
SQL error: PRIMARY KEY most be unique.
[Continue application]
The usual (mapper off, walk back, SET position, mapper back on)
SE
SQL error: PRIMARY KEY most be unique.
[Continue application]
The usual (mapper off, walk back, SET position, mapper back on)
SE (worked!), S
Coloured two rooms green
S
SQL error: PRIMARY KEY most be unique. [Continue application]
S (worked)
Explored 5 more river room and coloured them blue.
Mapper off.
move 3 already explored rooms to the edge of a new area.
Peer around to see which are safe forest rooms.
Mapper back on.
SE
SQL error: PRIMARY KEY most be unique.
[Continue application]
---
Short break. Walked to a different part of the forest.
Mapped 63 more rooms and coloured them.
Walked one room, then SW into a new room.
SQL error: PRIMARY KEY most be unique.
[Continue application]
Mapped 39 rooms
Found an erronous 1 way marked exit and fixed it (in recently mapped rooms)
Mapped an coloured one mising room (deleted earlier when I deleted rooms with erronous exit markers)
Explored more rooms
Coloured 161 forest rooms green.
Walked back to the east side of the forest to continue work on the river map.
First room to map :SQL error: PRIMARY KEY most be unique. [Continue application]
Std location fix.
Reenter room. SQL error: PRIMARY KEY most be unique. [Continue application]
Std location fix.
Reenter room (works)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Mar 26, 2012 1:15 am   
 
If I recall correctly, this error is usually caused by a bad room in your map. In the mapper, go to the zone you have the error in, and open the spreadsheet view. Scroll to the bottom. Look for a room with bad values--usually something like a 0 for Room ID and lots of blank fields, if I recall correctly. Delete that room.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Mar 26, 2012 1:58 am   
 
the map doctor is an old utility from before the MapConvert utility was offered. It has since been incorporated into the MapConvert utility and should not be used (aside from this, the mapdoctor would reverse all the object/exit/etc ids and cause roomscripts to break since they no longer pointed to the same rooms anymore).
_________________
EDIT: I didn't like my old signature
Reply with quote
bothkill
Apprentice


Joined: 13 Mar 2005
Posts: 125
Location: Bucharest

PostPosted: Mon Mar 26, 2012 6:36 am   
 
I am not an IT specialist but I got some experience on working with the map database file. I designed my own solution to recycling the numbers of deleted rooms (with some hints from and collaboration with ReedN).
So, Hennes, I could have a few ideas where to check for that error of yours (SQL error: PRIMARY KEY most be unique.), but it would be somewhat difficult to think of possible areas to search, then tell you how to search for it, then get back to me with the result test, then again thinking for ohter solutions, then... and so on.

The idea is, IF you feel comfortable, you could send me the map database file and I will try to see if my little SQLite knowledge can identify the issue.

Needless to say that I won't use your map for either my own purpose (except for logging to your MUD and test the mapping on your flle) or for others'.
Reply with quote
bothkill
Apprentice


Joined: 13 Mar 2005
Posts: 125
Location: Bucharest

PostPosted: Mon Mar 26, 2012 7:17 am   
 
An example of testing:

From your log it looks like the mapper tries to make a room whose number (next-to-create-room number) is already in the database.

Do the following:

1.Download this executable file from the SQLite development website.
2.Drag-and-drop your map .dbm file on the 'sqlite3.exe' file.
3.Enter these commands:
Code:
SELECT MAX(ObjID) FROM ObjectTbl;
SELECT VersId, ObjID FROM VersTbl;
.quit


On the first command you'll get:
<a_number>
On the second command you'll get one line(hopefully):
1|<another_number>

Ideally, <a_number> should be less than <another_number>.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Mar 26, 2012 12:23 pm   
 
Actually, Matt is right--running the map through the MapConvert utility should fix it.
Reply with quote
bothkill
Apprentice


Joined: 13 Mar 2005
Posts: 125
Location: Bucharest

PostPosted: Mon Mar 26, 2012 12:30 pm   
 
It seems that was tried with no success.

Hennes wrote:
I downloaed the MapConvert program and tried the repair option.
This resulted in a map file which is slightly smaller (42Mb rather than 43MB), but does not solve the problem.

I tried converting the map to the old zmud format and back.
This did not solve the problem either.
Reply with quote
Hennes
Newbie


Joined: 25 Mar 2012
Posts: 5

PostPosted: Mon Mar 26, 2012 1:38 pm   
 
Matt: I do not yet use any room scripts, so I am not worried about reversing them. But it is very good to know that those features are alreay in MapConvert and that there is no reason for me to keep looking for the old program.


BothKill:
Quote:
Ideally, <a_number> should be less than <another_number>.


I downloaded the SQLlite3 file you mentioned and I got this:

sqlite> SELECT MAX(ObjID) from ObjectTbl;
30756
sqlite> SELECT VersId, ObjID FROM VersTbl;
1|30757
sqlite>

If I understand it correctly the room with the largest room number is room 30756 and the next room number to be used it 30757?



I also browsed though the database using 'SQLite Database Browser 2.0 b1'. I shows a lot of information. Some of it quite understandable (e.g. ZoneTbl), some of it confusing. (E.g 'VersTbl' version table? why have a max room ID in it? Doesn't the database auto numbering insist on a unique value?).

Then again my school lessons in SQL are 25 years ago and I hated every day of it. Mainly due to the client we used back then. Entering multi line queries without any editing and with my typing skills is very frustrating. Other stuff such as designing a DB so it is in the third normal form stuck a bit better.


A tried manual inspection of a few tables, but there are quite a few entries. (23734 in ObjectTbl and 157265 in ExitTbl).

I have upload the map to a website and I will PM you the URL.
Sadly enough elephant mud is down atm since 10:00 Brittish summer time. First downtime in about half a year, but the timing is unfortunate.
Reply with quote
bothkill
Apprentice


Joined: 13 Mar 2005
Posts: 125
Location: Bucharest

PostPosted: Mon Mar 26, 2012 8:06 pm   
 
I can confirm the issue reported by Hennes is a CMUD bug.
It also happens to me.

The error arises WHEN mapping new rooms AFTER coloring rooms (by selecting them with a rectangle).

Here are the steps:
(make sure your next move would create a new room)

1. Turn on Map mode
2. Click Properties icon (on the Mapper) and activate the 'Appearance' tab
3. Select one or more rooms BY USING A RECTANGLE
4. In the Room Properties mini-window, choose a Fill color (try with red), click Save changes and then click Yes when asked.
5. Move so as to create a new room
6. You should get the error message (if NOT, repeat the process 2-3 times; if still NOT .. I don't know then..)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Mar 26, 2012 8:34 pm   
 
I vaguely recall reporting a similar bug several years ago, which involved setting a room border rather than a room color. I can't find the thread now, if I did. I think I determined that after doing this, it would try to create a room with an ID of 0. Doing it a second time, naturally, produces an error as it tries to create another room with an ID of 0. I went through the spreadsheet display of rooms to get rid of these spurious rooms. But I seem to recall that the mapconvert could fix the map, too.
Reply with quote
Hennes
Newbie


Joined: 25 Mar 2012
Posts: 5

PostPosted: Mon Mar 26, 2012 10:08 pm   
 
Mapconvert might have fixed the map. But after mapconvert I went on mapping, basically repeating the steps Bothkill just described.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net