APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
129 stars 159 forks source link

The user interface of grapevine prototype frozen after clicking the primarySimulation folder #2959

Closed junqi108 closed 5 years ago

junqi108 commented 5 years ago

I met something that is bit weird and not solvable by myself in the grape model. When I open the grapevine model either from the custom build version or from the official release version, if I click the primary simulation folder, then the interface is frozen. However, if I click the phenotest folder and optimization folder, it seems OK.
Tried several times and it still the same results. Hamish mentioned this should be due to some recent changes as he was running the grapevine model last week without a problem.

image

hol430 commented 5 years ago

This appears to be working fine for me on both the latest release and custom builds. Is your version of grapevine.apsimx the same as the one in source control?

HamishBrownPFR commented 5 years ago

I am seeing the same behavior and it is recent because I was running the simulations in the PrimiarlSimulation folder last week. I am on a branch (Phenology fixes) but up to date with master. When I break the debugger it stops in EventNamesONGraph.cs in the GetAnnotationsToPutOnGraph method on a while method so I suspect there is an infinite loop there

hol430 commented 5 years ago

Yeah the idea behind that loop is that if any of the event names are too close together, they get moved slightly to one side, so that both are readable. However, it doesn't seem to be doing a good job anyway even when it's not looping forever, so I'm just going to remove the loop altogether.

junqi108 commented 5 years ago

Thanks

hol430 commented 5 years ago

I haven't actually been able to reproduce the issue described here, but based on @HamishBrownPFR's description, I'm confident that the code I removed in #2960 was causing the problem.

If the issue persists, please re-open the issue.

HamishBrownPFR commented 5 years ago

Good call