Troubleshooting

From ENIGMA
Jump to navigation Jump to search

This page will provide several commonly encountered problems, errors, exceptions, or issues, and try to provide a solution, workaround, or at the very least, an explanation for why that is the way it is. Remember to always ensure that you are using the most up-to-date version of ENIGMA, because if you're using an older version, it's likely that we already spotted and corrected your problem in a more recent version. If you are using the portable ZIP version, it may be worth checking out the git version to see if maybe we just haven't released a stable version with the bugfix yet.

The first step to accurately identifying your problem is to run the program from the command line. This provides a lot of useful output and debug information, if not for you, at least for whomever is trying to help you.

If your problem is not listed here, feel free to ask for help.

Just to define our terms in advance:

  • LateralGM (written in Java, LGM is the IDE)
  • ENIGMA (written in C++, ENIGMA is the Compiler)
  • Java or JVM (When Java runs, it's called a JVM)
  • DLL (what ENIGMA is. It's just invoked by LateralGM)

Issues Starting ENIGMA

How do I make ENIGMA run with administrative privileges?

  1. Right click on the installer
  2. From the menu, click Properties
  3. Click on the tab Compatibility
  4. Ensure the box 'Run this program as an administrator' is checked
  5. Try running it again
  6. If it still doesn't work, set the installer to use compatibility settings for Windows 7

Why do I get "Can't obtain updateLastError" when launching?

You may have Java Native Access installed from your package manager for another program. LateralGM requires a specific version of JNA in order to run. To resolve this error you can pass -Djna.nosys=true to lateralgm.jar when launching so it uses its own JNA that should be located in the plugins/shared directory next to lateralgm.jar.

Why do I get a black screen when opening ENIGMA/LateralGM?

This is a problem with some graphics card drivers and Java2D which is the underlying Java API that does the painting in Swing applications like LateralGM. There are a couple of solutions that you can try.

The first solution is to set your graphics card's anti-aliasing mode to use the applications settings.

If that does not work you can go to LGM's File->Preferences->Appearance tab and disable Direct3D. You should also be able to set this on the command line if the black screen makes it difficult to navigate to preferences. You can add this command to the idecommand setting in settings.ini which is located next to ENIGMA.exe as well so that you don't have to type it every time you launch LGM.

java -Dsun.java2d.d3d=false -jar lateralgm.jar

If problems persist you can find additional command line parameters to try with idecommand at http://docs.oracle.com/javase/7/docs/technotes/guides/2d/flags.html

Why am I getting an error about compileEGMf?

Most likely you probably ran the LateralGM jar file, you need to open "enigma.exe" with administrative priveleges instead so that ENIGMA can build and compile its engine and create the compileEGMf library. Once you open ENIGMA the first time you will need to wait a few seconds while ENIGMA compiles its engine, you won't have to wait so long after the first time you build. If the compileEGMf file is present, then it's possible the plugin cannot use it. This is known to happen because of a 64bit JRE. You should download and install x86/32 bit Java instead.

If you still get the same error you can try to manually rebuild the compiler. Follow these instructions to do so on Windows.

  1. Close all LateralGM and ENIGMA processes.
  2. Open the git-bash program inside the ENIGMA folder.
  3. Type "rebuildcompiler" and hit enter.
  4. Once it is finished try launching "enigma.exe" again with administrative privileges.

On Linux and Mac there is no rebuildcompiler script, so you will have to cd to "enigma-dev/CompilerSource" from a terminal and then type "make" and hit enter.

If you have multiple Java versions installed in parallel and none of the above worked then you need to either uninstall the Java version we do not support or explicitly launch LateralGM with the supported Java version. For instance, if you have Java 6 and Java 8 installed, since we only support Java 7, when launching ENIGMA Java may choose to launch it in Java 6 by default causing the exception. Please see Java Parallelization for more information.

Error: could not find java.dll

If you get an error like this:

Copyright (C) 2013 The ENIGMA Team

Checking Java Installation
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
ERROR! Could not find Java.exe. Please install Sun's Java runtime environment.
http://www.java.com/en/download/manual.jsp

If you already have Java, and believe you have received this message in error, you could try adding it to your system PATH variable.

Then you have conflicting Java versions. This is not actually an ENIGMA error, but a Java configuration error. Even though it says "could not find Java", it in fact ran java.exe which displayed this error. This means that you installed the 1.7 version of Java, while not removing 1.6 version of Java. Usually the fix is to delete java.exe and javaw.exe in the system32/sysWOW64 folder. See here for more information: http://stackoverflow.com/questions/15277496/registry-key-has-value-1-7-but-1-6-is-required-java-1-7-is-installed

Issues Compiling Game

Why do I keep getting an error regarding resource names?

Most likely you have resources with odd names. For example, you cannot use spaces or !@#$%^&*(){}[]:;"'<,>./? symbol characters in the name of a resource because it is not common practice with a game engine. Additionally you may also have two resources with the same name which ENIGMA currently does not support. The resource names in ENIGMA, and GameMaker, should be unique valid identifiers, similar to C++ variable names. Attempt to fix the names of your resources and recompile.

Why am I having trouble compiling?

This could be due to any number of reasons, but one sure cause is using spaces in your MinGW install or your compile path. MinGW and GCC do not like spaces, which is why we recommend installing MinGW to the default location on Windows.

Why am I getting a popup about d3dx9_43.dll?

On Windows, ENIGMA has the ability to use Direct3D graphics native to the platform. This is a common error message displayed by DirectX applications when run if the end user does not have the runtime installed. Simply download the latest DirectX runtime from Microsoft at the link below if you intend to use DirectX for your game, or else set OpenGL instead under API settings.
http://www.microsoft.com/en-us/download/details.aspx?id=35

The full error message reads as follows...
The program can't start because d3dx9_43.dll is missing from your computer. Try reinstalling the program to fix this problem.

Why am I getting a popup about xinput1_3.dll?

Similar to the d3dx9 dll error, XInput extension is in use when this error occurs except the DirectX end user runtime is not installed, download it from the above link.

Why does ENIGMA keep throwing compile errors in Windows 8?

If you keep getting compiling errors once the program is installed:

  1. Find the shortcut to ENIGMA (in your start menu or on the desktop)
  2. Right click on it
  3. Click 'Open file location' (you should now see the program called enigma.exe or similar)
  4. Make enigma.exe run as an administrator

Invalid search directories returned. Start search string does not match a line

This happens when installing on a Linux machine where the OS language (locale) is other than English, to fix it:

1) Close Enigma
2) Open a terminal and type/copy this: gcc -E -x c++ -v /dev/null and push the enter key
3) On your Enigma folder go to Compilers => Linux
4) Locate this file gcc.ey
5) Open it in your favourite text editor (Gedit, Vim, Etc.)
6) You'll see something like this:

