Wildcards at front of query crash when navigating back

Bug #567058 reported by Misaki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tagaini Jisho
Confirmed
Medium
Gnurou

Bug Description

Using Ubuntu 9.10 with Tagaini 0.2.5. Having a wildcard at the front of the query when pressing the 'back' button in the search pane too quickly causes a crash.

1) make a search.
2) make a second search with a wildcard at the front of the query, such as 「*隠」.
3) make a third search with a different query.
4) press 'back' twice quickly.

It does the same if you go back twice slowly, and then press forward quickly. This only happens if the wildcard is at the front. Tagaini will also take longer to load the search if the wildcard is at the front, whereas if the wildcard is not at the front it will load instantly when navigating history.

I also just managed to crash it by doing a search for (a kanji/kana, not sure) + 「*」, totally unexpected and don't know how to replicate it. Had been navigating history (slowly), then typed in IME, 「*」 + (enter to set) + (enter to search) => crash! But probably just related to above bug somehow.

Revision history for this message
Gnurou (gnurou) wrote :

Can reproduce. Will try to fix for 0.2.6 bugfix release.

Changed in tagaini-jisho:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Gnurou (gnurou)
milestone: none → 0.2.6
Revision history for this message
Gnurou (gnurou) wrote :

Btw, thanks for reporting again! ;)

Revision history for this message
Gnurou (gnurou) wrote :

On my crash instance, the following happens:
- After the second press to back, the database thread is interrupted by the GUI as expected - the static regexps array (staticRegExps) used for regexp matching is also reset.
- However for some reason the DB thread still continues to run and the regexp evaluation function is run again - this time with an empty staticRegExps, which causes the crash.

So more generally, this bug seems to happen every time a query using staticRegExps (i.e. any query using wildcards elsewhere than at the end of words) is interrupted.

Revision history for this message
Gnurou (gnurou) wrote :

Even more specific - this bug can only be triggered by a "back-back" situation like the one described, because staticRegExps is cleared when the next query is evaluated.

Anyway, once again the old thread model (which will be replaced in 0.3) causes troubles again... Maybe 0.2.6 should switch to the new thread model for databases queries, this should be considered as a way to fix this bug (and potentially others).

Revision history for this message
Gnurou (gnurou) wrote :

Should be automatically fixed when the database layer is rewritten for the 0.9 series (previously 0.3). As it is very specific I don't think I should bother about it now. Keeping an eye on it though.

Changed in tagaini-jisho:
milestone: 0.2.6 → 0.9.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.