Timocop / BasicPawn

BasicPawn - SourcePawn Editor
GNU General Public License v3.0
76 stars 11 forks source link

Intellisense stopped working fully #92

Closed Adrianilloo closed 3 years ago

Adrianilloo commented 3 years ago

Hi,

I don't know why, but my Intellisense has recently started refusing to display partially matching functions while writing calls. The only exception is for these functions/variables that are defined in the active source file.

I didn't change any related setting and the same bug keeps happening after deleting BasicPawn installation folder and putting latest updated one from scratch.

BasicPawn problem

My guess is it could be something wrong within the Windows registry. What could I exactly look into? Thanks

Adrianilloo commented 3 years ago

Alright, so, after leaving the IDE open for an unknown amount of time the problem seems to fix itself. I already had experienced the same auto-fixing behaviour before, but this time I felt like it wasn't going to happen. Now I've reopened the IDE and Intellisense worked properly since the beginning. Maybe there is some occasional startup condition (like bad threading control) that makes the exposed problem to happen initially up to some time?

Timocop commented 3 years ago

Could you attach the error log and the source file (if possible)?

Adrianilloo commented 3 years ago

I'm not sure if the only log content I currently have (from yesterday) is related to the issue, but here it goes:

[05/04/2021 22:26:51]
System.ArgumentOutOfRangeException: El índice estaba fuera del intervalo. Debe ser un valor no negativo e inferior al tamaño de la colección.
Nombre del parámetro: count
   en System.Text.StringBuilder.Append(Char[] value, Int32 startIndex, Int32 charCount)
   en ICSharpCode.TextEditor.Document.GapTextBufferStrategy.GetTextInternal(Int32 offset, Int32 length)
   en ICSharpCode.TextEditor.Document.GapTextBufferStrategy.GetText(Int32 offset, Int32 length)
   en ICSharpCode.TextEditor.Document.DefaultDocument.get_TextContent()
   en BasicPawn.ClassTabControl.ClassTab.STRUC_AUTOCOMPLETE_GROUP.GenerateAutocompleteIdentifier()
   en BasicPawn.ClassSyntaxParser.FullSyntaxParse_Thread(String sTabIdentifier, ENUM_PARSE_OPTIONS_FLAGS iOptionFlags)

While the plugin is closed source, I'd consider sending it to you privately to your donations e-mail if it's straight necessary, but currently the issue seems not to happen (also never seemed to be tied to a particular revision). If it does again and I get new logs, I will.

Timocop commented 3 years ago

Is it possible to post the whole error log? (upload the log file) How big is the plugin (+ includes) in kilobytes?

BasicPawn takes some time to parse big sources and includes (~500KB) maybe that's the case here.

Adrianilloo commented 3 years ago

The attached log content was already the full application_error.log, sorry if I wasn't clear. The log file is currently unchanged and I keep not having the issue.

I can provide that required info:

#include <adminmenu>
#include <cstrike>
#include <multicolors> // ~ 54 KB*
#include <sdkhooks>
#include <sdktools>
#include <smlib> // ~275 KB*
#include <smrpg> // ~70 KB*

Plugin source is ~55 KB.

So it could be possible that the total files included would have reached the ~500 KB you mentioned.

* Only reflecting the files contained in the associated folder

Timocop commented 3 years ago

Whats your CPU if i may ask? And do you work with multiple tabs open?

Adrianilloo commented 3 years ago

CPU: Intel(R) Core(TM) i5-4590 @ 3.30GHz (4 cores)

And yes, I've been using multiple tabs open. At least two for the self plugin since ~2 weeks ago, and sometimes for external included files.

I don't have tabs set to automatically open and I'm not working with a BP project in this case.

Timocop commented 3 years ago

Are you able to send me your plugin sources via E-Mail (Timocop@hotmail.de) to investigate the problem further? Since there are no errors in the logs i assume its just very slow parsing. Try to play around with the parsing settings: image If you are working with multiple BasicPawn instances, i'd recommend turning off Only update when the window is focused.

If you see this indicator: image That means BasicPawn is parsing files.

Adrianilloo commented 3 years ago

Sorry, but there's something that stops me from sending the plugin currently while I don't know of any reproducible case to trigger the issue again deterministically and it isn't happening lately -parsing time is fine now-. Note I didn't notice the parsing cursor back when I had the issue, but next time I will.

Are you sure that the initial log isn't related to the case? In that case you can close the issue.

Timocop commented 3 years ago

Any update on this? Do you still have issues with parsing? I've optimized the syntax parsing in BasicPawn v0.852 a bit it should be faster now.

Adrianilloo commented 3 years ago

Sorry I'm not using the editor since a month so you can close the issue