Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-103

Desktop search cant open files on 64bit Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1, 1.0.2, 1.1.0, 1.1.1, 2.0, 2.1, 2.2, 2.2.1, 3.0
    • Fix Version/s: 3.5
    • Component/s: .applications
    • Labels:
      None

      Description

      Exception in thread "main" java.lang.UnsatisfiedLinkError: ...\terrier\var\winfileopen.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(Unknown Source)
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.load0(Unknown Source)
      at java.lang.System.load(Unknown Source)
      at uk.ac.gla.terrier.applications.desktop.filehandling.WindowsFileOpener.loadLibrary(WindowsFileOpener.java:69)
      at uk.ac.gla.terrier.applications.desktop.filehandling.WindowsFileOpener.<clinit>(WindowsFileOpener.java:41)
      at it.ir.terrier.app.desktop.NDesktopTerrier.<init>(NDesktopTerrier.java:1176)
      at it.ir.terrier.app.desktop.NDesktopTerrier.main(NDesktopTerrier.java:967)

        Attachments

          Activity

          Hide
          richardm Richard McCreadie added a comment -

          Patch has been tested on both 32 and 64bit windows 7 machines. Desktop search can now correctly open files without error.

          Show
          richardm Richard McCreadie added a comment - Patch has been tested on both 32 and 64bit windows 7 machines. Desktop search can now correctly open files without error.
          Hide
          craigm Craig Macdonald added a comment -

          Above was probably viz TR-116. Richard has been retesting.

          Show
          craigm Craig Macdonald added a comment - Above was probably viz TR-116 . Richard has been retesting.
          Hide
          richardm Richard McCreadie added a comment -

          INFO - Collection #0 took 110seconds to index (234 documents)

          INFO - 1 lexicons to merge
          INFO - Optimising structure lexicon
          INFO - Started building the block inverted index...
          INFO - creating block inverted index
          INFO - Iteration 1 of 1 iterations
          INFO - Scanning lexicon for 2000000 pointers
          INFO - time to process part of lexicon: 0.125
          INFO - time to traverse direct file: 0.125
          INFO - time to write inverted file: 0.047
          INFO - time to perform one iteration: 0.297
          INFO - number of pointers processed: 98035
          INFO - Finished generating inverted file, rewriting lexicon
          INFO - Optimising structure lexicon
          INFO - Finished building the block inverted index...
          INFO - Time elapsed for inverted file: 2
          INFO - Structure meta reading lookup file into memory
          ERROR - Couldn't load an index structure called meta
          java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at org.terrier.structures.Index.loadIndexStructure(Index.java:414)
          at org.terrier.structures.Index.getIndexStructure(Index.java:323)
          at org.terrier.structures.Index.loadIndices(Index.java:245)
          at org.terrier.structures.Index.<init>(Index.java:184)
          at org.terrier.structures.Index.createIndex(Index.java:648)
          at org.terrier.structures.Index.createIndex(Index.java:701)
          at org.terrier.applications.desktop.DesktopTerrier.loadIndices(DesktopTerrier.java:1175)
          at org.terrier.applications.desktop.DesktopTerrier.runIndex(DesktopTerrier.java:1131)
          at org.terrier.applications.desktop.DesktopTerrier.access$12(DesktopTerrier.java:1081)
          at org.terrier.applications.desktop.DesktopTerrier$8$1.run(DesktopTerrier.java:499)
          Caused by: java.io.EOFException
          at java.io.DataInputStream.readFully(Unknown Source)
          at java.io.DataInputStream.readLong(Unknown Source)
          at org.terrier.structures.CompressingMetaIndex.loadIndex(CompressingMetaIndex.java:1015)
          at org.terrier.structures.CompressingMetaIndex.<init>(CompressingMetaIndex.java:790)

          Show
          richardm Richard McCreadie added a comment - INFO - Collection #0 took 110seconds to index (234 documents) INFO - 1 lexicons to merge INFO - Optimising structure lexicon INFO - Started building the block inverted index... INFO - creating block inverted index INFO - Iteration 1 of 1 iterations INFO - Scanning lexicon for 2000000 pointers INFO - time to process part of lexicon: 0.125 INFO - time to traverse direct file: 0.125 INFO - time to write inverted file: 0.047 INFO - time to perform one iteration: 0.297 INFO - number of pointers processed: 98035 INFO - Finished generating inverted file, rewriting lexicon INFO - Optimising structure lexicon INFO - Finished building the block inverted index... INFO - Time elapsed for inverted file: 2 INFO - Structure meta reading lookup file into memory ERROR - Couldn't load an index structure called meta java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.terrier.structures.Index.loadIndexStructure(Index.java:414) at org.terrier.structures.Index.getIndexStructure(Index.java:323) at org.terrier.structures.Index.loadIndices(Index.java:245) at org.terrier.structures.Index.<init>(Index.java:184) at org.terrier.structures.Index.createIndex(Index.java:648) at org.terrier.structures.Index.createIndex(Index.java:701) at org.terrier.applications.desktop.DesktopTerrier.loadIndices(DesktopTerrier.java:1175) at org.terrier.applications.desktop.DesktopTerrier.runIndex(DesktopTerrier.java:1131) at org.terrier.applications.desktop.DesktopTerrier.access$12(DesktopTerrier.java:1081) at org.terrier.applications.desktop.DesktopTerrier$8$1.run(DesktopTerrier.java:499) Caused by: java.io.EOFException at java.io.DataInputStream.readFully(Unknown Source) at java.io.DataInputStream.readLong(Unknown Source) at org.terrier.structures.CompressingMetaIndex.loadIndex(CompressingMetaIndex.java:1015) at org.terrier.structures.CompressingMetaIndex.<init>(CompressingMetaIndex.java:790)
          Hide
          craigm Craig Macdonald added a comment -

          Tagging for 3.1

          Show
          craigm Craig Macdonald added a comment - Tagging for 3.1
          Hide
          craigm Craig Macdonald added a comment -

          Here is an initial patch. I have tested this on Mac. Needs testing on Windows.

          Show
          craigm Craig Macdonald added a comment - Here is an initial patch. I have tested this on Mac. Needs testing on Windows.
          Hide
          craigm Craig Macdonald added a comment -

          After some searching, I found this solution. It has methods for mac/unix/windows. It uses java.awt.Desktop when it can (indeed using reflection, so java6 is not required), but falls back to other methods. On windows, rundll32.exe is used to prevent the need for native code. We need to test on 64bit windows. Is there a rundll64 equivalent? Should we prefer this on 64bit windows, in case rundll32 dissapears in the future.

          http://www.davidc.net/programming/java/browsing-urls-and-opening-files

          Show
          craigm Craig Macdonald added a comment - After some searching, I found this solution. It has methods for mac/unix/windows. It uses java.awt.Desktop when it can (indeed using reflection, so java6 is not required), but falls back to other methods. On windows, rundll32.exe is used to prevent the need for native code. We need to test on 64bit windows. Is there a rundll64 equivalent? Should we prefer this on 64bit windows, in case rundll32 dissapears in the future. http://www.davidc.net/programming/java/browsing-urls-and-opening-files
          Hide
          craigm Craig Macdonald added a comment -

          Java 6 has a java.awt.Desktop class, which allows access to the underlying OS to open files. See http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html - I'd be inclined to replace the .dll file etc with this in 3.1.

          Show
          craigm Craig Macdonald added a comment - Java 6 has a java.awt.Desktop class, which allows access to the underlying OS to open files. See http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html - I'd be inclined to replace the .dll file etc with this in 3.1.

            People

            • Assignee:
              richardm Richard McCreadie
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: