Skip to content

Crash when removing an indexed field from a table #1115

Closed

Description

@hal7df

Details for the issue

Whenever I try to remove an INTEGER indexed field from a table, DB4S locks up and I get a "DB Browser for SQLite has stopped working" message. This did not happen in DB4S 3.9.1.

The condition still seems a little fuzzy to me, but it only appears to happen when I try to delete an INTEGER field. TEXT and REAL fields delete just fine (although, curiously, if I change a field type from INTEGER to something else it still crashes).

EDIT: The issue happens when I try to delete an indexed, non-primary key field from the table.

Here's some info from the debugging dialog:
Fault Module Name: Qt5Core.dll
Fault Module Version: 5.7.1.0
Exception Code: c0000005
Exception Offset: 00000000000a637d

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: 7 )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.10.0
  • 3.10.0-beta*
  • 3.9.1
  • Other: ___

I have also:

Activity

  1. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    Hmm, that's weird. The data type shouldn't make any difference. Can you maybe remove all data from your database, so that it only contains the empty table that you're trying to edit and send me that? That should make it much easier to reproduce the issue 😄

  2. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    Member

    Does it happen in just one database, or others too? If you create a new 'dummy' database, save it, delete a field, does it do it in that too?

  3. hal7df commented on Sep 1, 2017

    @hal7df
    Author

    I don't have access to that database anymore (right now at least)...I'm trying to see if I can create a dummy that reproduces the issue.

    FWIW, I had this issue on copies of the same database (same schema, although the data may have been different)

  4. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    Member

    I can't reproduce this on my Win 7 VM, so its ggood (?!) its not a Win 7 issue... (my first thought...)

    Related to this, DB4s lets you delete the last field in a table, but it fails in doing so.

    image

    Maybe the [Delete] button could have a check of, "if number of fields in list =1 then display message, "the last field cannot be removed, bozo." "

  5. hal7df commented on Sep 1, 2017

    @hal7df
    Author

    I've been unable to reproduce it yet as well (on a Win7 VM and a Win10 VM).

    The field I was trying to delete had a NOT NULL flag set on it, although that hasn't made any difference in my attempts to reproduce it.

    I suppose it could also be a problem with the DB file(s) I was using and not DB4S, although why that would be escapes me at the moment...

  6. hal7df commented on Sep 1, 2017

    @hal7df
    Author

    Figured it out -- if you try to delete an indexed, non-primary key field, you get this behavior.

    If you try to delete "Field2" from this test database, it should crash:
    test.db.zip

  7. changed the title [-]Crash when removing an INTEGER field from a table[/-] [+]Crash when removing an indexed field from a table[/+] on Sep 1, 2017
  8. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    Member

    Yup, dies on my Win 10 PC, so not a Win 7 issue... shame! ;)
    Thanks for the extra database - useful.

  9. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Sep 1, 2017
  10. MKleusberg commented on Sep 2, 2017

    @MKleusberg
    Member

    Thanks for the update, @hal7df! That really helped a lot 😄 I think I have fixed the bug. It was caused by some new code that tries to be clever about the indices when an indexed column is updated (updating the column name in the table also updates the column name in the indices) but didn't take into account that you can also remove columns 😦 Can you download tomorrow's nightly build (or any later one) and check if it's working for you? 😄

  11. added this to the 3.10.1 - Gaaah! milestone on Sep 2, 2017
  12. hal7df commented on Sep 5, 2017

    @hal7df
    Author

    Sorry for the late response - deleting indexed columns works as expected on the 2017-09-04 nightly.

  13. justinclift commented on Sep 5, 2017

    @justinclift
    Member

    Awesome. Thanks for testing and verifying @hal7df. 😄

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.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions