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

Close

#1222 Search function not working (cf. 2011 forum and 2 past bug reports)

next release
open
nobody
search (1)
7
12 hours ago
2014-04-07
Dan
No

I am using JabRef 2.10 with Java (build 1.7.0_51-b13) under Win 7 64-bit and having the following search problem: I type in the search field a word I know is in my .bib file, press "Search all fields", and there is no answer. I get the same non-result whether I've selected Incremental, Float, Filter, Show results in dialog, or Global search.

This is a problem I also reported in the JabRef Discussion forum in August 2013 (http://sourceforge.net/p/jabref/discussion/318825/thread/5e32a622) for
(1) JabRef 2.9.2 with Java (build 1.7.0_25-b17) under Win 7 64-bit.
(2) JabRef 2.10b with Java (default-jre version 1:1.6-43ubuntu2) under Linux 64-bit.
That forum had been started by someone in September 2011, reporting the same problem.

The same problem also would seem to have been reported as the following tickets:
"#900 Search stopped working" in July 2010 (http://sourceforge.net/p/jabref/bugs/900).
"#994 Search tool not working" in August 2011 (http://sourceforge.net/p/jabref/bugs/994).

For the JabRef 2.10/Win7 version, when I look at the Exceptions tab (under Help -> Show error console), I get the output listed at the end of this message.

It would be great if this apparent long-time bug could be addressed.

Thanks.

========

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at net.sf.jabref.groups.GroupTreeNode.hashCode(GroupTreeNode.java:383)
at javax.swing.tree.TreePath.hashCode(Unknown Source)
at java.util.Hashtable.hash(Unknown Source)
at java.util.Hashtable.put(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.addMapping(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.access$000(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.setParent(Unknown Source)
at javax.swing.tree.DefaultMutableTreeNode.insert(Unknown Source)
at javax.swing.tree.DefaultMutableTreeNode.add(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Source)
at javax.swing.JTree.fireTreeExpanded(Unknown Source)
at javax.swing.JTree.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(Unknown Source)
at net.sf.jabref.groups.GroupsTree.expandSubtree(GroupsTree.java:419)
at net.sf.jabref.groups.GroupSelector.setGroups(GroupSelector.java:914)
at net.sf.jabref.groups.GroupSelector.setActiveBasePanel(GroupSelector.java:1441)
at net.sf.jabref.SidePaneManager.setActiveBasePanel(SidePaneManager.java:161)
at net.sf.jabref.SidePaneManager$1$1.run(SidePaneManager.java:54)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at net.sf.jabref.groups.GroupTreeNode.hashCode(GroupTreeNode.java:383)
at javax.swing.tree.TreePath.hashCode(Unknown Source)
at java.util.Hashtable.hash(Unknown Source)
at java.util.Hashtable.put(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.addMapping(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.access$000(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.setParent(Unknown Source)
at javax.swing.tree.DefaultMutableTreeNode.insert(Unknown Source)
at javax.swing.tree.DefaultMutableTreeNode.add(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Source)
at javax.swing.JTree.fireTreeExpanded(Unknown Source)
at javax.swing.JTree.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(Unknown Source)
at net.sf.jabref.groups.GroupSelector.revalidateGroups(GroupSelector.java:838)
at net.sf.jabref.groups.GroupSelector.revalidateGroups(GroupSelector.java:860)
at net.sf.jabref.groups.GroupSelector.revalidateGroups(GroupSelector.java:851)
at net.sf.jabref.PrefsDialog3$OkAction$1.update(PrefsDialog3.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at spin.Invocation.evaluate(Invocation.java:175)
at spin.over.SpinOverEvaluator.evaluate(SpinOverEvaluator.java:62)
at spin.ProxyFactory.evaluteInvocation(ProxyFactory.java:85)
at spin.JDKProxyFactory$SpinInvocationHandler.invoke(JDKProxyFactory.java:102)
at com.sun.proxy.$Proxy0.update(Unknown Source)
at net.sf.jabref.PrefsDialog3$OkAction.actionPerformed(PrefsDialog3.java:259)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

  • Oliver Kopp
    Oliver Kopp
    2014-04-07

    The bugs seem to have different causes. Nevertheless, all bugs surely relate to the used .bib file. Without that .bib file, it is difficult to track down the bug. Maybe you can send me the .bib file in a private mail?

     
  • Dan
    Dan
    2014-04-08

    Thank you for suggesting I focus on the .bib file I've been using, rather than JabRef. As a result, I now seem to have full search functionality with any .bib file I load into JabRef 2.10 on my main Windows 7 64-bit machine, including the file I've been loading since last summer. So now when I execute a search, I get a pop-up "Search results" window with the correct hits.

    There are a couple of mysteries here. A first mystery here is that I didn't have this search functionality immediately after installing JabRef 2.10 and using it with my old .bib file.

    Here's what seems to have made the difference. I tried loading a small .bib file containing a small number of citations (12). That .bib bile is tpt_old.bib (attached).

    When I loaded this .bib file, before I could try JabRef's search functions, I was prompted with an "Upgrade file" pop-up window. I was told that "The database was written using an older version of JabRef. The current version offers a new way of handling links to external files." I elected to change the old external file links to JabRef's new format.

    After doing this, I tried doing a search and, for the first time, got a pop-up "Search results" window with the correct hits.

    I then loaded my old, larger .bib file and could do a successful search with a pop-up results window. (Remember, I could not do such a search on this .bib file before loading tpt_old.bib and changing its format.)

    A second mystery is that I've since reproduced some, but not all, of this behaviour on another Windows7 machine of mine, this time 32-bit. Before loading and saving tpt_old.bib, I had no search functionality. After loading and saving, I get a pop-up "Search results" window, but it is always blank, when the exact same search produces a number of hits on my 64-bit machine. So that is a little baffling.

    I'll try to figure out what might have caused the problem in the old, larger .bib file.

    In the mean time, if anyone encounters the same problem I had, they might want to try doing the steps above, and see if they solve their problem.

    Thanks.

     
    Attachments
  • Oliver Kopp
    Oliver Kopp
    12 hours ago

    I tried with JabRef 2.11 beta 2. The file loads without version warning.

    I tested it with Java7 32 bit on Win 8.1.

    The issue might be with the group panel. Your bibtex-file doesn't show groups. Maybe your other file does. Did you select groups at one file and then switched to another tab without groups and then performed a search? I tried that, but I didn't get any wired behavior.

    Currently unsure how to reproduce your issue here on a development setting.

    Does this behavior persist in JabRef 2.11 beta 2?