%e-yaml
---

Name: GNU GCC G++
Native: Yes
Maintainer: RetroX
Target-platform: Linux

#Some info about it

path:
make: make
cc: gcc
cxx: g++
defines: cpp -dM -x c++ -E $blank
searchdirs: gcc -E -x c++ -v $blank 
searchdirs-start: "#include <...> search starts here:"
searchdirs-end: "End of search list." 
resources: $exe
cppflags:
cxxflags:
cflags:
ldflags: 
links: 

Build-Extension:
Run-output: $tempfile
Run-Program: $game
Run-Params:

7) Modify the file until it matches this:

%e-yaml
---

Name: GNU GCC G++
Native: Yes
Maintainer: RetroX
Target-platform: Linux
# Some info about it
path:
make: make
cc: gcc
cxx: g++
defines: cpp -dM -x c++ -E $blank
searchdirs: gcc -E -x c++ -v $blank
 /usr/include/c++/4.7
 /usr/include/x86_64-linux-gnu/c++/4.7/.
 /usr/include/c++/4.7/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include

resources: $exe
cppflags:
cxxflags:
cflags:
ldflags: 
links: 

Build-Extension:
Run-output: $tempfile
Run-Program: $game
Run-Params:

8) Save the file and close the editor
9) Run enigma

(Taken and expanded from : http://enigma-dev.org/forums/index.php?topic=1402.msg14020#msg14020 )


Other Issues

SIGSEGV, totally crashing LateralGM

Problem

LateralGM suddenly terminates/crashes, and the terminal displays some strange message which mentions SIGSEGV and a memory dump.

Explanation

Actually, ENIGMA kicked the can and threw a Segmentation Fault (segfault, SIGSEGV). This is a common C/C++ issue which typically occurs when you try to access memory totally out of bounds of where you should be accessing it. Java completely forgot about language design, which makes Java's version of this error, various fatal exceptions that could be impossible if the creators had had a few brain cells, all the more amusing. What happens is, LateralGM and ENIGMA share some memory. ENIGMA oversteps that memory (usually the cause), and throws a segfault. The JVM, unable to recover, decides to display the error and a memory dump, and then die. When the JVM dies, so does LateralGM. So technically, LGM isn't crashing, the whole JVM is crashing, and LGM is just along for the ride.

Solution

Try to make the problem reproducible, and then report it. There are two common ways the problem can be caused: ENIGMA is just plain broken, and trying to compile a blank game segfaults, OR you wrote some weird code somewhere - usually in Definitions. In the latter case, try to identify what piece of code broke it, and when reporting, share that code. As a temporary workaround, don't do that!

OutOfMemoryError

Problem

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

Explanation

Java is only able to expand its memory so much. This default amount is sufficient for a vast majority of applications, but occasionally things can get large, especially if you are working on a very large project with big images and sounds. The development team is aware of this issue, and is working on ways of using less memory by only loading large resources when they are needed, but we still have a bit of a ways to go.

Solution

Initially LateralGM has a memory limit imposed by Java of about 64mb[1]. Some large Enigma/Game Maker Games will reach this limit and will result in a OutOfMemory error on the command line. In order to fix this you can run LGM with the minimum and maximum memory values like so: java -Xms400M -Xmx400M -jar lateralgm.jar Which will run LateralGM with 400MB of memory.

References

<references>