Skip to content

[Portable Install] Error reading settings.ini & project files. #2791

Open

Description

@sky5walk

Details for the issue

What did you do?

Download latest DB4S-x64 nightly.
Open a previously saved sqbpro file.

What did you expect to see?

Opened DB4S with populated panels.

What did you see instead?

DB4S crashes or quits without prompt.

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:10 Pro v20H2_ )
  • Linux: ( distro: ___ )
  • macOS: ( version: ___ )
  • Other: ___

What is your DB4S version?

  • 3.12.2
  • 3.12.1
  • 3.12.0
  • 3.11.x
  • Other: ___Nightly v3.12.99-210724

Did you also

Activity

  1. sky5walk commented on Aug 1, 2021

    @sky5walk
    Author

    I think the sqbpro file is missing an xml closure element for </sql>?
    Or I need help copying many sql queries into the newer sqbpro file format.
    How to do? I cannot recreate sooo many files. :(

  2. justinclift commented on Aug 1, 2021

    @justinclift
    Member

    Uh oh, this definitely sounds like something we need to fix, as it's supposed to work.

    @MKleusberg @mgrojo @scottfurry ping?

  3. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Aug 1, 2021
  4. mgrojo commented on Aug 1, 2021

    @mgrojo
    Member

    Which version created that project file? Do you mean that is not well formed? Maybe an XML validator program gives some hint. Could you test if the older version still opens the file?

  5. sky5walk commented on Aug 2, 2021

    @sky5walk
    Author

    Yes, the older version can open the files.
    I was debugging with nightly v210127 because I was randomly losing all data in my sqbpro files.

  6. mgrojo commented on Aug 2, 2021

    @mgrojo
    Member

    I saved a project file using v3.11.2 and opened it using the latest commit in master branch. I need some reproduction steps or sample files in order to help.

  7. sky5walk commented on Aug 3, 2021

    @sky5walk
    Author

    I will submit example files as soon as I get time.
    Is there any difference in operation from full install vs portable?

  8. chrisjlocke commented on Aug 3, 2021

    @chrisjlocke
    Member

    Is there any difference in operation from full install vs portable?

    Can you clarify your terminology - 'full install' (the 3.12.2 install) and the 'portable' (3.12.2 portable version) or do you mean a nightly?

  9. sky5walk commented on Aug 3, 2021

    @sky5walk
    Author

    When searching portable, I found an open ticket for some missing runtime? I didn't see what fixed it or how that affected use.

  10. chrisjlocke commented on Aug 3, 2021

    @chrisjlocke
    Member

    All the nightlies are portable (in a loose sense) in that they don't need to be installed. They do read/write to the registry so they're not 100% 'portable', but simply extract the ZIP file and run the .exe.

  11. sky5walk commented on Aug 3, 2021

    @sky5walk
    Author

    Excellent, that saves me debugging the install step for the older version.
    I prefer portable for most applications.
    This way any customization can be transferred easily to other users.
    Especially true for Notepad++ and DB4S.
    I still don't know where the customized settings are stored? 😕

  12. chrisjlocke commented on Aug 3, 2021

    @chrisjlocke
    Member

    The registry. Specifically [Computer\HKEY_CURRENT_USER\Software\sqlitebrowser\sqlitebrowser]

    image

  13. sky5walk commented on Aug 3, 2021

    @sky5walk
    Author

    Ok, that makes sense for an install on Windows platforms, but where are settings stored for portable?
    And, thinking cross-platform, wherefore art thou settings?

  14. chrisjlocke commented on Aug 4, 2021

    @chrisjlocke
    Member

    I don't know what you mean by 'portable'. As above, if you mean the nightlies, then still the registry. If you mean the portableApps portable version, then still the registry, but also locally in an .INI file with the program. This is then imported back into the registry prior to loading. Other operating systems have their own mechanism. MacOS for example uses /Users/username/Library/Preferences. Linux would use .dot files in home directories, etc.

  15. 8 remaining items

  16. chrisjlocke commented on Aug 7, 2021

    @chrisjlocke
    Member

    I feel we're going down a rabbit hole of questions and issues without resolving the main issue.
    Can you email me the sbpro file you're having issues with, which opens fine in an older version of DB4S and not a newer one (redirection.services.2021+2791@gmail.com).
    I'm aware (possibly) of a difference of base code between the official releases and the nightlies. You say 'an older version' and 'a nightly' - does the sqbpro file that does not open in a nightly open OK in 3.12.2 - the released version?
    (Note that 3.12.2 is still 'portable' - you don't have to install it and it can be run directly like the nightlies).

  17. sky5walk commented on Aug 7, 2021

    @sky5walk
    Author

    Yes, I have to sanitize before sending.
    Likewise, I would appreciate anyone confirming the following:

    1. Install any nightly as portable.
    2. Make some preference changes. Font size, dark mode, etc.
    3. Export those changes to a settings file.
    4. Exit DB4S.
    5. Open DB4S.
    6. Are your settings still in place?
      If so, why? Portable should not write to the Registry.
      But, I think it is.
      Portable should either use default settings or custom settings file in a known path.
    7. Attempt to import prior saved settings file.
      This fails for me in all scenarios.
      I prefer not to investigate sqbpro file reads if this basic function is broken.
  18. chrisjlocke commented on Aug 7, 2021

    @chrisjlocke
    Member

    If so, why? Portable should not write to the Registry.

    I mentioned this above. DB4S isn't 100% 'portable' in that it leaves remnants behind. It's not written from the ground up to be portable. There are just shims in place to export/import the registry values where required (eg, the portableApps version) or simply write to the registry like the normal application (in the case of the .zip).
    Don't read 'portable' literally - you'll save yourself an aneurysm.

  19. chrisjlocke commented on Aug 7, 2021

    @chrisjlocke
    Member

    if this basic function is broken

    If you're talking about the -S option, then that's not a 'basic function - that is a new development thing in development only in the development version.

  20. mgrojo commented on Aug 7, 2021

    @mgrojo
    Member

    I've reviewed the code for the -S option and haven't seen any apparent problem. What are exactly the values that are written?

  21. sky5walk commented on Aug 9, 2021

    @sky5walk
    Author

    Ok,
    The exported settings defines paths multiple ways?

    recentFileList=C:/try/db/Copy.db, C:/try/db/Copy2.db
    defaultlocation=C:\\try
    clonedirectory=C:\\Users\\me\\AppData\\Roaming\\sqlitebrowser\\DB Browser for SQLite
    
    

    As mentioned above, I cannot import a saved settings file!
    So, I have no confidence -S will work and it does not.
    Can you confirm?
    Below is my settings file:

  22. sky5walk commented on Aug 9, 2021

    @sky5walk
    Author
    My settings file...
    DBFileExtensions=SQLite database files (*.db *.sqlite *.sqlite3 *.db3)
    appStyle=1
    fontsize=12
    language=en_US
    maxRecentFiles=25
    promptsqltabsinnewproject=true
    recentFileList=C:/try/db/Copy.db, C:/try/db/Copy2.db
    toolbarStyle=2
    toolbarStyleBrowse=0
    toolbarStyleEditCell=0
    toolbarStyleSql=0
    toolbarStyleStructure=2
    
    [MainWindow]
    geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\xff\xff\xff\xff\xff\xff\xfb\xc0\0\0\a\x80\0\0\0\0\0\0\0\xb2\xff\xff\xfcr\0\0\x3\xed\xff\xff\xfe\xd9\0\0\0\x2\x2\0\0\0\a\x80\0\0\0\0\xff\xff\xfb\xdf\0\0\a\x7f\xff\xff\xff\xff)
    openTabs=browser query structure pragmas
    windowState="@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\x1\xb8\0\0\x3\xb7\xfc\x2\0\0\0\x2\xfb\0\0\0\x10\0\x64\0o\0\x63\0k\0\x45\0\x64\0i\0t\x1\0\0\0M\0\0\x1\xdc\0\0\0\xeb\0\xff\xff\xff\xfb\0\0\0\xe\0\x64\0o\0\x63\0k\0L\0o\0g\x1\0\0\x2\x32\0\0\x1\xd2\0\0\0z\0\xff\xff\xff\0\0\0\x1\0\0\x1\xe4\0\0\x3\xc9\xfc\x2\0\0\0\x1\xfc\0\0\0;\0\0\x3\xc9\0\0\0\0\0\xff\xff\xff\xfa\xff\xff\xff\xff\x2\0\0\0\x3\xfb\0\0\0\x10\0\x64\0o\0\x63\0k\0P\0l\0o\0t\0\0\0\0\0\xff\xff\xff\xff\0\0\0\xcd\0\xff\xff\xff\xfb\0\0\0\x14\0\x64\0o\0\x63\0k\0S\0\x63\0h\0\x65\0m\0\x61\0\0\0\0\0\xff\xff\xff\xff\0\0\0G\0\xff\xff\xff\xfb\0\0\0\x14\0\x64\0o\0\x63\0k\0R\0\x65\0m\0o\0t\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\xc5\0\xff\xff\xff\0\0\x5\xbf\0\0\x3\xb7\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x3\0\0\0\x12\0t\0o\0o\0l\0\x62\0\x61\0r\0\x44\0\x42\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x1c\0t\0o\0o\0l\0\x62\0\x61\0r\0P\0r\0o\0j\0\x65\0\x63\0t\x1\0\0\x2\x9f\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x1c\0t\0o\0o\0l\0\x62\0\x61\0r\0\x45\0x\0t\0r\0\x61\0\x44\0\x42\x1\0\0\x3\xd2\xff\xff\xff\xff\0\0\0\0\0\0\0\0)"
    
    [PlotDock]
    lineType=1
    pointShape=4
    splitterSize=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\x80\0\0\x2\xc8\x1\xff\xff\xff\xff\x1\0\0\0\x2\0)
    
    [SQLLogDock]
    Log=User
    
    [SchemaDock]
    dropEnquotedNames=true
    dropQualifiedNames=false
    
    [checkversion]
    enabled=false
    
    [databrowser]
    auto_switch_mode=true
    bin_bg_colour=@Variant(\0\0\0\x43\x1\xff\xff\x19\x19##--\0\0)
    bin_fg_colour=@Variant(\0\0\0\x43\x1\xff\xffxxxxxx\0\0)
    blob_text=BLOB
    complete_threshold=0
    editor_word_wrap=true
    filter_delay=200
    filter_escape=\\
    font=Consolas
    fontsize=12
    image_preview=false
    indent_compact=false
    null_bg_colour=@Variant(\0\0\0\x43\x1\xff\xff\x19\x19##--\0\0)
    null_fg_colour=@Variant(\0\0\0\x43\x1\xff\xffxxxxxx\0\0)
    null_text=NULL
    reg_bg_colour=@Variant(\0\0\0\x43\x1\xff\xff\x19\x19##--\0\0)
    reg_fg_colour=@Variant(\0\0\0\x43\x1\xff\xff\xf0\xf0\xf0\xf0\xf0\xf0\0\0)
    symbol_limit=5000
    
    [db]
    defaultencoding=UTF-8
    defaultfieldtype=0
    defaultlocation=C:\\try
    defaultsqltext=
    fontsize=14
    foreignkeys=true
    hideschemalinebreaks=true
    prefetchsize=50000
    savedefaultlocation=2
    
    [editor]
    auto_completion=true
    close_button_on_tabs=true
    error_indicators=true
    font=Consolas
    fontsize=14
    horizontal_tiling=false
    identifier_quotes=0
    splitter1_sizes=@Invalid()
    splitter2_sizes=@Invalid()
    tabsize=2
    upper_keywords=true
    wrap_lines=0
    
    [extensions]
    disableregex=false
    enable_load_extension=false
    list=@Invalid()
    
    [log]
    fontsize=12
    
    [proxy]
    authentication=false
    host=
    password=
    port=1
    type=system
    user=
    
    [remote]
    active=false
    client_certificates=@Invalid()
    clonedirectory=C:\\Users\\me\\AppData\\Roaming\\sqlitebrowser\\DB Browser for SQLite
    
    [syntaxhighlighter]
    background_bold=false
    background_colour=#19232d
    background_italic=false
    background_underline=false
    comment_bold=true
    comment_colour=#00ff00
    comment_italic=false
    comment_underline=false
    currentline_bold=false
    currentline_colour=#253443
    currentline_italic=false
    currentline_underline=false
    foreground_bold=false
    foreground_colour=#f0f0f0
    foreground_italic=false
    foreground_underline=false
    function_bold=true
    function_colour=#ffff00
    function_italic=false
    function_underline=false
    highlight_bold=false
    highlight_colour=#4f94cd
    highlight_italic=false
    highlight_underline=false
    identifier_bold=true
    identifier_colour=#ff00ff
    identifier_italic=false
    identifier_underline=false
    keyword_bold=true
    keyword_colour=#5294e2
    keyword_italic=false
    keyword_underline=false
    selected_bg_bold=false
    selected_bg_colour=#0078d7
    selected_bg_italic=false
    selected_bg_underline=false
    selected_fg_bold=false
    selected_fg_colour=#ffffff
    selected_fg_italic=false
    selected_fg_underline=false
    string_bold=true
    string_colour=#c0c0c0
    string_italic=false
    string_underline=false
    table_bold=true
    table_colour=#00ffff
    table_italic=false
    table_underline=false
    
    
  23. chrisjlocke commented on Aug 9, 2021

    @chrisjlocke
    Member

    The exported settings defines paths multiple ways

    What's your OS? Windows is pretty forgiving, so knows c:/directory/directory is actually c:\directory\directory. Similliarly, while you see c:\\users\\me\\ in the file, they're actually escaped, so its not an error.

  24. sky5walk commented on Aug 9, 2021

    @sky5walk
    Author

    Windows 10 latest.
    Sure, path characters are forgiving, but there is no reason to mix them in 1 application!
    It was a guess since I cannot import the settings file DB4S creates. :(

  25. chrisjlocke commented on Aug 9, 2021

    @chrisjlocke
    Member

    but there is no reason to mix them in 1 application

    It's because there is no one developer creating code, and no one routine for writing paths, so when writing code, if a developer is on Linux, got his head in Linux, uses Linux every day, it's very hard to suddenly think, "Aah yes - Windows is odd and used backslashes".

  26. sky5walk commented on Aug 9, 2021

    @sky5walk
    Author

    Path characters are just another variable. If a developer gets this wrong in 2021, it is still a bug.
    There is nothing "odd" about Windows paths given it is the dominant desktop environment by an extremely large margin. Mobile and IOT ARM platforms are a different topic.

    Again, I just want to eliminate bugs such as reading self generated setup files and backward compatible project files.

  27. mgrojo commented on Aug 9, 2021

    @mgrojo
    Member

    I think I've fixed the problem with the checking of the "ini" file in Windows. It seems related to line-endings, a typical problem for portability. Could someone confirm it on Windows?

    By the way, Windows accepts "/" as directory separator from the beginning. I wanted to confirm it, and I've discovered that even DOS did that. Why? In fact, they wanted to use "/" as UNIX, but it was already taken for the command options, when DOS lacked directories, so they used "\" instead. (Edited: I had to double the backslash in this comment, another problem that developers sometimes encounter with this character 😄)

  28. sky5walk commented on Aug 10, 2021

    @sky5walk
    Author

    Ok, nightly v210810 can import a settings file. 👍
    But, it still crashes when trying to open my v210127 sqbpro file. 👎

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs or reports that are very likely to be bugs.projects

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions