View Full Version : toggle_fow CTD
Horst Nordfink
04-20-2008, 18:07
On my Romani campaign, whenever I try to toggle_fow it CTDs. It's not too much of a problem really, I just won't toggle_fow. I was just interested to see if anyone else has had this occur?
Knock on wood I guess - haven't had that particular problem, and I do toggle_fow pretty much every year to check on what the AI is doing with the other factions - hope you haven't discovered another trend!:us-mississippi:
Try using the installation validation tool. Maybe some sprite wasn't installed properly and it only shows up in a far away province.
Olaf The Great
04-20-2008, 19:58
So far the only bug I've been getting related to FOW is the seas turning black for some reason, and the only CTD I've got is from a new units missing sprite, which I fixed.
Horst Nordfink
04-20-2008, 20:37
Installation validation tool? :inquisitive:
Yes. Sticky. There for a reason. Also in your RTW folder, ready to run (if you've got Java installed).
Horst Nordfink
04-20-2008, 20:56
Ah yes. It doesn't say anything, it just gives an empty box. So I'll assume that there isn't anything wrong with my installation. I wouldn't have thought there was as I have played a few campaigns with other factions with no problems.
Are you sure you've got Java installed? An "empty box" does not mean everything is peachy, it means it fails to run.
Horst Nordfink
04-21-2008, 00:14
I think so. I will try to reinstall it to make sure.
EDIT:
I reinstalled Java. Whereas the Install Validation runs, when it asks me to press any button, a blank window still opens. Is this bad?
Please see the output of the DOS (black) window, it should have an error message of sorts. Or you've installed RTW/EB under Program Files, which if so is the cause of your problems.
Horst Nordfink
04-21-2008, 08:28
Hmm, I thought that was only a problem if I was running Vista?
Should I uninstall R:TW and reinstall it outside of Program Files?
It shouldn't be a problem with XP, no. But see if there's an error message nonetheless. Post the output of the DOS window here if you have a problem seeing it.
Horst Nordfink
04-21-2008, 09:14
I have just decided to reinstall it outside the Program Files. As usual Bovi, I am eternally grateful for your help. Thank you very much.
The output of the DOS window on my new install is:
Exception in thread "main" java.lang.NoClassDefFoundError: europabarbarorum/ValidateInstall
Caused by: java.lang.ClassNotFoundException: europabarbarorum.ValidateInstall
at java.net.URLClassLoader$1.run(unknownsource)
at java.security.AccessController.doPrivileged(NativeMethod)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Validation is complete. There should now be a new file called "ebValidationResults.txt" in this directory.
It says it can't find the main program, which is part of eb.jar. Can you verify that you've got that in your RTW folder?
Horst Nordfink
04-21-2008, 12:17
Where would I find that should it exist?
in your RTW folder
So, yeah, in the RTW folder. Where you installed EB and validateinstall.bat resides?
Horst Nordfink
04-21-2008, 15:04
I'm sorry. I'm not the most proficient when it comes to computers and how they work and such like. I'm not really sure what I'm looking for in the RTW folder.
I did a search of "eb.jar" and came up with something that claims to be an "Executable Jar File", whatever one of those is. Is this what I am looking for?
If I try to open it, I receive an error message that says "Failed to load Main-Class manifest attribute from C:\Rome TW\eb.jar".
Well, it's not an executable jar, just a regular one (jar = Java archive), but Windows doesn't know the difference. The error message you receive when running it is expected.
So, where are you running validateInstall.bat from? c:\Rome TW, right? Then it should find eb.jar in that same directory. Possibly I've missed a problem when you have a space in the path... Could you try to rename the "Rome TW" folder to "RomeTW", then run the validation?
Horst Nordfink
04-21-2008, 18:27
Certainly.
EDIT: It won't let me rename the file to "RomeTW". Access is denied.
I tried to rename my own folder to contain spaces, and it works just fine with no changes... Could you verify that the contents of validateInstall.bat are:
@echo off
echo Running validation. Could take a couple of minutes, please be patient.
java -cp eb.jar;edtftpj.jar europabarbarorum/ValidateInstall
echo Validation is complete. There should now be a new file called
echo "ebValidationResults.txt" in this directory. However, if you're running
echo Vista and have installed RTW/EB under PROGRAM FILES, it probably won't.
echo In fact, if so you're very likely to run into trouble later because of
echo that placement. Make sure you have installed RTW/EB anywhere else.
pause
notepad ebValidationResults.txt
Then try to change java -cp eb.jar into java -classpath eb.jar and run it again. Possibly you have a version of Java which doesn't recognize the -cp directive. Which version of Java do you have installed?
Horst Nordfink
04-21-2008, 22:07
I downloaded and installed version 6 yesterday from this site http://www.java.com/en/download/index.jsp.
No, the contents of my validateinstall are the same as listed as above.
If i run validateinstall.bat via the search function of my desktop, it comes up with something completely different:
Running validation. Could take a couple of minutes, please be patient. The validation requires a checklist to confirm that your installation is correct. Upon installation, you get one for a standard RTW/EB installation without BI/Alex. I can try to download another or update the checklist from the EB server, do you want to do this? (Y/N)
Then I'm sorry, I don't have any more help to give. The toggle_fow crash certainly doesn't happen on my machine, and Java behaves differently.
Horst Nordfink
04-21-2008, 22:30
That's ok bovi! It must be just one of those things that happens now and again. Either that or it's the faulr of my steam-powered laptop.
Thanks again for all your help, much appreciated!
Here is a balloon for your efforts :balloon2:
Tellos Athenaios
04-22-2008, 11:54
@Bovi, haven't you added a manifest file in your .jar archive then? After doing that it's just a matter of
java -jar myArchive.jar
In the .bat file.
Also, turning the echo off supresses output in the DOS box at times; even if you explicitly write to the console. (At least it did with my DRViewer...?)
I didn't, because the batch file was supposed to run it. Also, I use an option in that when creating the checklist, so it was easiest. Actually, I've never made an executable jar file, how do I go about creating this manifest?
Echo off means the commands in the batch file are not shown in the output, but rather only the output of said commands.
Edit: Nevermind, I found the thing in JDeveloper. How do I go about setting extra classpath for it (I'm using a library for talking to our FTP)?
Tellos Athenaios
04-22-2008, 17:11
Is it not easier to just make an object which handles all the talking from/with the FTP from within your main app? You are not using batch code to dynamically change the bit of code you want to call; are you?
Or did you do that, but why then would you need another entry point?
And I know what echo off does. In any case, if you really only want to feed some option to your program -- use a shortcut. Also prevents the user from terminating your program by 'accidentally clicking the X' in the DOS box. :beam:
In any case : :google:
Main Attributes
Main attributes are the attributes that are present in the main section of the manifest. They fall into the following different groups:
general main attributes
Manifest-Version:
Defines the manifest file version. The value is a legitimate version number, as described in the above spec.
Created-By:
Defines the version and the vendor of the java implementation on top of which this manifest file is generated. This attribute is generated by the jar tool.
Signature-Version:
Defines the signature version of the jar file. The value should be a valid version-number string.
Class-Path :
The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.
Is it not easier to just make an object which handles all the talking from/with the FTP from within your main app?
Certainly not. I'm not reinventing FTP when someone else has made a perfectly good library for it.
Or perhaps you mean to have the FTP commands in my java code, which I do. The command line (and thus, the batch file) takes a single parameter, and that's whether to do a validation (no option) or create a checklist (added createlist).
What is my batch file, if not this shortcut you propose? I'm the only one who probably ever need to run it in the mode to create a list anyway.
I tried to run it as an executable jar, and it seems to remove the DOS window that is required for the simple user input when running (which checklist to download), without making it into a swing application. I'm not doing this.
Tellos Athenaios
04-22-2008, 22:27
You would add commandline parameters just like you normally would (check my DRViewer.bat file & readme for more examples ~;) )
java -jar myArchive.jar -my_commandline_options_separated_by_spaces
E.g.:
java -jar DRViewer.jar -v -m:2.5 -s
As for the shortcuts:
Basically you create it like you would do with the EB shortcut:
Target: "[myPath]\myArchive.jar" -my_commandline_options_separated_by_spaces
Start In: "[myPath]\"
E.g.:
Target: "C:\Users\Johan Ouwerkerk\Games\Europa SVN\EB SVN -trunk\documentation\tools\DRViewer\DRViewer.jar" -m:2.5 -s
Start In: "C:\Users\Johan Ouwerkerk\Games\Europa SVN\EB SVN -trunk\documentation\tools\DRViewer\"
Tellos Athenaios
04-22-2008, 22:39
Certainly not. I'm not reinventing FTP when someone else has made a perfectly good library for it.
Or perhaps you mean to have the FTP commands in my java code, which I do. The command line (and thus, the batch file) takes a single parameter, and that's whether to do a validation (no option) or create a checklist (added createlist).
Yes, the latter. Based on what you wrote, I thought you meant you wrapped two apps inside one jar file - one being the validator the other being the checklist generator... But in any case: I am unsure why you would need multiple paths, unless you use a vendor specific library? (Doesn't Java 6 have methods for doing FTP out of the box?)
I tried to run it as an executable jar, and it seems to remove the DOS window that is required for the simple user input when running (which checklist to download), without making it into a swing application. I'm not doing this.
Of course it does. If you create a basic commandline tool all your gain will be that it has much improved speed since all output is immediately trapped before even being executed 'on the DOS box'. (Java IO isn't terribly fast, nevermind now console output ... <_<) For comparison: run my DRViewer from a DOS box (one of the batch files) with verbose output turned on (-v switch) and run the thing next by simply running the .jar directly. You will notice a significant performance gain when loading the descr_strat.txt file .... (Or try sorting by region for another example.)
To get a swing GUI, one has to actually build it -- you've got to program your app to. :grin:
I need "multiple paths" because I need the program to have two modes; creating and consuming the checklist. They're mutually exclusive but are still one whole.
I don't know about any OOTB FTP function, I think it doesn't exist. I'm using EDT's library for it, which works just fine for all the purposes I've had so far :beam:. So that's where the additional classpath comes in. Alternatively, I could extract their classes and include them in mine, but I find that rather untidy and it's upgrade-unfriendly.
To get a swing GUI, one has to actually build it -- you've got to program your app to.
Of course, and I've done so earlier. I merely said I'm not going to do it for this simple app.
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.