tgarciabotero / FluEgg

A three-dimensional Lagrangian model capable of evaluating the influence of flow velocity, shear dispersion and turbulent diffusion on the transport and dispersal patterns of Asian carp eggs is presented. The model’s variables include not only biological behavior (growth rate, density changes) but also the physical characteristics of the flow field, such as mean velocities and eddy diffusivities.
Other
18 stars 14 forks source link

Matlab Crashes when loading some .prj #5

Closed santi-scruz closed 7 years ago

santi-scruz commented 7 years ago

For some .prj files, FLUEGG crashes without a warning nor error message after click on Load HEC-RAS Project button. Need to isolate problematic line (for instance with a try-catch) and avoid execution if there is an Error. Possible cause is a corrupted HECRAS project.

santi-scruz commented 7 years ago

Solved The problem was on the HEC-RAS project, not FluEgg. The paths to some of the input .DSS files used for the boundary conditions were missed in the specified folder. I had to set a new path to files in HEC-RAS Unsteady Flow editor in order to make it work. Instead of crashing, FluEgg should shows a WARNING message requiring the user to fix to check the HEC-RAS project and try again.

santi-scruz commented 7 years ago

A try-catch function check was added to Edit_River_Input_File.m > loadsHECRAS(strFilename) after creating the COM server the HEC-RAS controller. However it is not a solution for the bu reported in this ISSUE#5. For this issue, when FluEgg calls tries to load the profiles

[lngNumProf,strProfileName]=RC.Output_GetProfiles(0,0);

then a hidden HEC-RAS warning window pops-up in the back of all your open windows, and giving a warning about the issue. This message generated by HEC-RAs was unseen until now.

After replying YES/NO to this HEC-RAS message box, FluEgg aborts the importation but continue running. The try-catch function didn't caught any error in FluEgg after.

Solved and closed in commit bc810de