synaptic crashes on "<word> AND" quicksearch

Bug #519613 reported by warren
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: synaptic

probable theme:
type "<word> AND" into synaptic quick search.
synaptic closes unexpectedly.

output:
(synaptic:7540): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed
terminate called after throwing an instance of 'Xapian::QueryParserError'
Aborted

ProblemType: Bug
Architecture: i386
Date: Tue Feb 9 19:32:28 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/sbin/synaptic
InstallationMedia: Xubuntu 9.10 "Karmic Koala" - Release i386 (20091028.3)
NonfreeKernelModules: nvidia
Package: synaptic 0.62.7ubuntu6
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: synaptic
Uname: Linux 2.6.31-19-generic i686
XsessionErrors:
 (xfce4-mixer-plugin:1794): libxfce4mixer-CRITICAL **: xfce_mixer_get_track: assertion `GST_IS_MIXER (card)' failed
 (polkit-gnome-authentication-agent-1:1802): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (xfwm4:1775): Gdk-CRITICAL **: gdk_window_get_events: assertion `GDK_IS_WINDOW (window)' failed
 (xfwm4:1775): Gdk-CRITICAL **: gdk_window_get_events: assertion `GDK_IS_WINDOW (window)' failed
 (synaptic:7508): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed

Related branches

Revision history for this message
warren (warren-driscoll) wrote :
Changed in synaptic (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for reporting this bug. I am able to confirm it using the current development release, Lucid Lynx. Unfortunately, not only did Synaptic Package Manager fail, but apport failed in trying to attach the log files. I am attaching the complete file from /log/crash, which appears to include the coredump. Fortunately, it was on a test machine, and contains no private matter.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :
Revision history for this message
warren (warren-driscoll) wrote :

Glad to be of assistance.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The error is triggered in common/rpackagelister.cc in RPackageLister::xapianSearch .
The call to Xapian::Query query = parser.parse_query(unsplitSearchString); fails when the search string is an contains an operator AND, OR, NOT, XOR, ... in upper case.

affecting to xapian-core

affects: synaptic (Ubuntu) → xapian-core (Ubuntu)
Changed in xapian-core (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

finally xapian raise the correct exception but synaptic doesn't catch it. reaffecting to synaptic. Sorry for the coming and going.

affects: xapian-core (Ubuntu) → synaptic (Ubuntu)
Changed in synaptic (Ubuntu):
assignee: nobody → Jean-Baptiste Lallement (jibel)
status: Triaged → In Progress
Changed in synaptic (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Olly Betts (ojwb) wrote :

Yes, this isn't a bug in xapian-core - you need to catch QueryParserError, and you can call get_msg() on it to get an error message to report to the user. You'll want to run the message through i18n as it's always in English currently. The possible errors are:

Unknown range operation
parse error
Syntax: <expression> AND <expression>
Syntax: <expression> AND NOT <expression>
Syntax: <expression> NOT <expression>
Syntax: <expression> OR <expression>
Syntax: <expression> XOR <expression>

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Hi Olly,

Thanks for the information. We catch the exception now and keep the list in it's previous state when it raises.

tags: added: quicksearch
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Fixed in 0.63.1ubuntu2
 * common/rpackagelister.cc:
    - in RPackageLister::xapianSearch() catch xapian exception to
      prevent crash when xapian interprets search string as a syntax
      error

Changed in synaptic (Ubuntu):
assignee: Jean-Baptiste Lallement (jibel) → nobody
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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