Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23.0.1 Freezes when Pasting Large Query in Data Export #19486

Closed
valsamis-d opened this issue Mar 26, 2023 · 20 comments · Fixed by #19764 or #19771
Closed

23.0.1 Freezes when Pasting Large Query in Data Export #19486

valsamis-d opened this issue Mar 26, 2023 · 20 comments · Fixed by #19764 or #19771
Assignees
Milestone

Comments

@valsamis-d
Copy link

Description

After installing 23.0.1 (portable) when I try to paste the following, Dbeaver freezes and I can only force terminate it:

"--COMMENT_Since_2023_03-25
SELECT <<QUERY>>> WITH ur"

The SELECT query is an one-liner 1182 characters log

DBeaver Version

23.0.1

Operating System

Windows 10 Enterpise 21H2 19044.2006

Database and driver

DB2
JDBC 11.5.7.0-FP000

Steps to reproduce

No response

Additional context

No response

@E1izabeth
Copy link
Member

Please, try turning on this setting before pasting
image

Does it help?

@valsamis-d
Copy link
Author

Please, try turning on this setting before pasting

image

Does it help?

The issue occurs when pasting into the query of a data export task. Does this setting works also in this area?

@E1izabeth
Copy link
Member

E1izabeth commented Apr 3, 2023

No, it's sql editor setting. I missed that you wrote about data export :)

@valsamis-d
Copy link
Author

No, it's sql editor setting. I missed that you wrote about data export :)

No problem 😃 For the time being I rolled back to the previous version until this is fixed.

@Destrolaric
Copy link
Member

Unfortunately, we couldn't reproduce the issue from our side.
Could you please send me the log files if it happens again? You can find instructions here: https://dbeaver.com/docs/wiki/Log-files/. Footage will also be helpful. Thank you.

@valsamis-d
Copy link
Author

Unfortunately, we couldn't reproduce the issue from our side. Could you please send me the log files if it happens again? You can find instructions here: https://dbeaver.com/docs/wiki/Log-files/. Footage will also be helpful. Thank you.

Thanks for the response @Destrolaric

It looks like that this was worked around in 23.0.2 and pasting the query doesn't cause any freeze in DBeaver. However, unlike previous versions, formatting does not take place. Here's what I mean when I'm saying "no formatting":

I'm preparing my queries in Microsoft Excel so that I kind of automating based on today's date. Since, this concatenation spans between two lines, Excel put a double quote at the beginning and the end for the concatenated string, such as:

"--COMMENT_Since_2023_03-25
SELECT <<QUERY>>> WITH ur"

In versions prior to 23.0.1, when I was pasting the above, double quotes were removed automatically.

In 23.0.1 pasting was causing DBever to freeze.

In 23.0.2, pasting the above will get pasted as plain text and I have to remove manually the double quotes. However, no freezing is observed.

@valsamis-d
Copy link
Author

Hello @Destrolaric

Unfortunately, the issue occurred in 23.0.2 as well. Pasting the 2nd query, while the task was running, caused a freeze in DBeaver. I have sent to your email the logs as well as the queries used in the task.

Thank you
Dimitrios

@Destrolaric
Copy link
Member

Destrolaric commented Apr 19, 2023

@valsamis-d Hi, as I understand, custom Java is used. I saw multiple errors with third-party plugins(CodeTogether) and eclipse plugins requiring Java 17. Could you try using Java 17?

@valsamis-d
Copy link
Author

@valsamis-d Hi, as I understand, custom Java is used. I saw multiple errors with third-party plugins(CodeTogether) and eclipse plugins requiring Java 17. Could you try using Java 17?

@Destrolaric I'm using the portable version of DBeaver, which, if I'm not mistaken, comes with Java JRE included in the distribution.

In "DBeaverPortable\jre\release" I see :

JAVA_VERSION="17.0.6"

Could it be that another version of Java is used?

Thank you
Dimitrios

@Destrolaric
Copy link
Member

Sorry, I have looked once again. Java 17 is present in the most recent log entries. But there are still errors with dependencies. Could you try to uninstall the codetogether and try without it.

org.osgi.framework.BundleException: Could not resolve module: com.genuitec.eclipse.codetogether.ui.client [358]
  Unresolved requirement: Require-Bundle: com.genuitec.eclipse.lsp4e; bundle-version="2.1.0"
    -> Bundle-SymbolicName: com.genuitec.eclipse.lsp4e; bundle-version="2023.1.0.202303212042"; singleton:="true"
       com.genuitec.eclipse.lsp4e [362]
         Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.notifications.core; x-installation:="greedy"; resolution:="optional"
         Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.notifications.ui; x-installation:="greedy"; resolution:="optional"
         Unresolved requirement: Require-Bundle: org.eclipse.mylyn.wikitext.markdown

