New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeIntel code inspector tree crashing #569
Comments
I'm unable to reproduce this with either Perl or Python. Can you share your error log (Help > Troubleshooting > View Log File) after reproducing the issue (without restarting)? |
I'm unable to artificially reproduce it either. But from my workflow it happens every time. I do 'svn update' and then unison-sync to pull in the changes from my coworkers and if anyone touched any of the files that I have open, after a reload, code tree stops working on that file. Every time. Here is the log, but unfortunately, I don't see anything in it when this happens (19:45:36).
|
Oh, oh, oh, it doesn't have anything to do with file reloading. |
Could you share the full log? |
Didn't I do just that? How can I attach a file? |
Also, in this state, where CodeIntel code tree has 'crashed', even for previously loaded files, where there is some tree displayed, the updates are not working. The tree just sits there looking pretty, but no new entries are added and jump-to-subroutine on double click completely misses the line in question. This time I have to restart the whole IDE, it became unusable. |
And it crashed today again: |
File close/open does not help in this case. |
Here it goes again. This time there is something CRITICAL in logs, at [2015-09-24 20:56:34,755]: |
CodeIntel had reached the maximum of reserved/available RAM for itself and Komodo just killed the CI Driver. I suggest you're trying to use the code inspector in a very big file with a lot of functions, modules, variables, etc. but you don't have enough RAM to let CodeIntel scan your code without hitting the maximum. It could be an optimizing issue or just an use-case, I'm not sure. AFAIK Python ain't very gluttonous to RAM, but if it hits the memory limit, then something strange is going on there. |
That was my first thought too, but my RAM usage is nowhere near the maximum. If only it was that simple.
|
|
There could be a limit in Python, CodeIntel or Komodo. I'm not sure if there's a memory limit for Python scripts. import resource
print(resource.getrusage(resource.RUSAGE_SELF)[2]) |
On Windows, codeintel is limited to about 1GB of memory. |
How do I do that? |
You should run the code in the Python environment. But it's not very important now, see the @mitchell-as's answer. I don't know why there is 1GB limit for CodeIntel on Windows. |
I understand. So far I have established that it indeed depends on number of open files and complexity of those files, but it never ever crashes immediately so I can reproduce it, but always after few days of working in such an environment. Looks like a memory leak to me. |
It may not be a leak. Your codeintel database may just be quite large, and require a lot of memory to utilize. If you don't mind, you can try clearing your codeintel cache. Keep in mind it may take some time to rebuild the database for your large files, so codeintel may not give completions right away. |
Sure, will try that. So, if I understood correctly, I should delete ALL files and folders under 'AppData/KomodoEdit/9.2/codeintel/db/', right? |
Current metrics: 7,789 Files, 68 Folders from which in 'perl' subfolder: |
Done. New metrics: from which in 'perl' subfolder: Only time will tell... :-) |
Thanks, please let us know if/when you see this again. |
...and again. Memory usage as reported by Sysinternals Process Explorer: Virutal Memory: Physical Memory: This time log looks weird. |
Any chance the project files are open-source, such that we could try to reproduce the issue with them? If not, any chance you could share a subset of files with us in private, strictly for the purpose of reproducing the issue? By the way, github lets you attach txt files now. |
I'm afraid something like that is not possible. The recipe to reproduce is to try to:
I did notice that whenever I have this one big .pm file (cca 13000 lines) open at all times, then the bug happens more frequently, but still, even if I don't load that one for days, it happens sooner or later with other files. So, my impression is that the only relevant factor is how many files Komodo is processing per one session. Firing up Komodo in the morning, working with few files throughout the day and then closing down Komodo at 5PM will never reproduce this bug. I'm not complaining here, I can live with having to restart Komodo every few days, I'm just trying to help you guys solve it. Memory leaks always hit hardest the most demanding use cases. |
I can't make that work. GitHub always gives me: "Something went really wrong, and we can't process that file". |
Sorry to be a party breaker here, but this issue is still haunting me. To recap: after working in Komodo for several days and couple of dozen of files opened, edited and closed, CodeIntel code inspector tree just stops working and there is a '[CRITICAL] codeintel.komodo: Out-of-process ran out of memory - killing process' line in the logs Below is the log file. |
Can you check in your task manager how much memory is being used by Komodo and CodeIntel? ie. check after a few hours of use to get a realistic picture. Is it plausible that Komodo is in fact using up your system memory? In other words; do you on occasion run out of memory with your system? |
Nope. I will check and report Komodo's usage occasionally. |
2015-11-17 23:30:00 - komodo.exe - working set: 263,508 K |
... and crashed again 2015-11-27 00:33:30 - komodo.exe - working set: 384,000 K |
Immediately after the restart: 2015-11-27 00:37:50 - komodo.exe - working set: 229,100 K |
Sorry, I should have specified; codeintel runs in a different process. You were only looking at the komodo.exe process. Try looking for one with "codeintel" in the command. On windows the process name itself will probably just be python.exe. Apologies for the inconvenience :\ |
... and crashed again. After the crash, python.exe is nowhere to be found. So, this will be tricky, I would need to install some reminder to remind me to get working set sizes periodically, as once crashed - it's too late. |
Right after the restart:
|
Hmm interesting. You could use a Komodo macro to periodically run Note just checking manually once an hour could already tell you if the python.exe process is indicating some type of memory leak. |
|
|
That does seem suspicious, but doesn't necessarily mean a memory leak nor does it seem outside the norm. Were you working throughout the night or did this evolve during your computer being idle? |
Wouldn't know for sure. |
Punching out...
|
Punching in...
|
Well that answers that question. Thanks Atman :) If you dont mind could you check what it says every few hours today? I really appreciate your willingness to help on us on this, unfortunately it's one of those problems that need a bit of trial and error .. :\ |
Monday morning reboot.
|
Hey! I just wanted to share with you some pics of my favourite place, it;s so awesome! Here is the link for the pics http://effort.seanscarmardo.com/e4jkdn In haste, tony.attwood |
Hi friend! That is just a quick note to say thank you, you may find my whole message here http://vufropene.aaahbs.com/e4ticsxf Yours sincerely, tony.attwood |
This should hopefully be fixed in Komodo 11 thanks to its new symbol browser. |
Komodo IDE, version 9.2.0, build 87616, platform win32-x86. Built on Tue Aug 04 10:31:35 2015.
While I'm working on a pretty big (cca 12000 lines) Perl Module file (.pm), the code inspector in the right panel works correctly all of the time.
But, if the file is modified outside of Komodo, and Komodo detects the change and offers to reload the file, after the file is reloaded, the code inspector completely stops working and I need to restart Komodo to get it back to working state again.
The text was updated successfully, but these errors were encountered: