#1060 When results exceed maximum tabs, SQuirreL freezes

3.4.0
closed
Core (462)
5
2013-01-06
2012-11-09
Mike Curwen
No

Hi,

Version: 3.4.0
Platform: Windows XP & 7
Java 7 + jTDS-1.2.5.jar

I have a query that returns about 30 seperate results (don't ask). I hadn't realized I had a limit in place, but going to Session > Session Properties > SQL tab, if I uncheck the "Maximum limt [sic] of SQL Result Tabs" then I get my 30 tabs or results. Otherwise, if it's checked and has 15 (is that the default, I don't remember setting this?), SQuirreL freezes, and I can get the attached thread dump and I eventually have to kill SQuirreL through Task Manager.

Discussion

  • Mike Curwen

    Mike Curwen - 2012-11-09
     
  • Johnathan James

    Johnathan James - 2013-01-04

    Patch correcting this bug.

    SHORT DESC: This was happening because of an infinite loop.

    LONGER DESC: Each query is run, and then its results added as a Tab in the UI. Once the tab is added, the code checks "is that too many tabs?", and if so, attempts to remove the tab at index 0. The tab at index 0 is a CancelPanel, and in this situation, the call to its doClick() method on its Close button, has no effect. So the tab is not actually removed, and there continues to be too many tabs. Due to a while loop, the code checks again, "is that too many tabs?", and it is still true, and it tries again to remove the tab at index 0.

    SOLUTION: 1) Added a method to return the first SQL ResultTab. 2) In the ill-named checkResultTabLimit() method, rather than making a call to close a tab by index, we get an instance of the appropriate tab (the first SQL ResultTab), and explicitly make a call to close that instance.

    A secondary issue arises in that if the CancelPanel is present, it counts as a Tab, so we need to take it into account when deciding if we have hit the "Maximum limit of SQL Result Tabs". For this we add a class level boolean which is set when the methods to add/remove CancelPanel are called. We then check that boolean in the method checkResultTabLimit().

     
  • Gerd Wagner

    Gerd Wagner - 2013-01-06
    • status: open --> closed
     
  • Gerd Wagner

    Gerd Wagner - 2013-01-06

    Fixed in our SVN repository. Will be available in future snapshots and versions.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks