Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2011

Re-opened: Property Search in Advanced Search tab throws IllegalArgumentException

    Details

    • Story Points:
      1
    • Sprint:
      Spring 2019 Sprint 5, Fall 2019 Sprint 3, Fall 4 : 30 Sep to 11 Oct, Fall 5 : 14 Oct to 25 Oct

      Description

      Investigate and determine why this happens.
      Find out if it affects released branch 9.0.2 (get from bioviz.org).
      Read user's guide Advanced Search documentation as background.

      To repeat:

      1) Click Advanced Search tab
      2) Select PropertySearch, don't enter query string (leave text blank)
      3) Click Search icon (magnifying glass button on right of text entry)

      Observe exception:

      14:51:37.494 ERROR c.a.genometry.thread.CThreadWorker - Comparison method violates its general contract!
      java.lang.IllegalArgumentException: Comparison method violates its general contract!
      at java.util.TimSort.mergeHi(TimSort.java:899) ~[na:1.8.0_192]
      at java.util.TimSort.mergeAt(TimSort.java:516) ~[na:1.8.0_192]
      at java.util.TimSort.mergeCollapse(TimSort.java:441) ~[na:1.8.0_192]
      at java.util.TimSort.sort(TimSort.java:245) ~[na:1.8.0_192]
      at java.util.Arrays.sort(Arrays.java:1512) ~[na:1.8.0_192]
      at java.util.ArrayList.sort(ArrayList.java:1462) ~[na:1.8.0_192]
      at java.util.Collections.sort(Collections.java:175) ~[na:1.8.0_192]
      at com.affymetrix.igb.searchmodeidorprops.SearchModeIDOrProps.findLocalSyms(SearchModeIDOrProps.java:180) ~[na:na]
      at com.affymetrix.igb.searchmodeidorprops.SearchModeIDOrProps.search(SearchModeIDOrProps.java:105) ~[na:na]
      at com.affymetrix.igb.searchmodeidorprops.SearchModeID.search(SearchModeID.java:86) ~[na:na]
      at com.affymetrix.igb.keywordsearch.KeyWordSearch.search(KeyWordSearch.java:65) ~[na:na]
      at com.affymetrix.igb.search.SearchView$SearchAction$1.runInBackground(SearchView.java:175) ~[na:na]
      at com.affymetrix.igb.search.SearchView$SearchAction$1.runInBackground(SearchView.java:155) ~[na:na]
      at com.affymetrix.genometry.thread.CThreadWorker.doInBackground(CThreadWorker.java:73) ~[na:na]
      at javax.swing.SwingWorker$1.call(SwingWorker.java:295) [na:1.8.0_192]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_192]
      at javax.swing.SwingWorker.run(SwingWorker.java:334) [na:1.8.0_192]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_192]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_192]
      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_192]

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment - - edited

            To reproduce:

            • Start (or re-start) IGB
            • Select human genome (click Mona Lisa image)
            • Select "Data Access" tab
            • Open RNA-Seq > 20 tissues SRP056969 > Reads > Adrenal gland alignments in "Available Data" (check the checkbox to add a new empty track to IGB)
            • Zoom to a region and click Load Data to load some data from above data set
            • Select Advanced Search tab
            • Choose "Keyword" in "genome" (Note: "Properties" is the default setting - you need to change to keyword to observe the bug")
            • Enter a search string (anything is fine)
            • Observe error in Console tab
            Show
            ann.loraine Ann Loraine added a comment - - edited To reproduce: Start (or re-start) IGB Select human genome (click Mona Lisa image) Select "Data Access" tab Open RNA-Seq > 20 tissues SRP056969 > Reads > Adrenal gland alignments in "Available Data" (check the checkbox to add a new empty track to IGB) Zoom to a region and click Load Data to load some data from above data set Select Advanced Search tab Choose "Keyword" in "genome" (Note: "Properties" is the default setting - you need to change to keyword to observe the bug") Enter a search string (anything is fine) Observe error in Console tab
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            The above mentioned error is shown when the keyword entered is empty.
            We have not handled empty keyword.

            The below function in KeyWordSearch.java always returns null without checking the input string.
            public String checkInput(String search_text, BioSeq vseq, String seq)

            { return null; }

            Mostly we can handle empty/null string condition in this function.

            [~aloraine] - Can I fix the issue by following the above solution?

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited The above mentioned error is shown when the keyword entered is empty. We have not handled empty keyword. The below function in KeyWordSearch.java always returns null without checking the input string. public String checkInput(String search_text, BioSeq vseq, String seq) { return null; } Mostly we can handle empty/null string condition in this function. [~aloraine] - Can I fix the issue by following the above solution?
            Hide
            ann.loraine Ann Loraine added a comment -

            I have a doubt:

            Is this addressing the root cause?
            How is an empty string getting passed?
            In testing, I have entered a value (anything) into the search form.
            So I am wondering: How is an empty string getting passed in?
            Also, why does the bug only occur after the RNA-Seq data has been loaded but not before?

            Noor Zahara: Answering these will probably require a deeper dive into the code. My request: answer as much as you can for now, and then move the ticket back to "To-Do" to work on later - either yourself or another developer.

            Show
            ann.loraine Ann Loraine added a comment - I have a doubt: Is this addressing the root cause? How is an empty string getting passed? In testing, I have entered a value (anything) into the search form. So I am wondering: How is an empty string getting passed in? Also, why does the bug only occur after the RNA-Seq data has been loaded but not before? Noor Zahara : Answering these will probably require a deeper dive into the code. My request: answer as much as you can for now, and then move the ticket back to "To-Do" to work on later - either yourself or another developer.
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            Is this addressing the root cause? Yes
            How is an empty string getting passed? The issue is occurring only if the user enters search without any keyword.
            In testing, I have entered a value (anything) into the search form.
            So I am wondering: How is an empty string getting passed in? I tested it with random keywords and the exception is not thrown
            Also, why does the bug only occur after the RNA-Seq data has been loaded but not before? This is happening with any data not just RNA-Seq data

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - Is this addressing the root cause? Yes How is an empty string getting passed? The issue is occurring only if the user enters search without any keyword. In testing, I have entered a value (anything) into the search form. So I am wondering: How is an empty string getting passed in? I tested it with random keywords and the exception is not thrown Also, why does the bug only occur after the RNA-Seq data has been loaded but not before? This is happening with any data not just RNA-Seq data
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Original bug report differs from bug 15 Sep comment. In the original report (description), an empty string is entered by user. In 15 Sep comment, a non-empty string is entered.

            Sorry – this was very confusing!

            Show
            ann.loraine Ann Loraine added a comment - - edited Original bug report differs from bug 15 Sep comment. In the original report (description), an empty string is entered by user. In 15 Sep comment, a non-empty string is entered. Sorry – this was very confusing!
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            I figured out that the bug is in the sorting functionality where we were not handling the case when 2 objects where equal .

            The code change can be found : https://bitbucket.org/noorzahara/integrated-genome-browser-local1/branch/IGBF-2011#diff

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - I figured out that the bug is in the sorting functionality where we were not handling the case when 2 objects where equal . The code change can be found : https://bitbucket.org/noorzahara/integrated-genome-browser-local1/branch/IGBF-2011#diff
            Hide
            ann.loraine Ann Loraine added a comment -

            Please build a branch-specific installer for functional testing and then move to Needs Review.

            Regarding building the installer:

            Unfortunately there's a bug with the pipeline file that blocks automatic building of the branch specific installer, so you have to run the pipeline manually.
            (Bug is being fixed with https://jira.transvar.org/browse/IGBF-2027)

            Show
            ann.loraine Ann Loraine added a comment - Please build a branch-specific installer for functional testing and then move to Needs Review. Regarding building the installer: Unfortunately there's a bug with the pipeline file that blocks automatic building of the branch specific installer, so you have to run the pipeline manually. (Bug is being fixed with https://jira.transvar.org/browse/IGBF-2027 )
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            I have manually ran the pipleline.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - I have manually ran the pipleline.
            Hide
            ann.loraine Ann Loraine added a comment -

            The IllegalArgumentException no longer occurs.
            However, another problem has come up.
            When the user fails to enter a search string in the Advanced Search tab and clicks the "run search" (magnifying glass) button, the search proceeds and all items currently in memory get returned.
            It looks like the residue search does not have this behavior. If the user tries to search without entering a search string, a dialog appears letting them know that they need to enter a query string to run the search.
            Also, if the user enters * (globbing character that ought to match anything), a regular expression error appears.
            This UI clearly needs some love to improve usability and predictability. Will create another ticket for that and link to this one.
            Recommending PR.

            Show
            ann.loraine Ann Loraine added a comment - The IllegalArgumentException no longer occurs. However, another problem has come up. When the user fails to enter a search string in the Advanced Search tab and clicks the "run search" (magnifying glass) button, the search proceeds and all items currently in memory get returned. It looks like the residue search does not have this behavior. If the user tries to search without entering a search string, a dialog appears letting them know that they need to enter a query string to run the search. Also, if the user enters * (globbing character that ought to match anything), a regular expression error appears. This UI clearly needs some love to improve usability and predictability. Will create another ticket for that and link to this one. Recommending PR.
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Tested the ticket using branch the installer IGBF-2011. I was able to search without entering any keyword in the search box with no exceptions on run time. Noor Zahara could you please mention a detailed set of instructions for testing so that anyone who has not worked on IGB can easily navigate to advanced search tab just by following those instructions. Also doing it would expedite the process of 9.1.0 release. Moving it to DONE.
            Thanks.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Tested the ticket using branch the installer IGBF-2011 . I was able to search without entering any keyword in the search box with no exceptions on run time. Noor Zahara could you please mention a detailed set of instructions for testing so that anyone who has not worked on IGB can easily navigate to advanced search tab just by following those instructions. Also doing it would expedite the process of 9.1.0 release. Moving it to DONE. Thanks.
            Show
            ann.loraine Ann Loraine added a comment - For reference, here is the commit: https://bitbucket.org/lorainelab/integrated-genome-browser/commits/e3aec2f3b29eb070b0f7edb481552d12337e8bbf

              People

              • Assignee:
                noor91zahara Noor Zahara (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: