Author Topic: Dependencies / ProjectManager::CloseProject  (Read 269 times)

Offline Bat

  • Multiple posting newcomer
  • *
  • Posts: 48
Dependencies / ProjectManager::CloseProject
« on: March 27, 2018, 09:02:51 pm »
I saw from long time a crash on C::B windows, when lots of files and projects are modified outsided C::B (typically git checkout on another branch without C::B closed). I tracked it.

I land here :
Code: [Select]
bool ProjectManager::CloseProject(cbProject* project, bool dontsave, bool refresh)
We have :
   
Code: [Select]
RemoveProjectFromAllDependencies(project);But I think we need also this call, to clean the global DepsMap array that will track pointer on closed project :
   
Code: [Select]
ClearProjectDependencies(project);
Note :
1)this "leak" can lead to crash only after the second reloading of a project (or any other DepsMap pointers usage), not the first one
2)in my specific case, it solved the crash

Am I missing something ?
If not did you want a ticket and a patch ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Dependencies / ProjectManager::CloseProject
« Reply #1 on: March 27, 2018, 11:24:47 pm »
Already fixed in r11344  8)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Dependencies / ProjectManager::CloseProject
« Reply #2 on: March 28, 2018, 12:05:27 am »
Unfortunately I've just got a crash when switching branches in git and the whole workspace had to be reloaded.
The backtrace seems similar like the fixed crash, so the problem is not 100% fixed. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]