Bug Reporting

BUG will first look for a folder in My Games and My Games / BTS that matches CvModName.modName. It must contain a folder called UserSettings. It will then use that folder to read and write INIs, so make sure you copy over the CustDomAdv and Advanced Unit Naming.ini file during installation.

Yes, I agree this is something that needs addressing--I just have so little time right now. :( It's also very frustrating because every time I make a change to fix one problem, BTS or Windows presents some new problem with that solution. It's a not-so-fun game of whack-a-mole. :cry:
 
Thanks for the suggestion. I am not quite able to get this working. Perhaps I am just missing one step.

I am running XP, but the problem occurs when trying to write files into the mod directory. So, I should be able to reproduce the problem by making my mod directory read-only. Using windows explorer, I select my mod directory, right click, properties, check the "read only" checkbox and accept. I get a dialog asking me if the setting should be applied to all subfolders, and I click yes.

Now when I start the mod, I can reproduce the crash. During "Init XML", it crashes.

Now I try your fix. In file assets/python/CvModName.py, I have the line:
Code:
modName = "Dune Wars"
So I create directory My Documents/My Games/Dune Wars/UserSettings. I run the mod again. It still crashes. In my install directory, I do not see any files CustDomAdv.ini or Advanced Unit Naming.ini , so I do not understand your comment about copying them over.

Can you suggest any step I may be missing?
 
That should do it. Can you post the contents of PythonDbg.log after trying it?

The CustDomAdv folder and Advanced Unit Naming INI file should be in "Mods/Dune Wars/UserSettings" or ".../Data/UserSettings" depending on how you setup your installer.

Also note that if you get this working the files in the Info folder (help files) will not be accessible unless you copy the Info folder to the "Dune Wars" folder where you're putting the UserSettings folder.

Code:
My Games/
    Dune Wars/
        Info/
        UserSettings/
            CustDomAdv/
                CustDomAdv.txt
            Adv Unit Naming.ini
 
After exactly the steps in my previous post, here is PythonDbg.log. As far as I can tell, this does not say anything useful.

I also tried creating your exact directory structure under My Games/Dune Wars:
* Add empty directory Info
* Under UserSettings, add empty file Adv Unit Naming.ini
* Under UserSettings. add directory CustDomAdv and in that, add empty file CustDomAdv.txt

It still crashes with an identical PythonDbg.log ending in "load_module CvAppInterface".

I looked carefully for related files in my working (non-read-only) install directory and I find some spelling differences. I have files Adv Unit Renaming.ini and CustomDomAdv/CustomDomAdv.txt. Note the slight differences in spelling. I create these related directories and copy the related files from my working directory, but I still get a crash during Init XML with the same last line in PythonDbg.log.

In case it is not clear, you could reproduce my setup by downloading Dune Wars version 1.6.1 from this link, installing, changing your mods\Dune Wars directory to readonly using windows explorer, and then running. So far, I am not able to create a directory structure under My Games which prevents the crash.

Can you find any step I am missing? I would really like to get this to work.
 

Attachments

  • PythonDbg.zip
    3.4 KB · Views: 84
Weird, it doesn't even get to the point of trying to locate the INI files before it craps out on you. The very next thing in my log after loading CvAppInterface is loading the Highlands map script. :confused:

I installed BUG as a mod and made the entire "BUG Mod 4.1" folder hierarchy read-only. I was able to launch BTS and start a custom single-player game with the full BUG interface. I have the "BUG Mod" with Info and UserSettings folders set up in my My Games / BTS folder.

Just to be sure, remove the PublicMaps folder from "Dune Wars" if present or rename it to PrivateMaps. I did the latter in my installation; maybe it makes a difference since you seem to die as soon as the first map script is loaded.

Hmm, I notice that even though I specified that the folder should be read-only, opening up the properties again shows it as gray, and I can add files to the folders. It is making only the files inside read-only, but perhaps that's the problem. There's a file existing in there that your mod is trying to modify whereas BUG by itself does not.

Have you tried installing BUG by itself as a mod and performing the same test after making it read-only?
 
EF, to truly replicate this you must put the BUG mod in the Program Files path, and put the User Settings in the My Games path.
 
This is disappointing.

a. Renaming my publicmaps to privatemaps does not prevent the crash. The last message in pythondbg.log is still "load_module CvAppInterface", so I guess the problem is occurring somewhere during that step.

b. I downloaded bug 4.1 and installed it "multiplayer", that is inside program files\civ 4\beyond the sword\mods. I ran it as a mod and it came up fine. I made all its directories readonly and ran it again, which should have reproduced the crash. But it still came up fine. That is too bad. Haven't other users reported the crash with just BUG by itself?

c. If it isn't BUG which is causing the problem, Dune Wars is also built on top of RevolutionDCM. So I installed RevDCM 2.6 and did the same steps: run it once fine; make all the directories readonly; run it again. This also came up fine when it should have crashed.

I know that users have reported this crash behavior on other mods besides DW. I do not see how DW code itself could be causing this; DW code itself does not use any ini files. So now I am a little stuck on how to debug this. Any suggestions?
 
I have done some more tests on RevDCM and not found any solution. It turns out under Windows, if you use the properties dialog to make all files and folders under a directory read-only, it does not actually prevent creation of new directories or files. This is very different from unix/linux, and it makes testing a little more complicated.

DW is crashing during the "init xml" stage, before the game code actually has control. I observe that when you start a game (after setting game options, choosing a mapscript, etc) then RevDCM creates a directory, program files\civ 4\beyond the sword\mods\RevolutionDCM/UserSettings, and writes about 20 ini files into it. Making the directory readonly does not prevent this. So, although this cannot be the cause of the "init xml" crash, I investigated a little further. I tried creating a readonly *file* called UserSettings, hoping that this would simulate being unable to write into the directory. This did not cause any crash. During the play of RevDCM, I do see messages "BUG unable to locate options files" or something close to that, but no crash.

I also installed RevDCM in a clean directory, made a zip of the files, then ran it once, and made a new zip of the files. Within winzip, you can sort all the files in the whole tree by creation date. So I looked to see if the second zip had any new files, perhaps in some random directory somewhere, so that I could tell what it was writing. No luck; there were no files from today's date in the second zipfile.

I would really appreciate any further suggestion about how to track down the cause of this "init xml" crash.
 
Hello BUG Boys. :)

