Skip to content

[Bug]: IntelliSense not working #3706

Closed

Description

@rgmiller2

What did you do?

Writing SQL queries in Execute SQL pane. Project and database loaded and queries working. However IntelliSense is not bringing up tables or fields. It does display some code suggestions. I do have code completion turned on.

What did you expect to see?

Inline suggestions for tables or fields while typing query.

What did you see instead?

No suggestion.

DB4S Version

3.13.0

What OS are you seeing the problem on?

Windows

OS version

Windows 11 Home

Relevant log output

No response

Prevention against duplicate issues

  • I have searched for similar issues

Activity

  1. chrisjlocke commented on Aug 14, 2024

    @chrisjlocke
    Member

    All databases, or just one? Sometimes, a wonky table can stop DB4S reading the full database schema.

    image

    So this works for me.
    What I'd try is creating a new database. Does it work?
    Export the schema of your database where it doesn't work, so you've just the tables. Does it work? I assume not, so one by one, remove tables until it does work. Theoretically, you can then find the table it doesn't like.
    If that sounds like waaaaaaaaaaay too much work, simply email the database schema (so no data) to issue3706 [at] chrisjlocke [dot] co [dot] uk and I can have a fiddle...

  2. rgmiller2 commented on Aug 15, 2024

    @rgmiller2
    Author

    Thank you chrisjlocke for the advice. I will give that a try as soon as I can get back to my office.

  3. mgrojo commented on Aug 24, 2024

    @mgrojo
    Member

    Oops, this is happening for tables for which v3.12 worked like a charm, so we have broken something at some point... Example, northwind database.

  4. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Aug 24, 2024
  5. mgrojo commented on Aug 24, 2024

    @mgrojo
    Member

    Here is a workaround, go to Database Structure (Alt+D) and press F5 to refresh the database schema. After that, the autocompletion will work again

  6. justinclift commented on Aug 25, 2024

    @justinclift
    Member

    Might be a race condition then, with the intellisense code not running at the correct time for newly opened databases?

  7. mgrojo commented on Aug 25, 2024

    @mgrojo
    Member

    Might be a race condition then, with the intellisense code not running at the correct time for newly opened databases?

    Probably. And I think this has happened before.

  8. rgmiller2 commented on Aug 25, 2024

    @rgmiller2
    Author

    All databases, or just one? Sometimes, a wonky table can stop DB4S reading the full database schema.

    image

    So this works for me. What I'd try is creating a new database. Does it work? Export the schema of your database where it doesn't work, so you've just the tables. Does it work? I assume not, so one by one, remove tables until it does work. Theoretically, you can then find the table it doesn't like. If that sounds like waaaaaaaaaaay too much work, simply email the database schema (so no data) to issue3706 [at] chrisjlocke [dot] co [dot] uk and I can have a fiddle...

    Thank you, but this did not work. I am going to try a fresh install of DB Browser.

  9. rgmiller2 commented on Aug 25, 2024

    @rgmiller2
    Author

    I reinstalled BB Browser and started my project over. Now it is working.

  10. mgrojo commented on Aug 25, 2024

    @mgrojo
    Member

    There's something wrong, in any case, so I'll reopen the issue.

    What I've seen is just restoring the defaults in preferences, solves the issue.

    But it appears again if you check the option "Automatically load the last opened DB at startup". Is it the same for you, @rgmiller2 ?

  11. reopened this on Aug 25, 2024
  12. self-assigned this
    on Aug 25, 2024
  13. 13 remaining items

  14. mgrojo commented on Aug 29, 2024

    @mgrojo
    Member

    My heart is a little heavy because the features I've added have caused bugs. :(

    Don't worry, @lucydodo. That's the life of the SW engineer, and as you have seen, the bug was already there, waiting good conditions to happen.

    @sandman7920, I cannot reproduce the issue with DB.Browser.for.SQLite-dev-b19bbb9-x86.64.AppImage. But I cannot say the same for my own build of the same commit. I still reproduce it from the command line and from the last opened DB trigger. I don't have time to investigate it, but, anyway, if it makes it more difficult to reproduce, it's already a gain.

  15. sandman7920 commented on Aug 30, 2024

    @sandman7920
    Contributor

    @mgrojo The AppImage does not ship the Qt Wayland plugin and uses Xwayland(xcb plugin) on wayland compositors.
    Are you on Wayland with mutter?

  16. added a commit that references this issue on Aug 30, 2024
  17. sandman7920 commented on Aug 30, 2024

    @sandman7920
    Contributor

    @mgrojo Confirmed it's a GNOME Mutter problem, I have pushed a new commit. When you have time please test.

  18. mgrojo commented on Aug 30, 2024

    @mgrojo
    Member

    @mgrojo Confirmed it's a GNOME Mutter problem, I have pushed a new commit. When you have time please test.

    You nailed it. It's working now with this last commit.

  19. mgrojo commented on Aug 30, 2024

    @mgrojo
    Member

    @sandman7920 I feel you've gained a lot of insight on how the application starts and processes events. Maybe this other little glitch we have from a long time ago is easy now for you: #2567 😃

  20. sandman7920 commented on Aug 30, 2024

    @sandman7920
    Contributor

    I will revert all workarounds. I found the actual bug.
    autocompleteApi->prepare() runs in different thread :)
    https://github.com/sqlitebrowser/sqlitebrowser/blob/master/src/SqlUiLexer.cpp#L198

  21. added a commit that references this issue on Aug 30, 2024
  22. mgrojo commented on Aug 31, 2024

    @mgrojo
    Member

    Commit 1fa0eb9 works for me too. Much more elegant now.

  23. added this to the 3.13.1 milestone on Sep 9, 2024
  24. added 3 commits that reference this issue on Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Execute SQLbugConfirmed bugs or reports that are very likely to be bugs.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions