Changes to rules.txt causes crash-to-desktop

PlutonianEmpire

King of the Plutonian Empire
Joined
Mar 11, 2004
Messages
4,802
Location
MinneSNOWta
I made changes to my rules.txt file to replace a number of units I was using in the extra slots, but each and every time I try to load, I get a crash to desktop. How do I figure out what's causing it to crash? I already used the previously working unit.bmp graphics as that was the only graphics file I modified, and it still crashed, so I know it's just the rules file changes.

Can anyone help?
 

Attachments

  • oldRules.zip
    14.6 KB · Views: 206
  • newRules.zip
    14.6 KB · Views: 225
There's a comma missing on line 430, right after the domain.

So, how to spot these things quickly: Unzip the attachment into your game folder, it will turn error messages such as
Error "-6" in module "3" data: 61 0
into
Error "CivKeyNotFound(Units) (Bad RULES.TXT)" in module "<Startup>" data: 61 0

Here, 61 is the index in the @UNITS section, so that gives you the faulty line. From there it's easy. :)
 

Attachments

  • errors.zip
    560 bytes · Views: 231
Hey, guys. Hope you don't mind if I jump in here, as i've had a very similar problem.
I've tried to modify the default civs and replace them with custom ones (Editing values, colors, AI, names, whatnot). However, almost any edit I make causes the game to crash whenever I try to found a city. Bear in mind that I keep all of the colors balanced (Three to a color) and everything in order, so there shouldn't be any foreseeable issues. I've also never touched the units section of that file, so i'm not sure if a fix to faulty unit code would fix the problem (It works 100% OK in default with no edits to anything).
 
What's the error you're getting (if any)? The found city crash is usually a sign of a missing 64-bit compatibility patch. Does it also crash when you go to, for example, Cheat -> Change money, and pick a tribe (or is the textbox unresponsive)? If so, you're definitely missing the 64-bit compatibility patch, if not, please post the details of your error.
 
@TheNamelessOne
Just a quick question, where would i check for the error messages? With your *.DB files or without nothing pops up for me :confused: (trying to make some simple changes to rules.txt as well)
 
You'll get a popup with the error message, can't miss it really. If the problem is caused by an error in rules.txt, that is. What exactly are you experiencing? A CTD?
 
Thanks for your reply. At least i know i don't need to be looking all over for log files :p
I'm pretty much getting a CTD - a generic windows message that "program has stopped working" and a button to force close.. I'm running an MGE version though - sorry if i'm misposting in this TOT thread, just thought error handling wouldn't be much different.
 
You'd think it wouldn't, but actually the popup is ToT specific. For MGE I'd recommend downloading DebugView, it will capture the error when it's running (works for ToT as well, it even shows some extra details, like the contents of the line the error occurred on).
 
Okay, I branched off one of my scenarios, again ToT, changed rules.txt, and got a CTD. Looking at the error in DebugView, I'm confused:

Code:
00000066	24.60394859	[6244] Error "-6" in module "3" data: 76 0	
00000067	24.61400795	[6244] (   20) Error "-6" in module "3" data: 76 0	
00000068	24.62063217	[6244]  	
00000069	24.62490082	[6244] 'Lightning,    nil, 3, 12.,1, 15a,0d,  1h,11f, 8,0,  0, Nil, 001000000000000'	
00000070	24.62976074	[6244] (   20) 'Lightning,    nil, 3, 12.,1, 15a,0d,  1h,11f, 8,0,  0, Nil, 001000000000000'	
00000071	24.63630104	[6244]  	
00000072	24.64189148	[6244] 	
00000073	24.64662552	[6244] (   20) 	
00000074	24.65350151	[6244]  	
00000075	24.65892220	[6244] File open failed: MODULES.DB	
00000076	24.66349030	[6244] (   20) File open failed: MODULES.DB	
00000077	24.66964149	[6244]  	
00000078	24.67437744	[6244] Most recent DOS error:    2	
00000079	24.67960548	[6244] (   20) Most recent DOS error:    2	
00000080	24.68516731	[6244]  	
00000081	24.69095612	[6244] 	
00000082	24.69699860	[6244] (   20) 	
00000083	24.70490265	[6244]