I'm having a problem with BUG/BAT and Windows 7, and it may relate to the issues that a couple of recent posters have mentioned, like what davidlallen has been saying, but I'm not sure.

BTS with the UP works fine in Win 7, so does BUG, and so does BAT. Both are installed as single player, standard install. BUG will work fine with a vanilla BTS game, but when I try to load a mod, in this case Varietas, I have no interface. I've installed and re-installed all of the BUG/BAT files as admin, and in various compatibility modes with no luck. The game will load Varietas, but I get an error in the game screen about "BUGInit - cannot find XML file for mod init".

I even went so far as to copy my entire CustomAssets, BUG, and BAT folders from my old Vista hard drive, and no luck with that either. I also copied the Varietas directory from that drive as well.

The only problem that I've had with Win 7 and Civ was the install. Patching Vanilla to 1.74 broke the game and the registry (I didn't use the default install path and that's why.), and I had to resort to registry edits to get the Installsheild nonsense out. Maybe I messed something up.

I'm going to install LoR as well, but I'm waiting so that I don't compound the issue. Does anyone have any ideas? This little Lemon wants to try a merge of Varietas and BAT, but she can't do it if it won't load. :(
 
Oh hai, possible solution! I removed my Dune Wars directory, did an install, then invoked the game only up to the point of having the "Single Player, Multiplayer, ..." initial menu. Then I went looking for new files in the install tree using winzip.

I found one! During the early initialization a file Civ4.thm is written into directory Dune Wars/assets/modules/interface/dune theme/resource.

Who writes this file and how can I make them stop?
 
@ Lemon Merchant - I was excited to see the link in your sig to your vista thread. I read all of it. The reason I am here on this thread is because my mod crashes under vista during "init xml" unless the vista user does "run as administrator". It may be that this only happens to a few mods, built on RevDCM or BUG. But, this is not mentioned anywhere as a workaround in your guide, unless I missed it.

Could you add that as a FAQ or in your "things to try" section? The specific behavior is a crash while loading the mod, in the "init xml" stage. The solution is to "run as adminstrator". We believe this is due to the game trying to write files into a subdirectory of program files, which of course normal users cannot do in vista.
 
@ Lemon Merchant - I was excited to see the link in your sig to your vista thread. I read all of it. The reason I am here on this thread is because my mod crashes under vista during "init xml" unless the vista user does "run as administrator". It may be that this only happens to a few mods, built on RevDCM or BUG. But, this is not mentioned anywhere as a workaround in your guide, unless I missed it.

Could you add that as a FAQ or in your "things to try" section? The specific behavior is a crash while loading the mod, in the "init xml" stage. The solution is to "run as adminstrator". We believe this is due to the game trying to write files into a subdirectory of program files, which of course normal users cannot do in vista.
Yes. Certainly. :)

I am updating the guide shortly to include some Win 7 details, and I have been planning to add some extra things on Vista problems like the one you mention. If you have any other things that you would like to see, or that I've missed, please PM and I'll work them in, with appropriate credit, of course. :D
 
Oh hai, possible solution! ... During the early initialization a file Civ4.thm is written into directory Dune Wars/assets/modules/interface/dune theme/resource.

Stuff under assets/modules appears to be WOC modular loading. Their forum is kind of quiet but I asked for help in this thread.
 
A couple of days ago I finished a game using 3.19 and BUG 4.1 plus one additional tweak - changed the xml to allow two buildings in a city instead of one. No problems: got a cultural victory in 1000AD, thanks to two of each type of cathedral in two of my three main cities.
I am (or was) in another game with exactly the same settings (Normal speed, Emperor level, large pangaea, random leaders - I chose Pericles of Ethiopia) but as soon as I get Astronomy all buildings and Wonders disappear from the city screens, rendering further progress impossible.
It doesn't matter how or when I get Astronomy: I've researched it, got it from a hut (cheating via WB), giving it to myself (WB again), held back from getting it ASAP, got it earlier, etc. etc. The buildings do, usually but not always, show in the popup list after something has been completed.
Any ideas ? Any ideas at all ?? The first-mentioned game was the first played after a complete reinstallation of the game, patch 3.19, and BUG, a process which I shall presumably have to repeat.
 
