Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#219 Search suggestions shown multiple times

v0.9.*
closed
nobody
search (9)
2013-11-04
2013-09-13
Anonymous
No

Sometimes the search suggestions are shown multiple (up to 4) times. This isn't easily reproducible, but I think it occures more often when there is some background activity causing some delay between you typed the last character and the suggestions are shown. I don't see any problem in search_suggest.js, at least if XOWA doesn't call the callback function multiple times for one request. --Schnark

Discussion

  • gnosygnu
    gnosygnu
    2013-09-14

    • labels: --> search
    • status: new --> investigating
    • Milestone: PFE --> v0.9.*
     
  • gnosygnu
    gnosygnu
    2013-09-14

    Thanks for the report.

    I didn't get a chance to look at this. I'll take a look at it tomorrow, but can you provide an example of a search string? It doesn't have to be exact: I just want to get a general idea of length (5 characters?) and if there were any special characters (shouldn't matter, but just want to make sure)

     

  • Anonymous
    2013-09-14

    The last time it occured for the string "der" in de.wikipedia, but IIRC it can also happen with even shorter strings, but as I'm not able to reproduce it reliably, and the suggestions are removed when you type the next character, I only saw this for a very short moment, so I can't be sure. --Schnark

     
  • gnosygnu
    gnosygnu
    2013-09-15

    Ok. Thanks for the info.

    I spent several minutes with this today.

    • I couldn't reproduce this with v0.9.1 on dewiki 20130821 on either my Windows or Linux box. (v0.9.1 / dewiki / OS shouldn't matter: I'm just citing them for reference's sake).
    • I tried specifically with these terms: der, die, eine, ich, kleine, beethoven, wolfgang, deutsch as well as several other random fragments. I did not see duplicates at any point in time while typing out these words.

    I went ahead and added a new option called log enabled at [[Help:Options/Search suggest]]. If you check it, it will log basic search suggest activity to the log file. See excerpt below. If it happens again, you can send me the relevant excerpt, and I'll go through them. I'm specifically curious about (a) time-stamps of requests and (b) if any requests get canceled.

    Also, with regards to your statement:

    at least if XOWA doesn't call the callback function multiple times for one request

    XOWA shouldn't call the callback function multiple times for the same request, but if it does, it will now be visible in the log. (There would be multiple consecutive search end: word=de).

    Finally, a few questions:

    • How often does this happen? I know you say "sometimes" and not "easily reproducible", but any rough estimate will do. Once every 20 tries? (Or more generally, once every 30 minutes of use?)
    • Has this always happened, or did it start more recently? I'm fairly certain sqlite shouldn't make a difference (the problem sounds like it's threading related), but I'm curious.
    • When it happens, have you tried typing in the term again? If you're seeing repeats on the "de" of "der", I'm curious what happens when you type "de" again. (It should also show repeats since search_suggest.js caches it)

    20130915_025159.156 search bgn: word=d
    20130915_025159.250 search end: word=d
    20130915_025159.453 search bgn: word=de
    20130915_025159.468 search end: word=de
    20130915_025200.015 search bgn: word=der
    20130915_025200.031 search end: word=der
    
     
    Last edit: gnosygnu 2013-09-15

  • Anonymous
    2013-09-17

    How often does this happen? Has this always happened, or did it start more recently?

    That's hard to answer, as it is only visible when you really look for it. When you just normally use the search, you type so fast that even if it happens it vanishes with the next character you type, leaving you wonder whether something strange happened or whether you just imagined it.

    I'm now able to (sort of) reproduce it: Start vlc (or any other music player) and as many background tasks like bzcat dump.xm.bz2 > /dev/null until you can hear the music stumble. Then type "der", and it probably will happen.

    When it happens, have you tried typing in the term again?

    Yes, but on the second time the suggestions show up only once.

    XOWA shouldn't call the callback function multiple times for the same request, but if it does, it will now be visible in the log. (There would be multiple consecutive search end: word=de).

    The following entries were in the log:

    20130916_125301.509 search bgn: word=de
    20130916_125301.859 search end: word=der
    20130916_125301.865 search bgn: word=der
    20130916_125301.886 search end: word=der
    20130916_125301.891 search bgn: word=der
    20130916_125301.899 search end: word=der
    

    and I succeded to take a screenshot. (License for the screenshot: The screenshot shows the Wikipedia article "Erebos (Roman)" and is available under the license CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/legalcode). The list of authors can be viewed on https://de.wikipedia.org/w/index.php?title=Erebos_%28Roman%29&action=history.)

    --Schnark

     
    Attachments
  • gnosygnu
    gnosygnu
    2013-09-18

    I'm now able to (sort of) reproduce it: Start vlc (or any other music player) and as many background tasks like bzcat dump.xm.bz2 > /dev/null until you can hear the music stumble. Then type "der", and it probably will happen.

    Thanks for the explicit instructions. I tried now, but was unable to reproduce. Specifically:

    • Launched XOWA. Opened up dewiki
    • Launched VLC and picked a song to play
    • Launched 6 terminals
    • Ran the following in each terminal: bzcat /xowa/wiki/#dump/done/enwikibooks-latest-pages-articles.xml.bz2 > /dev/null
    • Music started stumbling. Alt-tabbing was painfully slow
    • Typed "der" and other search words. No repeats

    This may be processor / OS dependent. I'm using my Linux Mint Nadia on a 1.6 GHz machine with 1 GB memory. Maybe it's SUSE / KDE / slower processor?

    The following entries were in the log:
    I succeded to take a screenshot

    Ok. Log and screenshot was very helpful.

    It seems the tripling was caused by lines 2, 4, 6. Each one of these says "end: der" which means XOWA is sending a full set of results for "der".

    I'm surprised that SWT/XulRunner is "combining" all 3 sets (instead of sequentially executing each one separately).

    However, that said, there are two problems:

    • Lines 1 and 2 are wrong. Somehow the search began as "de" but ended with "der". This looks like a threading issue that I should be able to guard against better
    • Lines 5 and 6 should not have happened. In other words:
      • 1 and 2 were created by typing in "e"
      • 3 and 4 were created by typing in "r"
      • 5 and 6 were created by ???. Obviously you didn't type in another letter. XOWA itself doesn't create any extra threads, so I'm puzzled how they got there.

    I'll investigate further and post more later this week. Hopefully if I can fix that, then that should take of the repeats


    License for the screenshot

    Out of curiosity, why did you state the license? I'm just wondering if I should be stating licenses for screenshots I post....

     

  • Anonymous
    2013-09-19

    This may be processor / OS dependent. I'm using my Linux Mint Nadia on a 1.6 GHz machine with 1 GB memory. Maybe it's SUSE / KDE / slower processor?

    The hardware report lists "AMD Athlon 64 X2 Dual Core Processor 4000+" twice as processor, I don't know whether this is just because it's a dual-core processor or whether there really are two of them.

    Out of curiosity, why did you state the license? I'm just wondering if I should be stating licenses for screenshots I post....

    You can probably continue to publish screenshots without license information, according to the American "Fair Use". But there is nothing like that in German law, so I should follow the license for my screenshots. Usually I try to take screenshots only of contents that are either public domain, or where I'm the author myself, so I don't have to care about the license, too. --Schnark

     
  • gnosygnu
    gnosygnu
    2013-09-20

    The hardware report lists "AMD Athlon 64 X2 Dual Core Processor 4000+"

    Hmmm... That looks like a 2.1 GHz processor. Definitely better than my Linux box (not to mention the fact that mine is single core)

    But there is nothing like that in German law, so I should follow the license for my screenshots

    Thanks for the explanation. I didn't know German law was so strict (I had naively assumed / hoped that "Fair Use" was universal)


    Also, I looked at this more, but I don't really have any real suspects. I'm going to put in some extra guards for v0.9.3, but these are really border-line guesses...

     
  • gnosygnu
    gnosygnu
    2013-09-22

    I added some extra guards and some logging for v0.9.3. I still don't see any sure-fire fixes, but I'm hoping the guards will prevent the issues shown above.

     
  • gnosygnu
    gnosygnu
    2013-10-28

    I'm going to mark this item "cant-reproduce" for now. To recap from above, I'm not able to reproduce it, though your logs clearly indicate some strangeness with the earlier version.

    If it's still occurring, let me know, and I'll reinvestigate. Otherwise, we can always return to it at a later point in time.

     
    Last edit: gnosygnu 2013-10-28
  • gnosygnu
    gnosygnu
    2013-10-28

    • status: in-progress --> cant-reproduce
     
    Last edit: gnosygnu 2013-10-28


Anonymous


Cancel   Add attachments