BUG: Terminates prematurely

Pete
2011-02-08
2013-04-22
<< < 1 2 (Page 2 of 2)
  • Highlander

    Highlander - 2011-05-23

    Hi Tobias, KeePassSD_WM6_prof_SearchDebug7 works the following way:

    1) Start program
    2) Main KeePassSD window: Menu->File->Open
    3) show my KeePass v.2.15 DB
    4) enter my password and click on Done
    5) Menu->Search
    6) enter text in Reg.Ex. field: "mail" -> Find
    7) DEBUG window: "PerformDeepSeaerch Disabled" -> click OK
    8) DEBUG window: "No matching entry found!" -> click OK
    9) the Main KeePassSD window is shown and the program continues working normally

     
  • Tobias

    Tobias - 2011-05-23

    Thank you!

    So guess we have to focus on that PerformDeepSearch functionality.
    I got the whole search code as a code donnation a while ago.
    As far as i can see, we could either run out of memory, if we have a lot of search hits, or we could blow the task stack due to the recursion (if such a thing exists in a managed environment like the .Net CF at all :-D).
    Just inlining the regex.Match calls could help… Hmmm… Maybe i should rewrite it all.
    Well maybe i have another debug version this evening.

    Bests,
    Tobias

     
  • Highlander

    Highlander - 2011-05-24

    Hi Tobias, KeePassSD_WM6_prof_SearchDebug8 report:

    1) Start program
    2) Main KeePassSD window: Menu->File->Open
    3) show my KeePass v.2.15 DB
    4) enter my password and click on Done
    5) Menu->Search
    6) enter text in Reg.Ex. field: "mail" -> Find
    7) DEBUG window: "SearchResults constructor" -> click OK
    8) DEBUG window: "PerformDeepSearch" -> click OK
    9) DEBUG window: "SearchResults constructor end" -> click OK
    10) the list of my search request results are shown in "Search Results" window, then:

    11) if I click Cancel, everything is OK - I see main window
    12) if I click GoTo, everything is OK - the needed entry is shown

    13) if I click by finger on one of the found items, our nasty problem starts:
    14) the Main KeePassSD window disappears
    15) Setting->System->Task Manager - KeePassSD is not shown in the Running Programs List
    16) Try to start KeePassSd program - nothing happens

     
  • Tobias

    Tobias - 2011-05-24

    *sigh* So basically we survive the searching now and die a few clicks later when we want to display the result.

    Hm i think i am about to give up, because everything works perfectly fine in the Emulator of course…
    Alas as the search code was anyhow very ugly i replaced it by the functionality provided by KeePassLibSD.
    The code is much smaller and i hope we still make it the form that displays the results.

    http://sourceforge.net/projects/keepasssd/files/KeePassSD/__Debug__/KeePassSD_WM6_prof_SearchDebug9.CAB/download

    I'll go up to debug build 10 and then call it a day. Sorry!

    Bests,
    Tobias

     
  • Highlander

    Highlander - 2011-05-25

    Hi Tobias,

    this is KeePassSD_WM6_prof_SearchDebug9 report:

    1) Start program
    2) Main KeePassSD window: Menu->File->Open
    3) show my KeePass v.2.15 DB
    4) enter my password and click on Done
    5) Menu->Search
    6) enter text in Reg.Ex. field: "mail" -> Find
    7) DEBUG window: "listResults_SelectedIndexChanged: 1" -> click OK
    8) DEBUG window: "SearchResultsForm: Showing data" -> click OK
    9) the list of my search request results are shown in "Search Results" window, then:

    10) if I click Cancel, everything is OK - I see main window
    11) if I click GoTo, everything is OK - the needed entry is shown

    12) if I click by finger on one of the found items below the first one,
    13) DEBUG window: "listResults_SelectedIndexChanged: 0" -> click OK
    14) DEBUG window: "listResults_SelectedIndexChanged: 1" -> click OK
    15) DEBUG window: "SearchResultsForm: Showing data" -> click OK
    16) the Main KeePassSD window disappears
    17) Setting->System->Task Manager - KeePassSD is not shown in the Running Programs List
    18) Try to start KeePassSd program - nothing happens

    I think we pinpointed the bug location. Hope you have a bit more energy to finally crack it :)

     
  • Tobias

    Tobias - 2011-05-25

    Hi srasuli!

    Hm, i am not so sure… I moved the problem from the search function to the display search results form by optimizing the search functionality and avoiding any call to GetData from KeepassLibSD. However the very same code is called when the search form is displayed the first time and when you tap on the screen to select a different entry. Why should it work the first time when it displays the data for the entry on top of the list and not the 2nd time when the user selects a different one. It's the same code!

    Maybe i am codeblind and the bug is staring into my face.
    Or it's something more subtle and having something to do with the way the .Net Compact Framework is setup on your device… Please confirm you run an original Rom and not something homebrew.

    Bests,
    Tobias

     
  • Highlander

    Highlander - 2011-05-26

    Hi Tobias,

    Thanks for new version. KeePassSD_WM6_prof_SearchDebug9.1 works very well - at least I could not crash it!

    1) Start program
    2) Main KeePassSD window: Menu->File->Open
    3) show my KeePass DB
    4) enter my password and click on Done
    5) Menu->Search
    6) enter text in Reg.Ex. field: "mail" -> Find

    7) DEBUG windows:
    "listResults_SelectedIndexChanged: Select currUuid(7ABA…)"  -> click OK
    "UserNameField"  -> click OK
    "PasswordField"  -> click OK
    "UrlField"  -> click OK
    "NotesField"  -> click OK
    "NullReferenceException"  -> click OK (this window appeared not all the time but only for some of the found results)

    8) the list of my search request results are shown in "Search Results" window, then:

    9) if I click Cancel, everything is OK - I see main window
    10) if I click GoTo, everything is OK - the needed entry is shown
    11) if I click by finger on one of the found items, I see all debug windows listed above in my point 7 and so on

    12) continue normal usage of the program

    So if I undestand correctly we just need to get rid of debug messages to obtain properly working version!

    PS: I run an original Rom.

     
  • Tobias

    Tobias - 2011-05-26

    Hm maybe we are getting closer.
    Is this reproduceable? That is: Is it always the same entry / the same currUuid(…) showing "NullReferenceException" ?
    The entries that cause "NullReferenceException" can you view them normally via Menu->Entry->View ?

    Bests,
    Tobias

     
  • Highlander

    Highlander - 2011-05-26

    There are different entries / currUuid(…) showing "NullReferenceException".
    The entries that cause "NullReferenceException" can be viewed normally via Menu->Entry->View ?

     
  • Nobody/Anonymous

    I meant: If a specific entry is showing a NullReferenceException. Is the same entry showing it again, when you close the program and try again? Or is the same entry randomly causing and not causing a NullReferenceException?

    Tobias

     
  • Highlander

    Highlander - 2011-05-27

    Hi Tobias,

    The 9.2 version works without any problem - congratulations and many thanks to you!!! Is it a debug version and you are going to issue the normal stable version? Or I can continue using 9.2?

    What was the actual reason of the problems?

     
  • Tobias

    Tobias - 2011-05-28

    Hi srasuli!

    I just uploaded a complete new set of testversions in the __DEBUG__ folder.
    Well what was the problem: Sunshine programming…

    If this returns null:

    currStrings.Get(PwDefs.NotesField).ReadString();

    then calling

    null.ReadString();

    will cause a NullReferenceException.

    So instead i just use the same functions as in EntryViewForm:

    activePwEntry.Strings.ReadSafe(PwDefs.NotesField);

    Well the only annoying thing is why the bloody debug build just doesn't throw a propper Exception with a 5km long debug trace as any other .Net Compact Framework program does. It would have saved a loooot of time. Alas, at least i got lots of other code cleaned up while chasing this little bugger.

    Bests,
    Tobias

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks