How to collect information for bug reports on Mac & Linux

Discussion in 'PC Bug Reports' started by Maximo, Aug 2, 2015.

  1. Maximo

    Maximo Terrarian

    I thought it would be useful to have a thread that explains to the average person how to collect information for inclusion with bug reports, so here it is!

    Notes

    • You should include the crash log if Terraria fails to open or abruptly closes.
    • You should include the console log if Terraria fails to open or you discover a reproducible issue that occurs while playing Terraria. The console log can only be viewed when you open Terraria from a terminal.

    OS X

    Determining your version of OS X

    1. Choose About this Mac from the Apple menu.

    Viewing the crash log

    1. Open Terminal.
    2. Enter:

      Code:
      open -e "${HOME}/Library/Application Support/Steam/steamapps/common/Terraria/Terraria.app/Contents/MacOS/client-crashlog.txt"

    Viewing the console log

    1. Ensure that Steam is open.
    2. Open Terminal.
    3. Enter:

      Code:
      "${HOME}/Library/Application Support/Steam/SteamApps/common/Terraria/Terraria.app/Contents/MacOS/Terraria"

    [​IMG]

    Taking a screen capture

    See Apple Support article HT201361.

    Linux

    Determining the version of your Linux distribution

    1. Open a terminal.
    2. Enter:

      Code:
      xdg-open /etc/os-release

    Viewing the crash log

    Note: The crash log won't be created unless you permit Terraria to perform process tracing. (See the Appendix section.) [Thanks to BlueLagoon for providing this information.]

    1. Open a terminal.
    2. Enter:

      Code:
      xdg-open "${HOME}/.steam/steam/steamapps/common/Terraria/client-crashlog.txt"

    Viewing the console log

    1. Ensure that Steam is open.
    2. Open a terminal.
    3. Enter:

      Code:
      "${HOME}/.steam/steam/steamapps/common/Terraria/Terraria"

    Taking a screen capture

    1. Press print screen.

    Advanced

    OS X

    You can make Terraria always save its console output to a file by replacing the contents of its wrapper script with the following:

    Code:
    #!/bin/bash
    
    log="${HOME}/Library/Logs/Terraria.log"
    
    cd "$(dirname "$0")"
    
    export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:./osx/
    ./Terraria.bin.osx | tee -a "${log}"
    Appendix

    To permit Terraria to perform process tracing:

    1. Open a terminal.
    2. Enter:

      Code:
      cd "${HOME}/.steam/steam/steamapps/common/Terraria" && \
      for file in Terraria TerrariaServer; do
          sudo setcap cap_sys_ptrace=eip "${file}"
      done
     
    Last edited: Aug 4, 2015
  2. andrewgies17

    andrewgies17 Terrarian

    A slightly easier way of viewing the crash log for those users scared of Terminal:
     
    Arkhayla and Bethany like this.
  3. Maximo

    Maximo Terrarian

    Whaaah? Terminal is your friend. :)

    The following is an even easier method!:

    1. In Finder, press shift-command-G.
    2. Enter "~/Library/Application Support/Steam/steamapps/common/Terraria/Terraria.app/Contents/MacOS/client-crashlog.txt".
    3. Press return.
     
    Arkhayla likes this.
  4. andrewgies17

    andrewgies17 Terrarian

    I use it every day, but many people are (rightfully) afraid that they might rm their entire computer. ;P
     
  5. lordgiddion

    lordgiddion Terrarian

    I've had problems where Terraria just closes, no prompt or anything. Looking for the client-crashlog.txt and there is no file.
     
  6. andrewgies17

    andrewgies17 Terrarian

    This isn't the place to be reporting issues, look through this group for a thread describing a similar problem and add your details, or if you can't find a similar problem create a new thread.
     
  7. BlueLagoon

    BlueLagoon Terrarian

    On linux, the client-crashlog.txt is not generated if ptrace is disabled for non-parent process (it is the default behaviour on Ubuntu IIRC). See http://askubuntu.com/a/41656 for more information.
     
  8. Water Filter Salesman

    Water Filter Salesman Skeletron Prime

    Thanks for creating this thread, hopefully it will stop the big reports that have absolutely no information about the bug or the system.:D
     
    Arkhayla likes this.
  9. Arkhayla

    Arkhayla Quality Director Re-Logic

    Nice thread guys!
     
    Water Filter Salesman likes this.
  10. andrewgies17

    andrewgies17 Terrarian

    I wanted to share the way I set up the Terraria launch script (On OSX) to log everything while preserving the logic in the newer builds' launch scripts:
    Code:
    #!/bin/bash
    # MonoKickstart Shell Script
    # Written by Ethan "flibitijibibo" Lee
    
    # Move to script's directory
    cd "`dirname "$0"`"
    
    # Get the system architecture
    UNAME=`uname`
    ARCH=`uname -m`
    
    LAUNCHDATE=`date`
    printf "\n\n--------------------------\n$LAUNCHDATE\n" >> client-log.log
    # MonoKickstart picks the right libfolder, so just execute the right binary.
    if [ "$UNAME" == "Darwin" ]; then
        # ... Except on OSX.
        export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./osx/
        ./Terraria.bin.osx [email protected] >> client-log.log
    else
        if [ "$ARCH" == "x86_64" ]; then
            ./Terraria.bin.x86_64 [email protected] >> client-log.log
        else
            ./Terraria.bin.x86 [email protected] >> client-log.log
        fi
    fi
    
    The changes/additions I made were:
    • The LAUNCHDATE declaration.
    • The printf log header.
    • The three >> client-log.log additions to the terraria launches.
     
    Skiphs and Maximo like this.
  11. shamu1122

    shamu1122 Eye of Cthulhu

    I'm not sure if this is a glitch or not, but whenever I try to join a server that's run on windows it says that "the server is not using the same version" . I thought that all the versions were now compatible?
     
  12. andrewgies17

    andrewgies17 Terrarian

    A) This isn't really the place to be discussing this.
    B) Are you sure that the server has updated to the latest version?
     
  13. shamu1122

    shamu1122 Eye of Cthulhu

    Sorry about this being the wrong place,

    I'm not sure if it is ill have to check, Thanks :)
     
  14. Nobzaemon

    Nobzaemon Terrarian

    What do we have to do when we play GOG edition?