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

Option -t in Version 3.11.99 (Feb 3 2020) does not load given table #2113

Closed
2 of 10 tasks
tonypdmtr opened this issue Feb 3, 2020 · 33 comments
Closed
2 of 10 tasks

Option -t in Version 3.11.99 (Feb 3 2020) does not load given table #2113

tonypdmtr opened this issue Feb 3, 2020 · 33 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs. release blocker Bugs that are serious enough to block our next release
Milestone

Comments

@tonypdmtr
Copy link

Details for the issue

What did you do?

Option -t stopped working with this version.

What did you expect to see?

Normal operation. The specified table to be opened.

What did you see instead?

The table in the title is correct but the table shown in the grid is the first table of the list of tables.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: 7 )
  • Linux: ( distro: ___ )
  • macOS: ( version: ___ )
  • Other: ___

What is your DB4S version?

  • 3.11.2
  • 3.11.1
  • 3.10.1
  • Other: Version 3.11.99 (Feb 3 2020)

Did you also

@karim
Copy link
Member

karim commented Feb 8, 2020

Was it working before in earlier versions and stopped in "Feb 3 2020" version? If yes then it's weird since nothing was changed other than updating SQLite version to the latest version (3.31.1).

I tested both the 32-bit and 64-bit versions (latest nightly) and they are working without problems. Do you have a project file (.sqbpro) for this database that might be forcing a specific view on this database when it is opened? Do you use options other than -t on the command line?

@tonypdmtr
Copy link
Author

tonypdmtr commented Feb 8, 2020

It was working in my previous installation (current DB Browser for SQLite - PortableApp [SQLiteDatabaseBrowserPortable_3.11.2_English.paf.exe] from https://sqlitebrowser.org/dl/#windows -- downloaded that version again today and it works).

I haven't been updating with every single nightly to know when it broke.

No, just the -t option to go directly to the table of interest.
No .sqbpro files, and it happens with any database file I open.

@justinclift justinclift added the bug Confirmed bugs or reports that are very likely to be bugs. label Feb 9, 2020
@justinclift
Copy link
Member

Well, that's definitely a bug of some sort. 😉

@karim
Copy link
Member

karim commented Feb 9, 2020

@tonypdmtr
Copy link
Author

tonypdmtr commented Feb 9, 2020

Both versions do not work at all (with respect to the -t option.) Blank grid and table selection (drop-down). I have to Open the database from the top menu to see it.

When opening from the top menu (as the -t option is ignored):

  • First version (earlier) has this problem when Opening, i.e., only the Table drop-down goes to the first table, but no grid displayed. I have to re-select the table to get it to load into the grid.

  • Second version (later) opens the first table and shows the grid correctly.

BTW, because I use a 32-bit and a 64-bit PC, I tend to use the 32-bit versions on both so I can compare behaviors of identical versions. So, I had only tried with the 32-bit versions up to now.

@tonypdmtr tonypdmtr reopened this Feb 10, 2020
@tonypdmtr
Copy link
Author

Problem is still there with the latest nightly [dated 2020-02-10].

The header shows correct table but grid shows contents of first table in list of tables.

@karim
Copy link
Member

karim commented Feb 11, 2020

I get different results than yours.

The Aug 18, 2019 version does not work for me. It shows the first table in the list of tables and no content at all. Hitting refresh or switching to another tab then back to Browse Data tab will reload the first table content. I think #1701 might be related.

The Aug 19, 2019 till the latest one work without problems though.

Pinging @mgrojo and @MKleusberg.

@tonypdmtr
Copy link
Author

I downloaded the latest nightly releases.
Sorry to disappoint you but they still don't work for me, both 32-bit and 64-bit versions on the 64-bit PC, and the 32-bit version on the 32-bit PC. So, all three versions in two different PCs don't work showing the exact same problem.

(I'm on Win7 Home Premium in both cases, BTW)

@chrisjlocke
Copy link
Member

I get different results than yours.

Are you on Windows too, @karim ?

@karim
Copy link
Member

karim commented Feb 15, 2020

Are you on Windows too, @karim ?

Yes. Windows 7 64-bit.

@tonypdmtr
Copy link
Author

tonypdmtr commented Feb 15, 2020

@karim Can you point me to the same exact download you're using for me to try on my Win7 64-bit?

@karim
Copy link
Member

karim commented Feb 16, 2020

They are in my earlier comment above (#2113 (comment)). I tested both 64-bit and 32-bit version and both are same. Aug 18 doesn't work, and Aug 19 works.

There were no fixes around that time (August 2019) regarding the -t option but about tables not being displayed automatically when a database is opened.

You said the v3.11.2 portable version (from https://sqlitebrowser.org/dl/#windows) is working, right? Can you also try the .zip version from the same link and see if it is working?

As I'm unable to reproduce the same bug, would you mind trying different versions of nightlies (https://nightlies.sqlitebrowser.org/win32/) and try to point to the date where the -t option stopped working?

@tonypdmtr
Copy link
Author

You said the v3.11.2 portable version (from https://sqlitebrowser.org/dl/#windows) is working, right? Can you also try the .zip version from the same link and see if it is working?

I just tried them, and they both work OK.

@tonypdmtr
Copy link
Author

tonypdmtr commented Feb 16, 2020

I did a bisect for you (i.e., binary search by date, so I skipped versions in between), and was surprised to find the problem appeared in a quite older version (unless, of course, it was fixed and re-appeared, but that would require a sequential search of all versions from now going back.)

So,
DB.Browser.for.SQLite-2018-12-04-win32.zip GOOD
DB.Browser.for.SQLite-2018-12-06-win32.zip BAD

P.S. I thought the stable portable version that works for me was after these so I'm puzzled!

@karim
Copy link
Member

karim commented Feb 19, 2020

Thanks Tony, that was very helpful.

unless, of course, it was fixed and re-appeared

That seems to be the case here. I believe this bug might be related to the changes @MKleusberg did in #1575 around that date (4~6 Dec 2018).

I enabled the SQL Logging (View > SQL Log) and I saw this..

  • Working version (2018-12-04)
PRAGMA foreign_keys = '1';
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM "main".sqlite_master;
PRAGMA encoding
SELECT COUNT(*) FROM (SELECT "_rowid_",* FROM "main"."table_name");
SELECT "_rowid_",* FROM "main"."table_name" LIMIT 0, 49999;
  • Non-working version (2018-12-06)
PRAGMA foreign_keys = '1';
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM "main".sqlite_master;
PRAGMA encoding

@tonypdmtr
Copy link
Author

tonypdmtr commented Apr 19, 2020

Suggestion for quick fix:

I noticed that simply pressing the Refresh button (to the right of the table drop down list) resolves the problem.

So, a quick fix would probably be to simply call that button's event as the last step during startup.

@justinclift
Copy link
Member

@MKleusberg This one seems like your kind of thing. 😄

@mgrojo mgrojo added the release blocker Bugs that are serious enough to block our next release label May 3, 2020
@MKleusberg
Copy link
Member

I have no idea to be honest 😉 Simply calling the refresh button event unfortunately will not solve the problem consistently because it looks like a timing issue with the multi-threading and whatever it is that isn't finished in time might not be finished a few milliseconds later either.

Because it works for me, I might have to add a ton of debug output to the code to narrow this down. @justinclift Would you be ok to build a new exe from a test branch including sometime soon-ish? And @tonypdmtr Would you be ok to give that extra build a try when it is done and paste the output here?

@justinclift
Copy link
Member

I'm about to hit the sack atm, but am happy to make a test build from whatever branch is needed sometime tomorrow. 😄

@tonypdmtr
Copy link
Author

tonypdmtr commented May 7, 2020

Certainly will try. DB.Browser.for.SQLite-win32.zip 07-May-2020 01:25 17365666 still has the problem BTW.

New data: I don't know since when exactly, but this problem happens only on my Win7-64 machine, not my Win7-32. If that matters at all to help solve the problem. Both cases use the 32-bit version, though.

@tonypdmtr
Copy link
Author

For completeness, I also just tried with DB.Browser.for.SQLite-win64.zip 07-May-2020 00:31 19958319 and the problem is also there. So 32/64-bit version makes no difference. Only that on Win64 both versions do not behave the same as with Win32

@tonypdmtr
Copy link
Author

tonypdmtr commented Jun 3, 2020

I just noticed the -t option is also ignored when specifying a project file instead of a DB file. (This is in Win32 machine that otherwise worked OK.)

@tonypdmtr
Copy link
Author

tonypdmtr commented Jun 4, 2020

Latest download seems to work OK on both Win32 and Win64. So, this issue is closed in terms of the original problem. (Was it fixed?)

Only the new observation that it does not work when loading a project file is still valid.

@justinclift
Copy link
Member

k, that sounds like something we should be able to fix. 😄

@MKleusberg @mgrojo ?

mgrojo added a commit that referenced this issue Aug 17, 2020
The ultimate cause of this not working as before is unknown, but this
should be enough as workaround for v3.12.1. In the master branch the
issue is not reproducible.

See issue #2113.
@MKleusberg
Copy link
Member

@tonypdmtr Can you try again using the nightly build? The -t/--table parameter should now work when using a project file. It will just open an extra tab with the table. Tomorrow's nightly build will also make sure to bring this tab to the foreground and allows you to pass multiple -t/--table parameters.

@tonypdmtr
Copy link
Author

Just downloaded and it seems to work OK!

@mgrojo
Copy link
Member

mgrojo commented Aug 22, 2020

So this is fixed (and improved indeed) in master and worked-around in v3.12.x, so we can finally close it.

@chrisjlocke
Copy link
Member

While -t does work, for the Windows version, --help and -v (version) still doesn't. There was a long discussion about commandline arguments here: #1069
Seeing this just reminded me...

@tonypdmtr
Copy link
Author

tonypdmtr commented Aug 24, 2020

Downloaded just now, and I get the following:

image

After I close this window the browser is on the correct table but blank. Then, if I re-select the table, data appears.

@MKleusberg
Copy link
Member

This message should be gone in tomorrow's nightly build. Not sure about your other point though. What do you mean by "correct table but blank"?

@tonypdmtr
Copy link
Author

After I press OK to remove this popup, the -t option selected table is indeed selected in the dropdown list. But there is nothing showing in the window (blank). If I re-select the table from the dropdown list, the data appears.

@MKleusberg
Copy link
Member

Ah ok, you're right. I can reproduce that. I'll see what I can do about that 😄

MKleusberg added a commit that referenced this issue Aug 24, 2020
@MKleusberg
Copy link
Member

This should also be fixed in tomorrow's nightly build 😄 Thanks for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs. release blocker Bugs that are serious enough to block our next release
Projects
None yet
Development

No branches or pull requests

6 participants