@valsamis-d
Copy link
Author

valsamis-d commented Apr 19, 2023

@Destrolaric tried after first removing CodeTogether and DarkestDarkTheme and I'm getting into the same situation. Have you noticed in "dbeaver-debug.log" the following exception:

Exception in thread "org.eclipse.jface.text.reconciler.MonoReconciler" java.lang.NullPointerException: Cannot invoke "org.eclipse.jface.text.source.projection.ProjectionViewer.getProjectionAnnotationModel()" because the return value of "org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.getSourceViewer()" is null
	at org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.getProjectionAnnotationModel(SQLEditorBase.java:283)
	at org.jkiss.dbeaver.ui.editors.sql.syntax.SQLReconcilingStrategy.reconcile(SQLReconcilingStrategy.java:210)
	at org.jkiss.dbeaver.ui.editors.sql.syntax.SQLReconcilingStrategy.reconcile(SQLReconcilingStrategy.java:115)
	at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:72)
	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:207)

It looks related to the issue I'm having.

Unfortunately, I have to roll back to 23.0.0 which works flawlessly and with CodeTogether and DarkestDarkTheme enabled

@Destrolaric
Copy link
Member

@valsamis-d We were able to reproduce the issue in the different DBeaver components. Thank you for the information.

@Destrolaric Destrolaric added xf:ui UI-related issues and removed can't reproduce wait for review labels Apr 20, 2023
@arhayka arhayka added this to the 23.0.4 milestone Apr 20, 2023
@ShadelessFox ShadelessFox self-assigned this Apr 20, 2023
ShadelessFox added a commit that referenced this issue Apr 20, 2023
@E1izabeth E1izabeth linked a pull request Apr 20, 2023 that will close this issue
@valsamis-d
Copy link
Author

@valsamis-d We were able to reproduce the issue in the different DBeaver components. Thank you for the information.

Great news, @Destrolaric! Glad I was able to help 😌

@MashaKorax MashaKorax self-assigned this Apr 21, 2023
ShadelessFox added a commit that referenced this issue Apr 21, 2023
@ShadelessFox ShadelessFox linked a pull request Apr 21, 2023 that will close this issue
serge-rider pushed a commit that referenced this issue Apr 22, 2023
serge-rider pushed a commit that referenced this issue Apr 22, 2023
@valsamis-d
Copy link
Author

valsamis-d commented Apr 23, 2023

@Destrolaric it's great to see this being closed 😃 Is the fix included in today's build or I should wait 23.0.4?

@Destrolaric
Copy link
Member

@valsamis-d By the branch status, it looks like the fix is included in this release. You could try it in the today's build

@valsamis-d
Copy link
Author

@Destrolaric it looks like that the issue persists in 23.0.3 or better, I'm seeing the same behavior as in 23.0.2: not SQL formatting & occasional freezes.

In versions prior to 23.0.1 when I was pasting from Excel to DBeaver export SQL, the was automatic formatting accompanied by a notification:

23_0_0_Formatting_Notification

with the result being a formatted SQL statement:

23_0_0

In 23.0.1 DBeaver was non-responsive as soon as I was pasting and in 23.0.2 and 23.0.3 the SQL statement was not formatted and there was no formatting notification:

23_0_3

Can you please check if the fix was indeed included in 23.0.3? For the time being, I'm back to 23.0.0.

@ShadelessFox
Copy link
Member

Hello @valsamis-d,

I'm quite confused. Do you claim that DBeaver still occasionally freezes?

In regards to the auto-formatting feature, it was disabled by default in recent updates. It can be enabled back in the preferences:

image

@valsamis-d
Copy link
Author

Hello @valsamis-d,

I'm quite confused. Do you claim that DBeaver still occasionally freezes?

In regards to the auto-formatting feature, it was disabled by default in recent updates. It can be enabled back in the preferences:

image

@ShadelessFox and @Destrolaric my mistake here... Sorry for the false alarm guys :(

I forgot to delete the portable directory before installing (copying, actually) 23.0.3 portable.

Everything looks just fine with 23.0.3 :)

@matiasgarcia
Copy link

Still freezes on my side using DBeaver 24.0.4 and with "Extract SQL from source code" disabled

Captura de pantalla 2024-05-08 a la(s) 6 16 37 p  m

@ShadelessFox
Copy link
Member

@matiasgarcia your issue probably has something to do with #29996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants