Hi,
I'm not sure when it started. I believe it was at least version 3.7. However, when I paste very long SQL into squirrel, and attempt to run it, it sometimes won't run. The interface simply won't react when I tell it to run the SQL.
I don't know what the max length is because it seems to vary, but I do know that if I simply delete some lines (i.e. comments), it will just run.
I've seen this with several long queries.
I'm not allowed to share my SQL here, unfortunately. I've tried to replicate it with simple long blocks of text but this hasn't worked. Are there any logs I can share when this happens?
I'm also connecting to SQL Server 2016. When I run the SQL on SSMS, I'm not having trouble.
Please let me know if I can provide any further info.
What SQuirreL version are you using? I had a similar problem with v.3.8.0, but v.3.8.1 works for me now.
Were those comments you removed /* */ blocks ?
Issue #1314 might be leated to this here.
Hello.
I'm using version 3.8.0.
I'm installing 3.8.1 now but didn't see this issue mentioned in the change log. Worth a shot, though.
The comments I removed were just line comments (--). But the same thing happened when I simply removed columns, or even shortened strings. The odd part was that it did not seem to have a consistent length that it failed at. Different pieces of SQL . . . even gigantic ones with really large strings did not fail, even if they were bigger than the SQL that did fail. Different bits of failing SQL had differing fail lengths.
Really hard to understand what was going on but I really didn't get a ton of time to play with it and was told that our company would have an issue with me sharing the SQL unfortunatey.
So is version 3.8.1 working for you and the issue can be closed?
I discovered similar behaviour in snapshot-20200220_2238. Can someone test it and verify on another machine?
Probles started with long / / comments, it is not dependent on jdbc driver or type of connection (same bug on mariadb and oracle). Example SQL is attached. In log I see stack-overflow.
2020-03-26 11:15:54,234 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.client.Main - Exception occurred dispatching Event java.awt.event.KeyEvent[KEY_PRESSED,keyCode=10,keyText=Enter,keyChar=Enter,modifiers=Ctrl,extModifiers=Ctrl,keyLocation=KEY_LOCATION_STANDARD,rawCode=13,primaryLevelUnicode=13,scancode=28,extendedKeyCode=0xa] on net.sourceforge.squirrel_sql.client.session.SquirrelDefaultTextArea[,0,0,5386x676,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@4f56ca04,flags=360,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=143,g=142,b=139],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.plaf.ColorUIResource[r=43,g=107,b=197],colums=0,columWidth=0,rows=0,rowHeight=0,word=false,wrap=false]
java.lang.StackOverflowError
at java.base/java.util.regex.Pattern$LazyLoop.match(Pattern.java:4967)
at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:4836)
at java.base/java.util.regex.Pattern$BranchConn.match(Pattern.java:4714)
at java.base/java.util.regex.Pattern$CharProperty.match(Pattern.java:3946)
at java.base/java.util.regex.Pattern$Branch.match(Pattern.java:4750)
at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4805)
at java.base/java.util.regex.Pattern$LazyLoop.match(Pattern.java:4982)
at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:4836)
at java.base/java.util.regex.Pattern$BranchConn.match(Pattern.java:4714)
at java.base/java.util.regex.Pattern$CharProperty.match(Pattern.java:3946)
at java.base/java.util.regex.Pattern$Branch.match(Pattern.java:4750)
at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4805)
...
added configuration:
java.runtime.name OpenJDK Runtime Environment
java.vm.version 13.0.2+8
java.vm.name OpenJDK 64-Bit Server VM
os.name Windows 10
sun.jnu.encoding Cp1250
jdk.debug release
sun.awt.enableExtraMouseButtons true
user.language cs
java.specification.vendor Oracle Corporation
java.vm.info mixed mode, sharing
java.version.date 2020-01-14
I'm able to reproduce the problem,
Hint to possible workaround: The problem occurs in the SQL Parametrisation Plugin.
Concerning StackOverflowError:
Fixed in our GIT repository. Currently in branch bug1329Fix only. Will be merged after some more testing.
Also available in snapshot
https://sourceforge.net/projects/squirrel-sql/files/3-snapshots/snapshot-20200329_2327/
Last edit: Gerd Wagner 2020-03-29