Skip to content

App crash when you open an sqlite file #1175

Closed

Description

@goczhunor

Details for the issue

I'm using this app on my mac (Mac OS Sierra). The issue appears when I select File/Close database and after that drag and drop the sqlite file. The app crashes in this scenario every time so it's very easy to reproduce the issue. After I select reopen it works fine. I think it only appears if you select close database first.

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: 10.12.6 )
  • Other: ___

I'm using DB4S version:

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

I have also:

Activity

  1. chrisjlocke commented on Oct 16, 2017

    @chrisjlocke
    Member

    Just to confirm, have you tried other databases?* I assume the databases are local and not on a network?

    * Just in case its not just one database thats upsetting it...

  2. goczhunor commented on Oct 25, 2017

    @goczhunor
    Author
  3. self-assigned this
    on Oct 25, 2017
  4. SourceTrigger commented on Nov 18, 2017

    @SourceTrigger
    Contributor

    The Bug is on ExtendedTableWidget Drop Event :)
    It's only crash, if no database is open and you drop a File to empty ExtendedTableWidget.
    There is no check, if index is valid. Result is a crash on mac.

    void ExtendedTableWidget::dropEvent(QDropEvent* event)
    {
        QModelIndex index = indexAt(event->pos());
    
        if (!index.isValid()) // Need to check
            return;
    
        model()->dropMimeData(event->mimeData(), Qt::CopyAction, index.row(), index.column(), QModelIndex());
        event->acceptProposedAction();
    }

    You can implement an emit Signal to open Database if currently no once open on this position.

  5. justinclift commented on Nov 19, 2017

    @justinclift
    Member

    @SourceTrigger Excellent, that seems like it'll be helpful. 😄

    How familiar are you with Git and/or GitHub? Just wondering if you want to create a Pull Request with the fix, which is super easy for us to merge in and gives you official credit in the contributors list. 😄

  6. SourceTrigger commented on Nov 20, 2017

    @SourceTrigger
    Contributor

    Hello, I have made a suggestion as to how a solution might look like.

    #1236

  7. justinclift commented on Dec 6, 2017

    @justinclift
    Member

    @goczhunor This should be fixed now, thanks to @SourceTrigger. Any interest in trying the latest nightly build, and confirm if it does or doesn't work now from your point of view? 😄

        https://nightlies.sqlitebrowser.org/latest/

  8. goczhunor commented on Dec 7, 2017

    @goczhunor
    Author
  9. justinclift commented on Dec 7, 2017

    @justinclift
    Member

    Fantastic! Thanks for testing it and letting us know @goczhunor. 😄

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions