Author Topic: Slickedit Hanging  (Read 3274 times)

DanLuchinski

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Slickedit Hanging
« on: September 25, 2020, 04:27:43 PM »
I have been using SlickEdit for a while, but mainly for just editing.  I don't use it for code completion or anything like that.  I think my SE is SlickEdit Pro 2019 x64 (24.0.1.0).  However, I have had this issue in earlier versions as well.

I open a new document.  Usually it is a SQL Server document, so I am not sure if this will happen in other types.  Anyway, I have a 40-50 line SQL statement where there is a column on each line.  I want to actually get the MAX for every column except the first column.  So, I right-click the first character in the second column and drag my cursor down to the last column name.  I then type MAX(.  As soon as I do that, my SE hangs, says Not Responding on the top, and the task manager shows 25% CPU usage.  In the past, it eventually came back.  It has been over 30 minutes and it is still hung.  I am probably doing to need to kill it. 

Any suggestions on how to prevent this? 

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Slickedit Hanging
« Reply #1 on: September 30, 2020, 07:10:44 AM »
I don't follow you.  You said you open a new document  - do you mean you create a new document or you open an existing document.  Can you provide an example document with the exact steps needed to reproduce the problem.

DanLuchinski

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Slickedit Hanging
« Reply #2 on: September 30, 2020, 10:45:41 AM »
Sorry for not being clear.  I create a new document within SlickEdit (by click File->New or clicking the New button).  I then usually select
SQL Server for the document mode.  However, I am also able to recreate the hanging by opening an existing document.  If you are going to try to recreate the issue, then let's start with a newly created document.

I create a new document within SE and select SQL Server for the document mode.  I then enter the following...
Code: [Select]
select column1
     , column2
     , column3
     , column4
     , column5
     , column6
     , column7
     , column8
     , column9
     , column10
     , column11
     , column12
     , column13
     , column14
     , column15
     , column16
     , column17
     , column18
     , column19
     , column20
from   table

I then right-click on the C in column20 and, while holding down the right mouse button, I move up and select the C's from the above columns.  I then type MAX(.  After a few seconds, SE hangs. 

While trying to recreate this issue, I noticed that if I only selected a couple rows, SE doesn't seem to hang.  If I get to about 10 rows, it hangs for a few seconds, but then it starts responding.  However, once I hit 12 or more rows, it hangs for a long time (and sometimes doesn't even come back).

I tried to recreate the issue by creating a new document and selecting Batch for the document mode.  SE didn't hang for me even when selecting 50 rows.  Under Options, I even turned off Enable auto-completion, Enable auto-Close, and Enable Auto-Surround for SQL Server and I am still having the issue.  These are not turned off for Batch.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Slickedit Hanging
« Reply #3 on: October 01, 2020, 10:05:25 AM »
ok, I can reproduce the problem.  I reported it to slickedit for you.

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Slickedit Hanging
« Reply #4 on: October 01, 2020, 02:09:33 PM »
Hi Dan (and Graeme),

We just released SlickEdit v25.0.0, which you're entitled to due to your active Maint and Support, but this issue likely isn't hotfixable.  However, we should be able get it fixed in the first dot release (v25.0.1) which we usually release in the first month or so of a major release.

If it is hotfixable, we'll let you know in this thread.

Best,
SlickEdit Support

Dennis

  • Senior Community Member
  • Posts: 3966
  • Hero Points: 517
Re: Slickedit Hanging
« Reply #5 on: October 01, 2020, 10:57:13 PM »
If I am understanding what your end-goal is here, then what I can say is that doing a block insert in that manner creates a pretty deeply nested bunch of imbalanced parenthesis.  I doubt that we will be able to hot fix this, but you can avoid this sort of problem by using a different strategy, like recording a macro to surround one item with MAX( column, ... ) and then repeating the macro for each line.  Or, flip the logic of what you want to do, and use multiple cursors to first insert the close parenthesis, then insert "MAX(" at the beginning of the lines to complete your changes.

I will look into creating some recursion caps in the parser to make it handle ugly nesting like this better, but that fix is more likely to be for 25.0.1.  Thanks for bringing this to our attention!

DanLuchinski

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Slickedit Hanging
« Reply #6 on: October 02, 2020, 10:13:57 AM »
Yes, you are understanding the issue correctly.

I can try you suggestion of inserting the close parenthesis first and then inserting the MAX(.

Is there a way to turn off SE from trying to look for the close parenthesis? I could then turn it off when trying to do something like this.  To be honest, if your suggestion about adding the close parenthesis first works, and I can remember to do that, that solution will be fine.