GAMS-dev / studio

GAMS Studio
https://www.gams.com/latest/docs/T_STUDIO.html
GNU General Public License v3.0
36 stars 5 forks source link

Possible issue/conflict between GAMS Studio and Box Drive #205

Closed pfra001 closed 1 year ago

pfra001 commented 1 year ago

Hello,

I recently downloaded GAMS 42.4.0 and I am having problems opening GAMS Studio (v 1.13.4). I am running it on Windows 10 Enterprise and using Box drive (v 2.31.64). When I tried to open this new version of GAMS Studio for the first time, it started to open but then it froze into a white screen and stopped responding. I kept retrying to open it, but this problem kept happening.

I then noticed that when I opened GAMS Studio, Box Drive started to download/sync a long list of my gdx files (and other GAMS files) that are supposed to be online only. This should not happen since these files are supposed to be online only. Since this is a very long list, it takes forever and GAMS Studio just won't open (it seems that it is waiting for all the downloads to finish). Not sure why this is happening. Maybe GAMS Studio is scanning and indexing all GAMS files when it opens for the first time? And this is triggering Box Drive to download files that should be online only?

When I forced GAMS Studio to close, Box Drive stopped downloading the files.

And when I closed Box Drive before opening GAMS Studio, GAMS Studio opened normally.

With GAMS Studio opened, I restarted Box Drive. Box Drive then started to sync some .gsp files that I believe are not even mine (they could be from other colleagues in folders shared with me in Box Drive that appear in my folder tree). After that I could close and open GAMS Studio a few times.

So, I can open the new GAMS Studio now, but I am wondering if this is an issue observed before.

Thank you!

Best

Francisco

LutzWestermann commented 1 year ago

Maybe GAMS Studio is scanning and indexing all GAMS files when it opens for the first time?

Not sure, if I got this right, but GAMS is not scanning your system for compatible files. It only cares about files it "knows", which means that they belong to one of the open projects (aka. they can be seen in the Project Explorer). Are the files you are concerned about here part of one of your projects?

pfra001 commented 1 year ago

Thanks for the reply and sorry that the description was unclear (I will admit I am not sure too if I got this right...).

I will say that I rarely define projects explicitly when using GAMS Studio. I typically create a .gms file directly and start editing it. Or I open a .gdx output in a folder to examine it. So maybe previous versions of GAMS Studio that I was using were creating the projects implicitly and the new version was now going through all of them (and for some reason triggering Box Drive to sync the gdx files).

A possibly related issue: after finally being able to open GAMS Studio, I noticed that it created .gsp files in many different folders in our team's shared Box Drive folder. Apparently, if I have ever opened a .gms/.gdx file in some directory, GAMS Studio now created a .gsp file there. This is a behavior previous versions did not have.

LutzWestermann commented 1 year ago

Whenever you open a file, Studio creates a project for that on the fly (or adds it to an existing project, if you defined it like that in the settings). And when you close a tab in the main Window, the project is still "alive" with the file(s) belonging to the project. If you really want to remove a file and/or project, you need to do it from the context menu of the Project Explorer. You could also do that for many projects at once by marking them first:

grafik

A possibly related issue: after finally being able to open GAMS Studio, I noticed that it created .gsp files in many different folders in our team's shared Box Drive folder. Apparently, if I have ever opened a .gms/.gdx file in some directory, GAMS Studio now created a .gsp file there. This is a behavior previous versions did not have.

Studio does that not for every file ever opened, but for every project still open in Studio / in the Project Explorer. This is new with Studio 1.13 (GAMS 42). So could it be, that you actually have many projects open, maybe unnoticed, since you usually do not have the Project Explorer visible? If that is the case, you can "fix" this behavior by closing the unwanted project from the context menu of the Project Explorer.

pfra001 commented 1 year ago

Thanks a lot! This makes a lot of sense.

The opened projects was exactly the issue. The new GAMS studio probably got the list of opened projects from previous versions and then started this whole process.

I never opened the Project Explorer pane before... I will make sure to pay more attention to it moving forward.

It is not always that we view a gms/gdx file in the context of a project in GAMS Studio (in my case, I would say never). A frequent use case here would be to navigate to a colleague's folder and open a gdx or gms file to look at results or code. We may not want to open the whole GAMS project (maybe it does not even exist). So, we would not like that, every time we do this, GAMS Studio creates a new gsp file in the current folder.

If I understood correctly, a possible solution for this would be to create a dummy project in GAMS Studio that is always open and then any file I opened would be associated with this dummy project. Is that correct? I already changed the setting in GAMS Studio to "Open file in current project by default".

LutzWestermann commented 1 year ago

If I understood correctly, a possible solution for this would be to create a dummy project in GAMS Studio that is always open and then any file I opened would be associated with this dummy project. Is that correct? I already changed the setting in GAMS Studio to "Open file in current project by default".

Yes, that is correct.

LutzWestermann commented 1 year ago

I think, this can actually be closed now. If you disagree, please reopen.