Closed evandrocoan closed 7 years ago
Can you provide the changes to made that caused the crash?
These were the changes: full_file_with_diff_changes.zip, this is the commit: https://github.com/evandrocoan/SublimeAmxxPawn/commit/6df860f3d246507433a8cd3cd822196593637eba
At the time, my workspace was very big like within 1000 files for indexing, involving C++ files and AmxxPawn.
Ok, I'll look into it when I get a chance
I never got it happening anymore, closing it for now.
Just crashed again, this is the new dump file: bd38c8a4-b452-499e-a0a2-407df878fc48.zip
ctrl+s
for saving.This time I had saved a syntax file change. Was this:
Packages\amxmodx\AMXX-Pawn.sublime-syntax
103: - match: \n
To this:
Packages\amxmodx\AMXX-Pawn.sublime-syntax
103: - match: $
I never experienced crashes, when working with syntax-files, but I can confirm there is something wrong with how sublime text handles changes to them.
When changing saving syntax files several times, ...
I think it is not related to syntax files, but not something else unpredictable. I experienced other crashes like more five since this initial report on Sep 22.
What I do after the crash is simply open sublime again. I do not remember about data loss or changes to my work spaces.
However, this other bug report changes as always happens after a program restart or project change:
I also got tired about post the dump
file here. The Sublime Crash reporter should be updating them correctly as it always lunch after the crash.
When changing syntax file, Sublime Text has to re-index all files in the current project using that syntax, meaning it has to parse them. I don't know what it does with the several tmp files, but memory and CPU usage increase is expected for a syntax of which you have many files in the current project.
The only 'crashes' related to editing syntax definitions I had so far were when I created an infinite loop with with_prototype
pushes that eventually reach the threshhold but can sometimes take a long time, and I work with syntax definitions a lot.
I use a project with a constant number of test files for syntax development. Many changes to a syntax-file don't result in new symbols. Therefore the memory usage of the symbol index should be the same after re-indexing. This is exactly, what you can see when just saving a syntax-file several times. Sublime Text creates a new process for indexing and the main process's memory usage increases by about 6-8MB from 60MB to about 68MB. After a while the indexing process exits and everything is fine.
After previewing tenth of test files (always one file open at a time) the memory usage increases to 80MB. All previewed files use the same syntax. All files are included in the open project and therefore should have been indexed already. I would expect memory usage to decrease to about 60MB if all files are closed again, but ok - maybe Sublime Text holds some information in RAM now which it loaded while opening the files for the first time - even though 20MB seems quite a lot as all files together have a size of 4MB.
But after some time of working Sublime Text uses 160...300MB of RAM with the same project. No extra files loaded - nothing. The only files being open and changed, is the *.sublime-syntax and one test file to check the result of specific changes to the syntax-file.
If I close Sublime Text and reopen the same project, memory usage is 60M again.
I am not sure if this problem is related to syntax file editing only. It also might be a more generous memory leak issue or something like that. I have the task manager (Win10x64) open, while writing this text using Sublime Text. At the moment the mentioned syntax project is open and the only file being changed is this plain text file. Memory usage of sublime text seems to grow by 1MB with each 5th word I write. Sublime Text uses 102MB at the moment. Just one idea - may the increasing memory usage being caused by the Undo-Feature? But from last sentence to know 7MB more RAM usage? Really heavy!!
I can confirm that memory usage increases when working with ST for a longer period of time. That makes sense in terms of saving the undo history, but I never tested to what extent. I usually restart it when it reaches 300MB after a day or so, however I never put syntax definitions in the equation since this is what I've been working on lately for the most time.
Continuing this on:
Due this do not look to be presenting itself any more.
Please don't render forum thread links in the same way as issue links (in the #\d+
format); it's confusing.
[Build 3124] Crashed while saving my
sublime-syntax
modificationsMay be related to: https://forum.sublimetext.com/t/st3-crashes-frequently-since-build-3124/23042
Summary
I just added a new scope for the my syntax-file, and ST suddenly closed and generated a dump file. This is the dump file '0d908c15-4582-4b56-a509-d6d38b9b873f.dmp': 0d908c15-4582-4b56-a509-d6d38b9b873f.zip
Expected behavior
Is expected to ST do not crash when saving my changes to a sublime-syntax file.
Actual behavior
The ST is crashing when saving my changes for a sublime-syntax file.
Steps to reproduce
Environment
Update
I think it is not related to syntax files, but not something else unpredictable as some third part
Installed Package
doing something with the API causing the crash, as I experienced other unrelated crashes with the syntax files editing. Like more eight times since this initial report on Sep 22.What I do after the crash is simply open sublime again. I do not remember about data loss or changes to my work spaces, except the
undo command
history lost.