-
Notifications
You must be signed in to change notification settings - Fork 99
Troubleshooting
This page exposes some of the most common problems a user may encounter when running GAMA — and offers advices and workarounds for them. It will be regularly enriched with new contents. Note also that the Issues section of the website might contain precious information on crashes and bugs encountered by other users. If neither the workarounds described here nor the solutions provided by other users allow to solve your particular problem, please submit a new issue report to the developers.
In case GAMA crashes whenever trying to display an OpenGL display or a Java2D, and you are running Ubuntu 21.10 (or earlier), it probably means that you're using Wayland as Display backend. You can fix it by running in a terminal export GDK_BACKEND=x11
and launch GAMA from this same terminal. This workaround is described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=577515 and in Issue 3373.
GAMA have trouble managing custom GTK theme (specially dark ones, see this issue). The simplest solution is to explicit change the theme to the default Adwaita as an override of the environment variable.
Simply edit the file at /usr/share/applications/gama-platform.desktop
and add GTK_THEME=Adwaita
on the line starting by Exec=
. You should have something like this :
Exec=env GTK_THEME=Adwaita GDK_BACKEND=x11 /opt/gama-platform/Gama
Save the file wait a few seconds and restart GAMA normally.
Note, if you want to force the dark mode, add this instead GTK_THEME=Adwaita:dark
If you are starting GAMA from the command line, use this command :
GTK_THEME=Adwaita /path/to/Gama
or this one to use the dark theme variant :
GTK_THEME=Adwaita:dark /path/to/Gama
When GAMA has just been downloaded and installed, it needs to be first launched in its GUI version before using it in the headless mode. If it is first launched in the headless mode, GAMA will be damaged and the installed version needs to be removed and re-installed.
It has been reported that on Windows, for displays with a scale factor of 175%, 225%, 250% and 300%, the value of the variable #user_location
is wrong (seems to be multiplied by 1.75, 2.25, 2.5 or 3) to avoid those problems we recommend that you stick to scaling factors of 100%, 125%, 150% or 200%.
Some Radeon graphics cards may cause GAMA to crash when using Opengl displays. The best solutions in this case are either to switch to java2D display or, if the computer is equipped with two graphics cards, to specify that the other graphics card should be used for GAMA (see here).
Sometimes just setting the second GPU as recommanded for GAMA won't be enough and Windows will still try to run it from the Radeon chipset, you can try setting the second GPU as the default GPU for everything, for example with NVIDIA cards, in NVidia control panel you can set it as prefered graphics processor
in the Global settings
tab.
Alternatively, it has been reported that installing the latest version of AMD Software: Adrenalin edition
(last tried successfully with 22.10.1) solved the problem but at the cost of very slower rendering.
For high-DPI screens, it is possible to observe an offset in java2D displays (not centered, not taking the whole panel, with an erroneous mouse location) when a scaling value is not a value divisible by 100, for example a scaling of 250%. Changing the scaling factor for a value divisible by 100 (200%, 300%) solves the problem.
The most common causes of problems when running GAMA are memory problems. Depending on your activities, on the size of the models you are editing, on the size of the experiments you are running, etc., you have a chance to require more memory than what is currently allocated to GAMA. A typical GAMA installation will need between 2 and 4GB of memory to run "normally" and launch small models. Memory problems are easy to detect: in the bottom-right corner of its window, GAMA will always display the status of the current memory. The first number represents the memory currently used (in MB), the second (always larger) the memory currently allocated by the JVM. And the little trash icon allows to "garbage collect" the memory still used by agents that are not used anymore (if any). If GAMA appears to hang or crash and if you can see that the two numbers are very close, it means that the memory required by GAMA exceeds the memory allocated.
There are two ways to circumvent this problem: the first one is to increase the memory allocated to GAMA by the Java Virtual Machine. The second, detailed on this page is to try to optimize your models to reduce their memory footprint at runtime.
To increase the memory allocated, first locate the file called Gama.ini
. On Windows and Ubuntu, it is located next to the executable. On Mac OS X, you have to right-click on Gama.app
, choose "Display Package Contents...", and you will find Gama.ini
in Contents/Eclipse
.
This file typically looks like the following (some options/keywords may vary depending on the system), and we are interested in two JVM arguments:
-Xms
supplies the minimal amount of memory the JVM should allocate to GAMA, -Xmx
the maximal amount. By changing these values (esp. the second one, of course, for example to 4096M, or 4g, or more!), saving the file and relaunching GAMA, you can probably solve your problem. Note that 32 bits versions of GAMA will not accept to run with a value of -Xmx
greater than 1500M. See here for additional information on these two options.
By default the charts of a running experiment are only updated when you are in the experiment view. Therefore if you want to be able to run an experiment and plot its results while still working on the code of a model, you should make sure that the option Continue to draw displays when in Modeling perspective
is set to true in the Presentation and Behavior of Graphical Display Views
section of the Display
tab in the settings.
If you think you have found a new bug/issue in GAMA, it is time to create an issue report here! Alternatively, you can click the Issues tab on the project site, search if a similar problem has already been reported (and, maybe, solved) and, if not, enter a new issue with as much information as possible:
- A complete description of the problem and how it occurred.
- The GAMA model or code you are having trouble with. If possible, attach a complete model.
- Screenshots or other files that help describe the issue.
Two files may be particularly interesting to attach to your issue: the configuration details and the error log. Both can be obtained quite easily from within GAMA itself in a few steps. First, click the "About GAMA..." menu item (under the "Gama Platform" menu on Mac OS X, "Help" menu on Linux & Windows)
In the dialog that appears, you will find a button called "Installation Details".
Click this button and a new dialog appears with several tabs.
To provide complete information about the status of your system at the time of the error, you can
(1) copy and paste the text found in the tab "Configuration" into your issue. Although, it is preferable to attach it as a text file (using TextEdit, Notepad or Emacs e.g.) as it may be too long for the comment section of the issue form.
(2) click the "View error log" button, which will bring you to the location, in your file system, of a file called "log", which you can then attach to your issue as well.
- Installation and Launching
- Workspace, Projects and Models
- Editing Models
- Running Experiments
- Running Headless
- Preferences
- Troubleshooting
- Introduction
- Manipulate basic Species
- Global Species
- Defining Advanced Species
- Defining GUI Experiment
- Exploring Models
- Optimizing Model Section
- Multi-Paradigm Modeling
- Manipulate OSM Data
- Diffusion
- Using Database
- Using FIPA ACL
- Using BDI with BEN
- Using Driving Skill
- Manipulate dates
- Manipulate lights
- Using comodel
- Save and restore Simulations
- Using network
- Headless mode
- Using Headless
- Writing Unit Tests
- Ensure model's reproducibility
- Going further with extensions
- Built-in Species
- Built-in Skills
- Built-in Architecture
- Statements
- Data Type
- File Type
- Expressions
- Exhaustive list of GAMA Keywords
- Installing the GIT version
- Developing Extensions
- Introduction to GAMA Java API
- Using GAMA flags
- Creating a release of GAMA
- Documentation generation