1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. While the majority of active discourse on D20PRO has moved to our Discord Channels, this forum is still active and checked-in on regularly by our staff. However, for the very latest information, conversation and/or immediate support, please join us on Discord here: http://discord.gg/Ph38ckM
    Dismiss Notice

Debug log or anything for frequent disconnect issues?

Discussion in 'General Discussion' started by Mattie, May 18, 2011.

  1. Mattie

    Mattie New Member

    Joined:
    Feb 9, 2011
    Messages:
    5
    Likes Received:
    0
    In our 6-player games, it's pretty much inevitable that some players will crash/disconnect whenever I show a new map or some new tokens.

    How might I figure out the cause of this? Is there a debug log I could refer to help figure this out? At the moment, a subset of them all start dropping-off like flies. It doesn't happen for everyone and I know we still have strong network connectivity due to Skype, etc.

    I'd like to pinpoint whether it's that the graphics are too large, or that my upload bandwidth is too small, or their memory is too low, etc.

    Any tips for debugging/troubleshooting this would be quite handy. My players are frustrated but I really would like to continue using d20pro with them, so I am willing to dive as deep as needed.

    Thanks in advance,
    -Mattie
     
  2. ogexam

    ogexam Member

    Joined:
    Jul 10, 2008
    Messages:
    526
    Likes Received:
    1
    What is the size of the maps you are using?

    How many maps do you keep open at one time?

    Does this happen at random times, or just when broadcasting new maps or creatures?
     
  3. Mattie

    Mattie New Member

    Joined:
    Feb 9, 2011
    Messages:
    5
    Likes Received:
    0
    Most commonly it happens on new maps and new creatures/items. I don't think I ever saw anyone fall off unless it was during a broadcast of new content, hence why I'd love to know which content and why they were falling off and sometimes telling me of crashes.

    I have to assume it's something about the sizes of the images or memory usage on their clients. I probably had 3-4 maps loaded, but all but one of those were medium-sized tiled maps drawn inside d20pro itself. I had pre-downsized the remaining map to ~1MB jpeg so it wouldn't be too crazy.

    I notice that 3 of my 10 new tokens were 800KB when I wouldn't have guessed they imported so large. So one thing I'll try before our next game is to manually downsize creature/item pictures substantially. Yet I know I'm waaay out of range for even what a typical website would have in terms of total image size... I'm not sure how the clients fall over, and I'm hoping a debug log will help me pinpoint it, if such a thing was possible.

    Thanks for the response, by the way,
    -Mattie
     
  4. Golkiwu

    Golkiwu Member

    Joined:
    Sep 7, 2010
    Messages:
    365
    Likes Received:
    5
    Have you looked at the memory settings for Java on you and all of your players D20PRO applications? When you execute D20PRO, there is a Batch File that runs (looks like a little DOS Window) right before the D20PRO Main screen comes up. This file has a designation of how much RAM your D20PRO will allocate. I know on the 2.4 release that the updater has options to set this, but I have found that editing the Batch File is effective. I had some super lag issues with my players (only 2 slots) and found that their settings were all at 512mb. Once I corrected the memory (I think they all set to 1024 mb) then the lag went away (I run mine at 1.5 GB).

    The Batch files are in your D20PRO Folder, and will be labeled as d20pro but listed type will be "Windows Batch File". You can open this file in Notepad to edit it.

    NOTE:You should create a copy of this file elsewhere as a backup, and there are separate batch files for 64 bit , and are labeled with the 64 in the name.


    You will see a string of code that looks like this:

    @echo off
    setlocal

    REM By default, we locate java in the path. If you do not have a valid 32bit JRE found first in the path
    REM The update the below with a full absolute path to a javaw.exe
    set JAVA=javaw

    start %JAVA% -Xmx512m -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw -Dsun.java2d.d3d=false -jar d20Pro.dat

    The part you will change is the -Xmx512m . You can change the number from 512 to 768 or 1024 and then save the file. When you run D20PRO again, it will utilize this new allocation of RAM on the machine it is running on. This should be reviewed on all player machines as well. The rule of thumb is to never allocate more than 1/4 of your PC's total ram to this process. If you are only running 2 gigs of RAM, leave it as 512m. I have 8 GB, so I run it at 1.5 GB (1536m).

    I have seen these settings at 256m, and that is super slow. If your players are running with the default settings, this could be part of your connectivity issue.

    Just my 2 cents

    :D
     
  5. neofax

    neofax New Member

    Joined:
    Apr 24, 2010
    Messages:
    123
    Likes Received:
    0
    To piggyback on Golkiwu's sane advice, you should make sure everyone that is playing has the same settings in their batch file. The reason is if you set your system to 1.5GB and someone else has 768MB and you broadcast a large file they may be at their memory threshold and(I am not quite positive on this part with d20Pro) their system may begin thrashing moving assets out of memory cache and to the temp cache and may cause a timeout depending on their network stack.
     
  6. Vision9000

    Vision9000 Member

    Joined:
    Jul 17, 2011
    Messages:
    36
    Likes Received:
    1
    Last Friday, my group had to give up on d20Pro for the session and use MapTools on-the-fly (which I didn't have materials prepped for, aside from it being my first time using it). People kept timing out and freezing, seeing only a grey background and some of the characters.

    We'd played fine with two connections the week before that (after several minutes while a large map loaded [6MB]), but the 3rd person kept stalling and couldn't enter until the others left for the night.

    I'm upgrading my DSL to get 768kbps upstream to help serve up the maps. In the meantime, we tried to get one of the players to host. We used Hamachi for the virtual LAN to avoid port blocking (thanks Curtis!). But nobody else could get us to connect--I think they had security software preventing java and/or d20Pro from running as a server.

    After 3+ frustrating hours troubleshooting and experimenting, we ended up successfully using Skype, Hamachi and MapTools to game for a couple of hours.

    We'll attempt it again this Friday: I'll host from a friend's house with cable broadband, using Hamachi to avoid port blocking. I'll host on my laptop where I've got the permission to run java and d20Pro as server apps.

    Also, thanks to posts regarding issues like this, we'll be sure all of the clients have more JVM memory allocated, and potentially allocate the same for each if everyone has plenty to spare. I already had my 64-bit batch file allocating 2GB RAM.

    The smallest map I tried to get to everyone was "Double Bolt Inn" at 4MB. I imported it when creating a map and it was in the clipboard from a PDF snapshot.

    I found some tools, first PNG Crush, then IrfanView http://www.irfanview.com/index.htm which rocks!

    With IrfanView and the plugins (pack with all included):

    - Auto-adjust colors
    - Reduce colors from 16.7 million to 256 (it still looks fine since it's not a photo, but a drawing)
    - Save compression level 9 (max) and PNGOUT plugin (defaults)

    The file reduced 75% to 1MB! (it loads fine in d20Pro; I copied the "original" and compressed/optimized to be the same name expected in the directory)

    I'll be using the various tips provided in posts and which I outlined above in an attempt for a successful game this coming Friday. I've had to pull out all the stops since my LAN games had no issues (except perhaps some lag after idleness until GC'ing).
     
  7. Daeruin

    Daeruin New Member

    Joined:
    Dec 24, 2010
    Messages:
    251
    Likes Received:
    1
    My group had serious connection issues last game as well. I have five players. Three of them kept dropping in and out of the game over and over, probably close to 20 times during the four-hour session. Luckily, the players always reconnected to the game automatically within a few seconds. I loaded three maps right at the beginning of the session, to make sure they were available and so we didn't have to put the game on hold to wait for them. Each map was about 1.1 MB. It took probably half an hour for all three of the maps to load for all five players. I have a pretty fast internet connection—20 Mbps download, 800 Kbps upload.

    I wonder if increasing the memory allocated to Java would help. How would one do this on a Mac?
     
  8. Vision9000

    Vision9000 Member

    Joined:
    Jul 17, 2011
    Messages:
    36
    Likes Received:
    1
    Success!

    One of the players helped troubleshoot by pinging and I turned off some other things on my laptop (not my workstation) and rebooted, and ended up being able to host.

    We connected to Ventrilo for push-to-talk voice-chat RP & OOC, Hamachi for VLAN to bypass port-blocking, and the most excellent ("prismatic spray", no wait...) d20Pro.

    The cable broadband and optimized PNG's REALLY helped with the game. It took less than a minute for even the largest overview maps to load.

    Epic battles ensued, handled deftly with the computerized interface and gorgeous imported graphics.

    People had so much fun in this second session (the first one in d20Pro with their new characters), that we played again Saturday as a special add-on session.
     
  9. edwardcd

    edwardcd Administrator
    Staff Member

    Joined:
    Oct 13, 2010
    Messages:
    1,374
    Likes Received:
    9
    With about 512MB allocated for Java, you should be able to handle up to 100MB in maps before Java reaches capacity (Player side). However, if you have the RAM to spare it doesn't hurt to allocate more RAM to Java. click here for a quick tutorial how to increase the allocation of RAM to Java on Mac.

    With 800 Kbps upload speed it should only take you roughly (1.1MB =8,800 Kbites x 5 players = 44,000 Kbits of data / 800 Kbps) = 55 seconds for each map if all your players have at least an 800 Kbps download speed connection.

    Now, if your players are having some connection issues you can have them reconnect using a different login name. What this will do is create a new player file (on the player's computer in the d20Pro directory) and hopefully the transmitted maps will be received and stored properly as data files. Alternatively, you could have your player (who's having connection troubles) delete all their player files inside the following directory \d20Pro\player\campaigns then reconnect using their same login name.
     

Share This Page