A couple of days ago I finished a game using 3.19 and BUG 4.1 plus one additional tweak - changed the xml to allow two buildings in a city instead of one.

You should probably post in the sdk/python subforum. This particular subforum is about *unaltered* gameplay. But anyway, I bet your problem is related to buildings becoming obsolete. Try avoiding astronomy, but instead pick up some other tech which obsoletes something, like rifling or scientific method. I bet you will find the same result. Fixing this probably involves altering the sdk; I am sure the original civ designers did not test everything for the situation where multiple copies of the same building need to be made obsolete.
 
@davidallen - I don't think your issue is "init.xml" related. Rather, BTS is failing at some point which leaves BUG uninitialized, and so it complains. If you can get WoC to stop creating/modifying that theme file, you're issue should be resolved. *crosses fingers*

@Lemon Merchant - The issue you're having is due to a recent change in BUG 4.1. If a mod is loaded, BUG ignores the CustomAssets folder entirely when loading its configuration files. We did this because people were installing both BUFFY (as a mod) and BUG (to CustomAssets) and having problems because BUG's configuration had stuff BUFFY did not understand since BUFFY used an older BUG.

Unfortunately, the fix caused this new issue. I think if you copy CustomAssets/Config to your Mods/VD/Assets folder, BUG should start working. You'll need to do this for any mods you want to run as mods that don't already have BUG in them. BAT already has BUG, so it should be unaffected.

@Bushface - I have no idea how BUG could be causing this issue. In that first game you completed successfully, did you acquire Astronomy? BUG doesn't alter the display of buildings in the City Screen or the action panel. :confused:
 
@Lemon Merchant - The issue you're having is due to a recent change in BUG 4.1. If a mod is loaded, BUG ignores the CustomAssets folder entirely when loading its configuration files. We did this because people were installing both BUFFY (as a mod) and BUG (to CustomAssets) and having problems because BUG's configuration had stuff BUFFY did not understand since BUFFY used an older BUG.

Unfortunately, the fix caused this new issue. I think if you copy CustomAssets/Config to your Mods/VD/Assets folder, BUG should start working. You'll need to do this for any mods you want to run as mods that don't already have BUG in them. BAT already has BUG, so it should be unaffected.
Thanks, you big, strong, save-the-day type man. It worked! :D

Now to try the merge!
 
@Lemon Merchant

I want to try a workaround, that I can later resolve with the install script for Vista users. Unfortunately I have no way to test this myself, my computer refuses to recognize "read only". I have tried to make LoR and the mods directory itself read only, and windows says it is; but I can still modify files inside of it; also I tried creating a new limited user account and I could still modify files even when marked as read only as a guest. So I can't test it.

If you're willing, please try this for me.
1)Download and install LoR
2)Cut the User Settings and Autolog folder out of the mod
3)Create a new folder inside My Documents/.../Beyond the Sword (not BtS/mods, just BtS, where BtS's main ini file is), name this folder LoR
4)Paste the User Settings and Autolog folders inside this My Documents LoR folder
5)Launch with the LoR icon NOT as an admin.

I want to see if this resolves the ini creation bug for Vista users who do not launch LoR as an admin. If this does, I can scratch this annoying issue off my list. I'll have to do some complex stuff with the install script, but I can deal with that later, first I want to know if this work around works at all. Your help would be much appreciated.
 
If you're willing, please try this for me.
1)Download and install LoR
2)Cut the User Settings and Autolog folder out of the mod
3)Create a new folder inside My Documents/.../Beyond the Sword (not BtS/mods, just BtS, where BtS's main ini file is), name this folder LoR

I have not looked into your installation files, but the spelling of the folder name in step 3 needs to be exactly right. Should it be "LoR" or "Legends Of Revolution" or exactly what? Also, it may save LM a few minutes if you post the exact download link.
 
You should probably post in the sdk/python subforum. This particular subforum is about *unaltered* gameplay. But anyway, I bet your problem is related to buildings becoming obsolete. Try avoiding astronomy, but instead pick up some other tech which obsoletes something, like rifling or scientific method. I bet you will find the same result. Fixing this probably involves altering the sdk; I am sure the original civ designers did not test everything for the situation where multiple copies of the same building need to be made obsolete.

This problem appears to result only from Astronomy, which not only makes Stonehenge obsolete but also makes any monuments (etc.) actually disappear if they were provided by Stonehenge. Other obsolete buildings, such as Stonehenge itself, do not vanish, so the problem does not occur with them.
It isn't surprising that the program can't distinguish between two identical monuments, only one of which ought to go, but the disappearance of the bulding options is a very odd result.
Fortunately I have a very simple work-round: do not build Stonehenge. I have built two monuments in the same city, got Astronomy, both monuments remain, and the build options remain as they should.
 
Top Bottom