Menu

#2671 Game fails to start

Fixed_0.11.0
closed-fixed
nobody
None
9
2014-10-18
2014-02-22
Fenyo
No

Version: Most current from SF (2014-02-20)
Compiled with: Java Development Kit 7 update 51 (32-bit)
Run on: Windows XP SP3 32-bit, Java Development Kit 7 update 51 (32-bit)

Command line:
java -Xmx512M -Dsun.java2d.d3d=false -cp . -jar FreeCol.jar --freecol-data D:\GAMES\FreeCol\data --user-config-directory D:\GAMES\FreeCol --user-data-directory D:\GAMES\FreeCol\data --windowed

Error:
Exception in thread "main" java.lang.NullPointerException
at java.io.File.<init>(Unknown Source)
at net.sf.freecol.common.logging.DefaultHandler.<init>(DefaultHandler.java:56)
at net.sf.freecol.FreeCol.main(FreeCol.java:243)</init></init>

(to be able to start the game i have to hardwire FreeColDirectories.java)

Discussion

  • Mike Pope

    Mike Pope - 2014-02-22

    There was a trivial stupidity in windows initialization. Try git.195c72d. You should not need the user directory overrides if everything is working.

     
  • Fenyo

    Fenyo - 2014-02-22

    What a quick response! :)

    Nice job!!

    Bug is eliminated!

    BTW, i want the directory overrides because i don't want FreeCol to put its things to C:\Documents and Settings\
    Oh, and now it seems those command line switches about directories have no effect. It creates dirs in C:\Documents and Settings\ and the current directory (at open dialog) is that dir instead of the specified at command line. :(
    Could you please fix that? (if those dirs specified at command line -> don't create dirs in C:\Documents and Settings\ and use the given dirs!)

     
  • Fenyo

    Fenyo - 2014-02-22

    I want to set the status of this to "Fixed" but it seems i don't have the rights for that...

     
  • Mike Pope

    Mike Pope - 2014-02-23

    What a quick response!

    You timed it well. I was online, and the bug was simple.

    i want the directory overrides because i don't want FreeCol to put its things to C:\Documents and Settings

    OK, I agree the command line options should take precedence. Try git.abca374. Note you may also want to use --user-cache-directory or --logfile as IIRC the log file will end up in that default directory too.

    However I can not recommend using the freecol data directory for user files. FreeCol "owns" that directory, and if for some reason we ever decide to put FreeCol data files there that have the same name as something you have stored there... bad things will probably happen to someone's data. How about just creating ...\FreeCol\mydata and put everything there?

     
    • Fenyo

      Fenyo - 2014-02-23
       

      Last edit: Fenyo 2014-02-23
  • Mike Pope

    Mike Pope - 2014-02-23

    I want to set the status of this to "Fixed" but it seems i don't have the rights for that...

    Alas so. It seems that only project administrators can change a bug's status, whereas I would have thought the bug reporter should be able to. IMHO this is a bug in sourceforge.

     
  • Fenyo

    Fenyo - 2014-02-23

    I agree the command line options should take precedence. Try git.abca374.

    Yes, they do now.
    However the freecol Directory is still created in C:\Documents and settings... at game start.

    you may also want to use --user-cache-directory

    This switch does not exist. :(
    It does not show as a command line option, and: "Unrecognized option: --user-cache-directory"

    However I can not recommend using the freecol data directory for user files.

    You're right. I've changed it.

     
  • Mike Pope

    Mike Pope - 2014-02-23

    However the freecol Directory is still created...

    So it seems. I have kicked it to not create directories if they are correctly specified on the command line (git.b79a1d5). You will need all three directories though.

    This switch does not exist

    It was there, but not enabled. As of git.92a4c29 it should work, and is even documented:-).

     
  • Fenyo

    Fenyo - 2014-02-23

    Works like a charm. ;)

     
  • Mike Pope

    Mike Pope - 2014-02-23

    OK, closing.

     
  • Mike Pope

    Mike Pope - 2014-02-23
    • status: open --> closed-fixed
    • Group: Current --> Fixed_trunk
     
  • Mike Pope

    Mike Pope - 2014-10-18
    • Group: Fixed_trunk --> Fixed_0.11.0
     

Log in to post a comment.

MongoDB Logo MongoDB