I'm unsure if its giving me the more verbose output like earlier in this thread, or if the failure of the modules.db is causing it to give me the basic output.
 
Yes, I caught that when I posted that. ;) I left my post up because I was still wondering about the failure of the modules.db file. :)
 
modules.db and errors.db go into the subfolders, that is, in the same location as rules.txt. But with DebugView you already get most of the info.
 
I have a "new" CTD issue, but I vaguely recall having this issue years ago during my MGE years. Using the change terrain cheat on Glacier causes a CTD. This is what DebugView gave me, from ToTPP startup to CTD:

Code:
00000001	0.00000000	[9996] SHIMVIEW: ShimInfo(Complete) 	
00000002	0.01599711	[9996] FTH: (9996): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. ***	
00000003	1.87883961	[8080] SHIMVIEW: ShimInfo(Complete) 	
00000004	1.91232765	[8080] FTH: (8080): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. ***	
00000005	1.96169043	[8080] XDaemon> hInstance = 10000000	
00000006	2.07076931	[8080] ******************** SMEDS LOG ********************* 	
00000007	2.07076931	[8080] File Output to: smeds.log 	
00000008	2.07076931	[8080] SMEDS32 Version: 2.0.0         	
00000009	2.07076931	[8080]  	
00000010	2.27996039	[8080] (    0) 1.1.0  Test of Time  07-Sep-99	
00000011	2.28005123	[8080]  	
00000012	2.28347683	[8080] (    0) 	
00000013	2.28377342	[8080]  	
00000014	2.29124165	[8080] (    0) Disconnecting from network:	
00000015	2.29158115	[8080]  	
00000016	2.31923819	[8080] (    0)    XD_ResetLibrary();	
00000017	2.31956029	[8080]  	
00000018	2.35841894	[8080] (    0) Bottom-up orientation recommended.	
00000019	2.35970140	[8080]  	
00000020	2.95236921	[8080] (    0) Not an IGZ Game!!  event = -3	
00000021	2.95249867	[8080]  	
00000022	11.89554691	[8080] (    9) Disconnecting from network:	
00000023	11.89568615	[8080]  	
00000024	12.12157822	[8080] (   10)    XD_ResetLibrary();	
00000025	12.12170982	[8080]  	
00000026	15.22382164	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000027	15.22402668	[8080]  	
00000028	15.22492504	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000029	15.22504902	[8080]  	
00000030	15.22572327	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000031	15.22586727	[8080]  	
00000032	15.22654247	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000033	15.22666836	[8080]  	
00000034	15.22735786	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000035	15.22753620	[8080]  	
00000036	15.22815800	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000037	15.22828197	[8080]  	
00000038	15.22896290	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000039	15.22908306	[8080]  	
00000040	15.22975254	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000041	15.22989750	[8080]  	
00000042	15.31668568	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000043	15.31681633	[8080]  	
00000044	15.31780243	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000045	15.31856060	[8080]  	
00000046	15.31991100	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000047	15.32003784	[8080]  	
00000048	15.32101631	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000049	15.32114697	[8080]  	
00000050	15.38307285	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000051	15.40675640	[8080]  	
00000052	15.41473579	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000053	15.45579815	[8080]  	
00000054	15.47283077	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000055	15.48802662	[8080]  	
00000056	15.50433540	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000057	15.51092052	[8080]  	
00000058	15.52116299	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000059	15.53172112	[8080]  	
00000060	15.54237747	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000061	15.55322361	[8080]  	
00000062	15.56444168	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000063	15.58019924	[8080]  	
00000064	15.59181499	[8080] (   13) Warning: Sprite not locked in ChangeColor	
00000065	15.60040379	[8080]  	
00000066	16.44577789	[8080] TOTPP: Allocating 106480 bytes for events (growable) 	
00000067	16.44601631	[8080] TOTPP: Created heap 0x54c0000, initial size 106480 bytes	
00000068	18.69492340	[8080] (   16) Warning: DrawSprite 16 to 8 error!	
00000069	18.69507790	[8080]  	
00000070	18.71310425	[8080] (   16) Warning: DrawSprite 16 to 8 error!	
00000071	18.71323395	[8080]  	
00000072	18.71850395	[8080] (   16) Warning: DrawSprite 16 to 8 error!	
00000073	18.71862793	[8080]  	
00000074	19.62198830	[8080] (   17) Warning: DrawSprite 16 to 8 error!	
00000075	19.62224579	[8080]  	
00000076	19.63886642	[8080] (   17) Warning: DrawSprite 16 to 8 error!	
00000077	19.63903236	[8080]  	
00000078	19.64475822	[8080] (   17) Warning: DrawSprite 16 to 8 error!	
00000079	19.64487076	[8080]  	
00000080	20.09952164	[8080] (   18) Warning: DrawSprite 16 to 8 error!	
00000081	20.10416031	[8080]  	
00000082	20.11768913	[8080] (   18) Warning: DrawSprite 16 to 8 error!	
00000083	20.11785126	[8080]  	
00000084	20.12491608	[8080] (   18) Warning: DrawSprite 16 to 8 error!	
00000085	20.12508583	[8080]  	
00000086	20.42535210	[8080] (   18) Warning: DrawSprite 16 to 8 error!	
00000087	20.42553329	[8080]  	
00000088	22.25669479	[8080] (   20) Warning: DrawSprite 16 to 8 error!	
00000089	22.25689507	[8080]  	
00000090	22.27279282	[8080] (   20) Warning: DrawSprite 16 to 8 error!	
00000091	22.27296066	[8080]  	
00000092	22.27836609	[8080] (   20) Warning: DrawSprite 16 to 8 error!	
00000093	22.27853394	[8080]  	
00000094	29.87038994	[8080] Error "NoMoreHeap" in module "<Popup>" data: 6 2	
00000095	29.87061119	[8080] (   27) Error "NoMoreHeap" in module "<Popup>" data: 6 2	
00000096	29.87070465	[8080]  	
00000097	29.87154579	[8080] 	
00000098	29.87171555	[8080] (   27) 	
00000099	29.87177277	[8080]  	
00000100	29.87251472	[8080] Most recent DOS error:    2	
00000101	29.87259865	[8080] (   27) Most recent DOS error:    2	
00000102	29.87271881	[8080]  	
00000103	29.87334442	[8080] 	
00000104	29.87348557	[8080] (   27) 	
00000105	29.87360954	[8080]

Here's a small-ish zip; might be best to merge with the zip I posted a few hours ago in the ToTPP thread if any issues crop up. :)

To get the CTD, I loaded the save file, used the change terrain cheat to change the jungle tile in Thunder Bay's radius to a glacier, then using Shift+8 to activate the change terrain cheat on the new glacier tile, only to get a CTD instead. Although, just about any Glacier tile will suffice, IIRC.
 

Attachments

  • bugs8.zip
    1.1 MB · Views: 201
There's an "irrigation loop" from Glacier -> Ocean -> Glacier etc. that causes the crash. You know the dialog when you press Shift-F8 on, say, a forest tile? It contains the terrain types that you can change it into, transitively. In your case the game keeps adding Glacier and Ocean to the dialog, until it runs out of memory.

I've never really understood the purpose of this dialog, since it's only done for the "irrigation" terrain change. The next release of TOTPP will contain hotkeys for terrain changes, avoiding the need for going through the menu for every tile. That should also avoid this bug.
 
Top Bottom