Skip to content

Crash when switching to "Browse Data" #2288

Closed

Description

@th

Details for the issue

What did you do?

Loaded my project file, which starts me in the Execute SQL view. Clicked on the Brose Data Tab.

I could share the project file (and SQLite database), but don't want to make it publically available on GitHub.

It's an SQLite database with less than 2000 rows. I have added a view that picks out about zero to thirty rows (depending on the current day):

CREATE VIEW eligible as SELECT * FROM entries WHERE date < date('now','-28 months') OR (date < date('now','-6 months') AND (leaveout = 'FALSE')) ORDER BY date ASC

I can query in the Execute SQL tab using SELECT * FROM eligible limit 2; without problems.

I also have two triggers:

CREATE TRIGGER eligible_change_leaveout
INSTEAD OF UPDATE OF leaveout ON eligible
BEGIN
UPDATE submissions SET leaveout=NEW.leaveout
WHERE id=NEW.id;
END

CREATE TRIGGER eligible_change_date
INSTEAD OF UPDATE OF date ON eligible
BEGIN
UPDATE submissions SET date=NEW.date
WHERE id=NEW.id;
END

What did you expect to see?

My data, starting in a view I have added and used previously.

What did you see instead?

The application crashes without any error message.

Useful extra information

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

What operating system are you using?

  • [X ] Windows: ( version: 10 H2___ )
  • Linux: ( distro: ___ )
  • macOS: ( version: ___ )
  • Other: ___

What is your DB4S version?

  • [X ] 3.12.0-(release)
  • 3.11.2
  • 3.11.1
  • 3.10.1
  • Other: ___

Did you also

Activity

  1. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Jun 18, 2020
  2. justinclift commented on Jun 18, 2020

    @justinclift
    Member

    Ouch. Ok, you're welcome to email the database and project file to me (justin@postgresql.org), and I can forward it to whichever of our developers wants to pick this up. 😄

  3. chrisjlocke commented on Jun 18, 2020

    @chrisjlocke
    Member

    Just as a 'see what breaks', what happens if you create a copy of the database without the triggers, open the database (not a project file) and browse the data - is that all good?
    What happens if you keep the triggers, open the database, then browse the data?
    What happens if you ... etc. If you haven't got time for that, feel free to email me the database / project file at db4s [at] chrisjlocke.co.uk. While I'm not a developer per se, I have the time to fiddle and find out where its breaking to pass on to someone who knows more.... 😃

  4. justinclift commented on Jun 18, 2020

    @justinclift
    Member

    @th Thanks, received the files. I've just forwarded them to @chrisjlocke so he can experiment with them. 😄

  5. chrisjlocke commented on Jun 18, 2020

    @chrisjlocke
    Member

    👍

  6. chrisjlocke commented on Jun 18, 2020

    @chrisjlocke
    Member

    Well, its reproducible. The information from WinDbg isn't that hot though.

    ModLoad: 5d280000 5d30b000   C:\Windows\SysWOW64\Windows.StateRepositoryPS.dll
    shell\comdlg32\fileopensave.cpp(14414)\COMDLG32.dll!76AB700A: (caller: 76AE7641) ReturnHr(1) tid(403c) 80004005 Unspecified error
        CallContext:[\PickerModalLoop] 
    ModLoad: 0b490000 0b734000   C:\WINDOWS\SysWOW64\MsftEdit.dll
    ModLoad: 0b490000 0b734000   C:\WINDOWS\SysWOW64\MsftEdit.dll
    ModLoad: 63e60000 63e8b000   C:\WINDOWS\SysWOW64\xmllite.dll
    ModLoad: 79860000 798ec000   C:\WINDOWS\SysWOW64\wpdshext.dll
    ModLoad: 6ff30000 70099000   C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.900_none_5f56e39582231feb\gdiplus.dll
    ModLoad: 799b0000 799f0000   C:\WINDOWS\SysWOW64\audiodev.dll
    ModLoad: 799f0000 79bfd000   C:\WINDOWS\SysWOW64\WMVCore.DLL
    ModLoad: 5e3d0000 5e4d6000   C:\WINDOWS\SysWOW64\mfperfhelper.dll
    ModLoad: 79c00000 79c3d000   C:\WINDOWS\SysWOW64\WMASF.DLL
    shell\comdlg32\fileopensave.cpp(14414)\COMDLG32.dll!76AB700A: (caller: 76AE7641) ReturnHr(2) tid(403c) 80004005 Unspecified error
        CallContext:[\PickerModalLoop] 
    (758.403c): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=0c0aa708 ebx=04aa09d0 ecx=04aa0ba8 edx=00000000 esi=00000000 edi=04f98204
    eip=00c2a026 esp=0133c23c ebp=0133c270 iopl=0         nv up ei ng nz ac po cy
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00210293
    DB_Browser_for_SQLite+0x10a026:
    00c2a026 ff7610          push    dword ptr [esi+10h]  ds:002b:00000010=????????
    

    Call stack:
    image

    I might need a version that outputs debug info (preferably to a file and not the console though, as that doesn't work too well when running the actual application)

    When opening the project file, table 'submissions' shows no records (0 - 0 of 0) with no filters applied. By opening the database itself, it shows 1847 rows.
    When opening the project file, any attempt to view the view 'eligible' crashes DB4S (with no error). By opening the database itself, this view opens fine with 15 rows.

    Opening the project file, saving it, closing the current one and opening the new one has no effect.
    Viewing the view in the Execute SQL tab works fine.
    4 low flying helicopters just went overhead! Exciting. Red Arrows due later too. Nice day.
    Anyway.
    Created a new view (using the 'copy create statement' of the original view) and that worked. Saved the project. Reloaded, and still worked. HOWEVER.
    Deleted old view, renamed copy (eligible2) to the old name (eligible) and the crash returned.

    An integrity check of the database passed.

    As a side note (I haven't human-read the project file yet) when I open the project file, DB4S asks for the database to use. It doesn't do that when I save it and reload it. I assume this is by design.
    It is, so shut up Chris.

    As another side note, open the project file, and it'll open. Immediately open it again and it'll crash.
    https://vimeo.com/430390533
    I just created a new database, saved that to a new project, and couldn't replicate this error, so its something in this project file.

    @th - If you open the database itself, all should be good. You can open more than one copy of DB4S at the same time, so work on the project file in one copy and browse the table in another copy. Not ideal in the slightest, but a hacky workaround until this is fixed.

  7. scottfurry commented on Jun 18, 2020

    @scottfurry
    Contributor

    Been a while since I debugged Win apps, but...

    shell\comdlg32\fileopensave.cpp(14414)\COMDLG32.dll!76AB700A: (caller: 76AE7641) ReturnHr(1) tid(403c) 80004005 Unspecified error
        CallContext:[\PickerModalLoop] 
    

    ... COMDLG is the Windows common dialog dll. Suffixed w/ 32 means it's the 32 bit variant. This leaves me with the impression there's mixing of 32 bit/64 bit libraries happening.
    Was QT built with correct instructions vis a vis 64 bit application?

  8. scottfurry commented on Jun 18, 2020

    @scottfurry
    Contributor

    As a sidebar to this....
    On the linux side, when I was debugging things, I got the following:

    QFont::fromString: Invalid description '(empty)'
    

    when running latest and switching from/to the Browse tab. It wasn't a priority for me at the moment and I was going to come back to root out the source. Seems relevant in these circumstances.

  9. chrisjlocke commented on Jun 18, 2020

    @chrisjlocke
    Member

    Was QT built with correct instructions vis a vis 64 bit application?

    Good point. I had tested with only the 32bit version of DB4S, but just tried again, and the crash still occurs if I use the 64bit version.

  10. justinclift commented on Jun 19, 2020

    @justinclift
    Member

    Forwarded the database bits to @MKleusberg as well. 😄

  11. added a commit that references this issue on Jun 19, 2020
  12. MKleusberg commented on Jun 19, 2020

    @MKleusberg
    Member

    Unfortunately it doesn't crash on my system. So it might be a Windows thing after all. I did however also notice that you don't see any rows in the view. This was because of some empty values for the filter in the project file and it's fixed now.I don't think this leads to the crash but it's still worth trying the next nightly build and see if that changes anything.

  13. th commented on Jun 21, 2020

    @th
    Author

    I just tried the nightly (Windows, 64 bit, zip) from 2020-06-21, and everything works as expected on first glance.

    Thank you!

  14. justinclift commented on Jun 21, 2020

    @justinclift
    Member

    @th Just to confirm... it's no longer crashing for you?

  15. th commented on Jun 22, 2020

    @th
    Author

    That's correct.

  16. 5 remaining items

  17. added a commit that references this issue on Jun 23, 2020
  18. MKleusberg commented on Jun 23, 2020

    @MKleusberg
    Member

    @justinclift Definitely 😄 I've just cherry-picked the commit to the v3.12.x branch.

  19. scottfurry commented on Jun 23, 2020

    @scottfurry
    Contributor

    Maybe associated (or I'm conflating issues):

    I tried latest (Linux x86_64) and the error message of QFont::fromString: Invalid description '(empty)' is still appearing. However, it only shows when opening a DB file and switching to the Browse tab or when closing a DB file.

  20. justinclift commented on Jun 24, 2020

    @justinclift
    Member

    @scottfurry Sounds like that string error needs further debugging work, to figure out exactly wtf is causing it. 😦

    Not sure if it's this issue, but probably good to get it resolved from a safety point of view just in case?

  21. MKleusberg commented on Jun 24, 2020

    @MKleusberg
    Member

    @scottfurry I can't reproduce this message. Can you maybe give me a step by step explanation of what you're doing and at what exact step the message appears. Maybe this helps narrowing this down even if it doesn't happen on my system 😄

  22. scottfurry commented on Jun 24, 2020

    @scottfurry
    Contributor

    @MKleusberg - Not doing anything fancy.
    Build w/ external libraries enabled and SQLCipher. Qt Version 5.14.2. Start from command line. Open any DB file. Switch to "Browse" tab(get error message on console). Error appears again when closing DB file.

  23. MKleusberg commented on Jul 1, 2020

    @MKleusberg
    Member

    @scottfurry Thanks for the extra details! Can you check tomorrow's nightly build and see if the warning disappears? It's definitely a completely harmless warning though 😄

  24. scottfurry commented on Jul 1, 2020

    @scottfurry
    Contributor

    Still seeing QFont::fromString: Invalid description '(empty)' on master branch.

  25. scottfurry commented on Jul 4, 2020

    @scottfurry
    Contributor

    Using latest repo master, this problem seems to have disappeared. I suspect that something done to resolve #2310 may have fixed this one. I'm good to close this if there is no objections.

  26. justinclift commented on Jul 4, 2020

    @justinclift
    Member

    Is #2310 the right one? Looking at that, there doesn't seem to be any (even tentative) commits to fix it yet?

  27. scottfurry commented on Jul 4, 2020

    @scottfurry
    Contributor

    Not sure exactly what but something in the last 3 days fixed it.
    Looks like this commit ea6d008 fixed the issue.

  28. justinclift commented on Jul 4, 2020

    @justinclift
    Member

    Cool. 😄

  29. MKleusberg commented on Jul 5, 2020

    @MKleusberg
    Member

    Yep, that was the commit which I thought should fix it 😄

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

Metadata

Metadata

Assignees

Labels

bugConfirmed 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