Skip to content

[Save] index out of bounds when trying to save to a file from a gaml file outside of the workspace  #318

Description

@chapuisk

Describe the bug
When calling the save statement in a model that is not in the workspace, Gama stoped with an index out of bounds exception

To Reproduce
Steps to reproduce the behavior:

  1. Create a txt file with extension .gaml anywhere in your computer
  2. copy/pass
global {
	init {
		save ["toto","tata"] to:"../res.csv" format:"csv";
	}	
}
experiment xp {}
  1. WARNING : don't forget to put model nameofyourfile as header of the file
  2. Import gaml file but do not copy it in workspace
  3. Launch the experiment
  4. See error

Expected behavior
Save statement works fine wherever the gaml file is

Desktop (please complete the following information):

  • OS: MacOS and Windows 10
  • PC Model: Laptops
  • GAMA version: git and 1.9.3

Context
During a training session, I share a gaml files with participants and many of them have the error

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions