gama-platform / gama.old

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

Toy Models/life.gmal #928

Closed pcaillou closed 9 years ago

pcaillou commented 9 years ago
What steps will reproduce the problem?
1.Open Toy Models/Life.gaml
2. It seems to be very long to launch or not well initialized
3.

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.

Original issue reported on code.google.com by agrignard on 2014-03-29 13:16:57

pcaillou commented 9 years ago
What does "or not very well initialized" mean ? 

Original issue reported on code.google.com by alexis.drogoul on 2014-03-29 13:24:54

pcaillou commented 9 years ago
I tested this model with the "pre-release" of GAMA 1.6.1 and with GAMA Kepler, and it
works well on my computer (mac OS X 10.7.5, 64 bits; Java 1.7)

Original issue reported on code.google.com by patrick.taillandier on 2014-03-29 14:11:13

pcaillou commented 9 years ago
well I don't know exactly what happens. It seems to work on all other computers...

Here is the screenflow. I cannot see the display

Original issue reported on code.google.com by agrignard on 2014-03-29 15:00:53


pcaillou commented 9 years ago
I am on maverick 10.9.2

Original issue reported on code.google.com by agrignard on 2014-03-29 15:01:23

pcaillou commented 9 years ago
I'm on Maverick 10.9.2 as well. No problem using SVN/Release Java2D/OpenGL.

Things to check : are you running GAMA under Java 1.7 or Java 1.6 ? Do you have "special"
preferences enabled, esp. on OpenGL parameters ? Do you have the same problem in Java2D
?

Original issue reported on code.google.com by alexis.drogoul on 2014-03-29 15:36:05

pcaillou commented 9 years ago
java 1.7, no preferences in opengl

Well I have no clue of what's happening

When I launch the model the display window has an error and when I click on, the display
appear... 

As I am the only one to get this maybe we can close this issue that seems minor, no?

Original issue reported on code.google.com by agrignard on 2014-03-29 16:01:00


pcaillou commented 9 years ago
It is not minor and probably related to the fact that you're running on 1.7, whereas
this release is supposed to work better on 1.6. Can you try to change your version
of Java launched by default (with lib/exec/java-home) in order to run GAMA with 1.6
instead ? If you dont have problems, it would confirm that running JDK 1.7 is not advised
 on MacOS X

Original issue reported on code.google.com by alexis.drogoul on 2014-03-29 16:04:56

pcaillou commented 9 years ago
I did this:

Arnos-MacBook-Pro-2:JavaVirtualMachines Arno$ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/

Arnos-MacBook-Pro-2:JavaVirtualMachines Arno$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)

But I still have the same problem (also with segregation) (I am the only one to have
this... )

And sorry for the output but maybe it can helps:

Arnos-MacBook-Pro-2:Desktop Arno$ macosx.cocoa.x86_64/Gama/Gama.app/Contents/MacOS/Gama

[-keyring, /Users/Arno/.eclipse_keyring]
Version of the models in GAMA = .built_in_models_1395948446000
Welcome to GAMA version 1.6.1
GamaFileFactory registering file type xml with extensions [xml]
GamaFileFactory registering file type svg with extensions [svg]
GamaFileFactory registering file type gaml with extensions [gaml]
GamaFileFactory registering file type osm with extensions [osm, pbf, bz2, gz]
GamaFileFactory registering file type image with extensions [tif, tiff, jpg, jpeg,
png, gif, pict, bmp]
GamaFileFactory registering file type pgm with extensions [pgm]
GamaFileFactory registering file type property with extensions [properties]
GamaFileFactory registering file type shape with extensions [shp]
GamaFileFactory registering file type text with extensions [txt, data, csv, text, tsv,
xml]
GamaFileFactory registering file type grid with extensions [asc]
GamaFileFactory registering file type csv with extensions [csv, tsv]
>> GAMA bundle loaded in 209ms:     msi.gama.core
>> GAMA bundle loaded in 22ms:  simtools.gaml.extensions.traffic
>> GAMA bundle loaded in 4ms:   ummisco.gaml.extensions.sound
>> GAMA bundle loaded in 9ms:   irit.gaml.extensions.database
GamaFileFactory registering file type threeds with extensions [3ds, max]
GamaFileFactory registering file type obj with extensions [obj]
>> GAMA bundle loaded in 8ms:   msi.gama.jogl
>> GAMA bundle loaded in 1ms:   irit.gaml.extensions.test
>> GAMA bundle loaded in 4ms:   ummisco.gaml.extensions.maths
>> GAMA bundle loaded in 3ms:   idees.gama.mapcomparison
>> GAMA bundle loaded in 1ms:   msi.gama.application
>> GAMA bundle loaded in 3ms:   simtools.gaml.extensions.physics
>> GAMA bundle loaded in 15ms:  msi.gaml.extensions.fipa
>> GAMA total load time 295 ms.
2014-03-29 23:55:15.908 Gama[572:507] [Java CocoaComponent compatibility mode]: Enabled
2014-03-29 23:55:15.909 Gama[572:507] [Java CocoaComponent compatibility mode]: Setting
timeout for SWT to 0.100000
Configuring user interface access through SWT
0    [main] WARN  org.eclipse.xtext.ui.shared.internal.Activator  - Disabling JDT use.
: org/eclipse/jdt/core/JavaCore
172  [main] WARN  org.eclipse.xtext.ui.shared.internal.Activator  - Disabling JDT use.
: org/eclipse/jdt/core/JavaCore
Configuring user interface access through SWT + XText
Category:msi.gama.gui.wizards.GAMA
Category:org.eclipse.team.svn.ui.repository
Category:org.eclipse.ui.Basic
Category:org.eclipse.equinox.p2.category
Category:org.eclipse.team.svn.ui.repository
Category:org.eclipse.team.ui.importWizards
Category:org.eclipse.ui.Basic
Arguments received by GAMA : []
Gama perspective msi.gama.application.perspectives.ModelingPerspective is loaded
Gama perspective msi.gama.application.perspectives.SimulationPerspective is loaded
2014-03-29 23:55:36.864 Gama[572:21303] *** -[NSConditionLock unlock]: lock (<NSConditionLock:
0x11c658220> '(null)') unlocked when not locked
2014-03-29 23:55:36.865 Gama[572:21303] *** Break on _NSLockError() to debug.
2014-03-29 23:55:38.219 Gama[572:21303] *** -[NSConditionLock unlock]: lock (<NSConditionLock:
0x1003e1180> '(null)') unlocked when not locked
2014-03-29 23:55:38.219 Gama[572:21303] *** Break on _NSLockError() to debug.
2014-03-29 23:55:42.282 Gama[572:21303] *** -[NSConditionLock unlock]: lock (<NSConditionLock:
0x11c61c0c0> '(null)') unlocked when not locked
2014-03-29 23:55:42.283 Gama[572:21303] *** Break on _NSLockError() to debug.
2014-03-29 23:55:48.692 Gama[572:22a0b] *** -[NSConditionLock unlock]: lock (<NSConditionLock:
0x10014f010> '(null)') unlocked when not locked
2014-03-29 23:55:48.692 Gama[572:22a0b] *** Break on _NSLockError() to debug.

Original issue reported on code.google.com by agrignard on 2014-03-29 16:58:32

pcaillou commented 9 years ago
By commenting:

/*parameter 'Color of dying cells:' var: dyingcolor category: 'Colors';
parameter 'Color of emerging cells:' var: emergingcolor category: 'Colors';
parameter 'Color of dead cells:' var: deadcolor category: 'Colors';*/

in the life.gaml it's now working.

So something related to the grill init?

I could close this issue by just removing the parameter in the experiment (after all
they are not mandatory) but we should understand why the fact to put those parameter
make the model crashes

Original issue reported on code.google.com by agrignard on 2014-03-29 18:45:26

pcaillou commented 9 years ago
I agree that the problem is not to remove the symptoms, but to find the cause. Try to
debug the grid initialization, maybe, and understand how it can interfere with the
variables being declared as parameters or not. 

Original issue reported on code.google.com by alexis.drogoul on 2014-03-29 18:47:46

pcaillou commented 9 years ago
incomprehensible bug!!

I cannot figure out what is happenning here is the minimal model that reproduces it:

So this following model works:

model life

global {
    rgb livingcolor <- rgb('white');
    rgb deadcolor <- rgb('black');
    init {
        ask life_cell {
            do initColor;
        }
    }
}

grid life_cell width: 100 height: 100  {
    rgb color;
    action initColor{
     color <-deadcolor; 
    }   
}

experiment life type: gui {

    //parameter 'Color of dying cells:' var: livingcolor category: 'Colors';
    parameter 'Color of dead cells:' var: deadcolor category: 'Colors';

    output {
        display Life {
            grid life_cell;
        }
    }
}

but as soon as I decomment "parameter 'Color of dying cells:' var: livingcolor category:
'Colors';" it does not work anymore. 
The funny things is that I don't ever use this parameter livingcolor!!!

When this line is decommented I can display the life in the following case:

1.run the model
2.do ctrl+tab or go to other applciation
3.come back to gama.

In the eclipse console I get the following workflow:

!MESSAGE => description of /Life.gaml in 3.326 ms.
2014-03-31 10:03:06.323 java[1603:27623] *** -[NSConditionLock unlock]: lock (<NSConditionLock:
0x7fb6ae2084c0> '(null)') unlocked when not locked
2014-03-31 10:03:06.324 java[1603:27623] *** Break on _NSLockError() to debug.

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:06.449
!MESSAGE New seed for RandomAgent: null

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:06.449
!MESSAGE New seed for RandomAgent: null

================================just after the ctrl+tab ======================================

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:08.286
!MESSAGE GuiOutputManager.incInitializingViews: Life

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:08.357
!MESSAGE Briefly showing :Life

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:08.378
!MESSAGE Showing :Life

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:08.413
!MESSAGE First resize actions. Frame has been resized to 732452

!ENTRY org.eclipse.ui 4 4 2014-03-31 10:03:08.509
!MESSAGE Activating :Life

Once the frame has been resized i can finally get the display.

What I really do not understand is the influence of the parameter "livingcolor" on
the display whereas this parameter is not even used

Original issue reported on code.google.com by agrignard on 2014-03-31 03:08:40

pcaillou commented 9 years ago
I am under the impression that this issue is Mac OS X - only and results from a problem
of initial focus of the view (so it would be unrelated to the issue of color parameters,
unless the display of these parameters somehow change the way the parameters are displayed
and behave with respect to focus). 

Can someone test this several times on Windows and/or Ubuntu (esp. the two models in
case here, life and segregation cellular automata)  and see if the display fails to
materialize immediately ? From what I understand, it might also happen in models where
only charts are displayed. 

Original issue reported on code.google.com by alexis.drogoul on 2014-04-04 08:43:01

pcaillou commented 9 years ago
I test many times from the first times it posted but I cant reproduce on windows. I
mean I test by: open model in repository, click Exp. button, click play, click reload...
Do I need some more behaviors on resizing, moving views???

Original issue reported on code.google.com by hqnghi88 on 2014-04-04 09:12:04

pcaillou commented 9 years ago
Well — thanks for testing. I will close this issue and we will see what is reported
from the second pre-release whenever I will release it for testing.

Original issue reported on code.google.com by alexis.drogoul on 2014-04-04 11:39:43

pcaillou commented 9 years ago
I think (but I maybe wrong) that I've found the cause of this slowness / unresponsiveness
under MacOS X, which might be due to the use of the GraphicsEnvironment to create compatible
rasters (only for grids). Once again, I'm not sure at all and I may have had chance
several times in a row (as the bug is fairly random).

I will post an updated release soon, so that others can confirm the fix.

Original issue reported on code.google.com by gama.platform on 2014-04-05 20:58:18

pcaillou commented 9 years ago
Issue 966 has been merged into this issue.

Original issue reported on code.google.com by alexis.drogoul on 2014-04-07 09:12:26

pcaillou commented 9 years ago
I still have the same problem on PR3 Mac OS X

Why don't we remove the color parameter at least so that the release do not crash?

Original issue reported on code.google.com by agrignard on 2014-04-15 03:03:28

pcaillou commented 9 years ago
It's completely out of question to remove a parameter because adding it creates a problem.
We have to fix the problem. What's strange is that I can't reproduce it. Are you sure
you're running on JVM 1.6 ? Otherwise, I've generated an alternate version for MacOS
X. Can you please try it ? It's located in the same shared folder (https://drive.google.com/folderview?id=0B8DTAk4nDgyNeTN4RzNKckV1a0U&usp=sharing)

Original issue reported on code.google.com by gama.platform on 2014-04-15 04:35:36

pcaillou commented 9 years ago
Could you please verify the status of this issue with GAMA PR4 ? It might well be fixed
at last…

Original issue reported on code.google.com by gama.platform on 2014-04-19 03:59:55

pcaillou commented 9 years ago
Well done!! I don't have it anymore (PR4 and SVN)

It sounds that it is finally the last 1.6.1 issue!!! (let's cross the finger so that
no new issue appears)

I let you the privilege and the pleasure to close it after all this hard work.

I think the release of the official 1.6.1 has never been so closed 

Original issue reported on code.google.com by agrignard on 2014-04-19 15:07:08

pcaillou commented 9 years ago
Well, yes, never been so CLOSE (I hope) ^^
We nevertheless have to wait for Nghi (whether or not he wants to commit something)
and to be sure that everything is in place (documentation, download site, update site).

I will ask on the gama-dev list if there are last-minute additions that need to be
made. 

Original issue reported on code.google.com by gama.platform on 2014-04-19 16:12:07