gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
304 stars 99 forks source link

Backup doesn't work with BDI agents #3111

Closed pbouille closed 2 years ago

pbouille commented 3 years ago

Steps to reproduce

1.Open GoldMiner_BDI model

2.Add backup on demand by a button

experiment GoldBdi type: gui { float minimum_cycle_duration <- 0.05; output { display map background:#gamablue type:opengl { species base ; species miner aspect:default; species gold ; } }

//Ajout d'un bouton de sauvegarde
user_command "sauvegarder" {
    do sauvegarder;
}

//Méthode de sauvegarde
action sauvegarder {
    int result <- save_simulation("backup.gsim");
}

}



### Expected behavior
The simulation crahs and error log contains the following

-------------------------------
message             : Could not call java.util.concurrent.CopyOnWriteArrayList.writeObject()
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       : Could not call java.util.concurrent.CopyOnWriteArrayList.writeObject() : null
-------------------------------
-------------------------------
-------------------------------
-------------------------------
-------------------------------
com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154)
com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:256)
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:89)
com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:256)
when applying the save_simulation operator on backup.gsim
in int result <- save_simulation('backup.gsim');
in action sauvegarder  {
    int result <- save_simulation('backup.gsim');
}

in do sauvegarder ;
in user_command 'sauvegarder'  {
    do sauvegarder ;
}

in agent GoldBdi0

### System and version 
GAMA 1.8 on Windows10

Best Regards
Philippe Bouillet - IMT Mines Alès
[log_error.txt](https://github.com/gama-platform/gama/files/6630498/log_error.txt)
[GoldMiner_BDI_gaml.txt](https://github.com/gama-platform/gama/files/6630527/GoldMiner_BDI_gaml.txt)
LucasGrjs commented 2 years ago

Just tested this issue and it's working

pbouille commented 2 years ago

Hello, Thanks for this message, but can you give me the version number where backup works fine with bdi agents, please ? (I'm using last "official" from website 1.8) Best regards. Philippe Bouillet

----- Le 4 Mai 22, à 13:37, Lucas Grosjean @.***> a écrit :

Just tested this issue and it's working

— Reply to this email directly, [ https://github.com/gama-platform/gama/issues/3111#issuecomment-1117208526 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ASCV2JXE5TAGJ5OAIX6KTX3VIJOQ3ANCNFSM46ODFBWA | unsubscribe ] . You are receiving this because you authored the thread. Message ID: @.***>

LucasGrjs commented 2 years ago

Hello, We are going to release the official 1.8.2 version of Gama in the next couple of weeks. When it will be release I will send you a message here so you will be able to download it!

Best regards. Lucas Grosjean