Defold-linux.sh Returns a Error and Doesn't Run

I’m running Xubuntu 32 bit, and I tried ./Defold-linux.sh, but I got this error:

***********@*****************:~/Downloads/Delfold$ ./Defold-linux.sh
./Defold-linux.sh: line 35:  3405 Segmentation fault      (core dumped) "${_EXECUTABLE_PATH}"
***********@*****************:~/Downloads/Delfold$ 

Does anyone know how to fix this? I tried to do chmod +x Defold-linux.sh only to get this error again.

Here’s the code from Defold-linux.sh:

#!/usr/bin/env bash
set -eu

# ----------------------------------------------------------------------------
# Environment
# ----------------------------------------------------------------------------
SCRIPT_NAME="$(basename "${0}")"
SCRIPT_PATH="$(cd "$(dirname "${0}")"; pwd)"
trap 'terminate 1 "Launch error: An error occurred."' SIGINT SIGTERM EXIT


# ----------------------------------------------------------------------------
# Functions
# ----------------------------------------------------------------------------
function terminate() {
  trap - SIGINT SIGTERM EXIT
  echo "${2:-Terminated.}"
  exit ${1:-1}
}

  function setup_xulrunner() {
    _CONFIG_PATH="${SCRIPT_PATH}/Defold.ini"
    _KEY="-Dorg.eclipse.swt.browser.XULRunnerPath"
    _VAL="${SCRIPT_PATH}/xulrunner"
    if grep -- "${_KEY}" "${_CONFIG_PATH}" > /dev/null 2>&1; then
      sed -ir "s#${_KEY}=.*#${_KEY}=${_VAL}#g" "${_CONFIG_PATH}"
    fi
  }

  function setup_ubuntu_unity() {
    # This is unnecessary but harmless on unaffected distributions.
    export UBUNTU_MENUPROXY=0
  }

  function execute_defold() {
    _EXECUTABLE_PATH="${SCRIPT_PATH}/Defold"
    if [ -f "${_EXECUTABLE_PATH}" ]; then
      trap - SIGINT SIGTERM EXIT
      "${_EXECUTABLE_PATH}"
    fi
  }

# ----------------------------------------------------------------------------
# Script
# ----------------------------------------------------------------------------
setup_xulrunner
setup_ubuntu_unity
execute_defold
terminate 0 "Done"

Can you upload Defold-linux.sh somewhere to look at?

Are you using the unmodified file from the Defold Editor 1 Linux version? What if you try Editor 2?

I can’t, because I run Linux 32, and Editor 2 only for Linux 64. Can anyone tell me how to fix the script, or run it another way?

I’m not sure why it fails. We develop/test on Ubuntu 16, and maybe there’s some difference between that and XUbuntu?

It would be interesting to see an actual dump if you can find that? (See the (core dumped) "${_EXECUTABLE_PATH}" output )

@sergey.lerg The script is found in the zip file

1 Like

I am experiencing the same problem on Ubuntu 16.04 LTS, so there is no issue with the OS, so it may be a package that’s missing. I can’t seem to find a page listing the dependencies (if any) for Defold on Linux. And finally, here’s the core dump from the defold-linux.sh segmentation error.

[Here’s the dump!]

Cheers! :smiley:

The requirements are OpenSSL and OpenAL (see FAQ).
Good to know that the issue can occur on Ubuntu 16 as well. Will take a look at the dump tomorrow.

Btw, does the Editor 2 work for you?

1 Like

I can’t say for sure, since I also am running a 32-bit system :frowning:, and I’ll try installing OpenSSL and OpenAL in the meantime.

[Edit] After installing OpenAL (OpenSSL was installed), there was no change.