#5 Index was outside the bounds of the array

closed-fixed
nobody
None
9
2010-05-20
2010-05-13
Adam Skiba
No

ANY of file in plug-in it shows on red and when i hover it i see yellow label with text "Index wykraczał po za granicę tablicy" witch can be translated as "Index was outside the bounds of the array". ive got notepad++ 5,6,2 and 5,6,8. I suppose that somethin is wrong with .NET . what should i do to help solve this prpblem?

Discussion

  • Adam Skiba
    Adam Skiba
    2010-05-13

    • priority: 5 --> 9
     
  • UFO
    UFO
    2010-05-14

    Delete once your (old) "SourceCookifier.languages.xml".

     
  • Adam Skiba
    Adam Skiba
    2010-05-15

    Even when i delete it it still doesnt work. When deleted SourceCookifier.languages.xml and/or SourceCookifier.languages.model.xml they are recreated with notepad++ startup..

     
  • Tony M
    Tony M
    2010-05-15

    I've got the same error since v.0.5. Everything worked in v.0.4.
    Tested on OS: WinXP x64 and WinXP x86 both with .NET 3.5 SP1

    Error log (from v0.5, v0.5.2 doesn't create log file):
    ---------------------------------------------------------------
    Index was outside the bounds of the array.
    at NppPluginNET.Tag..ctor(String line)
    at NppPluginNET.CTagsExe.MapTags(Source source)
    at NppPluginNET.Source.DrawTreeView(TreeView treeview, String filter, RefreshType refreshTags, Boolean expandSource)
    at NppPluginNET.frmMain.RefreshTreeView(RefreshType refreshTags, Boolean expandSources, Int32 maxlevel)
    at NppPluginNET.frmMain.TsBtnRefreshClick(Object sender, EventArgs e)

     
  • Adam Skiba
    Adam Skiba
    2010-05-15

    as tonym01 said :
    I've got the same error since v.0.5. Everything worked in v.0.4.

    I have just tried version 0.4 and it worked...

     
  • UFO
    UFO
    2010-05-16

    Any chance you guys are using a wrong "ctags.exe" ? Since v0.5 the package contains a patched "ctags.exe", and sourcecookifier won't work with unpatched ones! So maybe you thought while manually upgrading why replacing "ctags.exe" if it's the same binary anyway. But it's not!

     
  • Adam Skiba
    Adam Skiba
    2010-05-16

    Output from ctags from plugin package

     
    Attachments
  • Adam Skiba
    Adam Skiba
    2010-05-16

    Output from ctags from sourceforge

     
    Attachments
  • Adam Skiba
    Adam Skiba
    2010-05-16

    I have uploaded (probably) output from ctags - one witch comes from plug and second witch comes from sourceforge ctags page

     
  • Adam Skiba
    Adam Skiba
    2010-05-16

    This cant be matter of ctags if ver 0.4 works fine

     
  • Tony M
    Tony M
    2010-05-16

    „Any chance you guys are using a wrong "ctags.exe" ?”
    In my case, no chance.
    I've tested your plugin on clean notepad++ without any other plugins only with files witch came from your package. I've tested it on many types of files (cpp, php, cs, c, java, ini) – everywhere the same error message and lack of source outline. I've also try to change file paths – with and without spaces or dots in directory names – same thing again.
    I suggests you to make some debugging build witch will save detailed exception description into log file, then we will could test it and post here the log file.

     
  • UFO
    UFO
    2010-05-17

    Ok, big thx for reporting so far. I've finally uploaded a trace build for the main DLL, which comes with a shitload of logging. Hopefully I can nail it with your help right now! Once you replace the dll you will find a log file in your "C:\" folder. Please attach it over here.
    Here's the download:
    http://sourceforge.net/projects/sourcecookifier/files/0.5.2/SourceCookifier.v0.5.2.TRACE_BUILD.7z

    greets

     
  • Adam Skiba
    Adam Skiba
    2010-05-18

    SourceCookifier.TRACE.txt

     
  • Adam Skiba
    Adam Skiba
    2010-05-18

    uploaded trace file

     
  • UFO
    UFO
    2010-05-18

    @adamskiba:
    thx for attaching the log. It's an encoding problem of course. I gotta find another solution for letting ctags.exe seperate text fields.. stay tuned

     
  • Adam Skiba
    Adam Skiba
    2010-05-18

    @ufo-pu55y:
    at least 4 times a day i'm checking this page...

     
  • Good to know, that you've found the source of the bug. I've tried to solve it by myself, changing encoding "Encoding.ASCII.GetBytes" to "Encoding.UTF8.GetBytes" in "CTagsExe.cs" file, but without succes. I'm waiting for your move now. I hope you succeed.

     
  • Tony M
    Tony M
    2010-05-18

    The last comment was mine. I forgot to login.

     
  • Quick check - its working now if both are replaced
    if only replcaded core file it shows message that ctags - doenst look like tags file. i refuse to overwrite it or something like that

     
  • UFO
    UFO
    2010-05-20

    No, no.. what I meant is following:
    1) Replace both files (I know that it won't work, when only replacing 1 file)
    2) Does it work when "Use 'ctags' file instead of StandardOut" is CHECKED?
    3) Does it work when "Use 'ctags' file instead of StandardOut" is UNCHECKED?
    I need to know if it's working with and without using 'tags' files... thx

     
  • Tony M
    Tony M
    2010-05-20

    Works for me now, in both cases - with and without using "tags" file.
    Great work, big thanks for quick support!
    Can you explain a little bit, where were the problem?

    btw earlier "nobodys" post wasn't mine this time ;)

     
  • Adam Skiba
    Adam Skiba
    2010-05-20

    as tonym01 said - in both cases it worked

    that nobody was me :)

     
  • UFO
    UFO
    2010-05-20

    Ok thx for testing then. Glad we finally found that damn bugger. Means SourceCookifier doesn't work since v0.5.x for anybody at all who's running a windows with a non-western-europe country set as region/language. Problem was of course that since 0.5 I started using a non-ascii char as field seperator in ctags.exe itself. Originally it is the TAB char, but that's silly to use, since you might have TABs in your resulting strings, which makes TAB unusable as string seperator. No idea what the ctags author had in mind when he did that. Anyway I'm using the chars 0x01 and 0x02 now and will have to release a new version very soon of course. cheers...

     
  • UFO
    UFO
    2010-05-20

    • status: open --> closed-fixed