dbeaver / dbeaver/dbeaver

Autosuggester popup doesn't dissapear after selecting option and multiple autosuggester popups present one over another

Open
#22,078 4 comments 0 reactions 0 assignees View on GitHub
xf:sql autocompletion
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 13h
Merged PRs (30d)
183

Description

### Description

Initially everything works fine, but after editing certain complex SQLs containing subqueries, the autosuggester popup doesn't close anymore. I click on it and press Esc, and the focus goes back to the editor, but the popup remains.
I noticed that after clicking the popup again and then escape (multiple times, maybe 4-5), finally it disappears, as if there were multiple popups one over another. The bad popups stay visible over other apps after alt-tab!!!

When this happens, the problem is present only on the current editor. Reconnecting to the db doesn't solve the problem, but dBeaver restart does solve it.

The log shows some BadLocationException:

!ENTRY org.jkiss.dbeaver.model 2 0 2023-12-04 01:58:07.348
!MESSAGE Error parsing query
!SUBENTRY 1 org.jkiss.dbeaver.model 2 0 2023-12-04 01:58:07.348
!MESSAGE BadLocationException
!STACK 0
org.eclipse.jface.text.BadLocationException
at org.eclipse.jface.text.AbstractDocument.get(AbstractDocument.java:958)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.get(SynchronizableDocument.java:130)
at org.jkiss.dbeaver.model.sql.parser.SQLScriptParser.parseQuery(SQLScriptParser.java:298)
at org.jkiss.dbeaver.model.sql.parser.SQLScriptParser.extractScriptQueries(SQLScriptParser.java:908)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.extractScriptQueries(SQLEditorBase.java:883)
at org.jkiss.dbeaver.ui.editors.sql.syntax.SQLReconcilingStrategy.extractQueries(SQLReconcilingStrategy.java:284)
at org.jkiss.dbeaver.ui.editors.sql.syntax.SQLReconcilingStrategy.reconcile(SQLReconcilingStrategy.java:218)
at org.jkiss.dbeaver.ui.editors.sql.syntax.SQLReconcilingStrategy.reconcile(SQLReconcilingStrategy.java:100)
at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:74)
at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:207)
![image](https://github.com/dbeaver/dbeaver/assets/19900533/5fc29858-dc11-4c8b-810f-f0820c49119c)
![image](https://github.com/dbeaver/dbeaver/assets/19900533/e061f69b-eeab-4237-b41e-85af0768d6b2)

### DBeaver Version

23.3.0.202312031432

### Operating System

Linux Mint 20.3

### Database and driver

PostgreSQL 12.11 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit
driver 42.5.2

### Steps to reproduce

_No response_

### Additional context

no tunnels, no ssh

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.