antares-sql / antares

A modern, fast and productivity driven SQL client with a focus in UX
https://antares-sql.app
MIT License
1.86k stars 127 forks source link

Antares crashes during export #517

Open bart-schaefer opened 1 year ago

bart-schaefer commented 1 year ago

Ran a query that required several minutes to complete. 10 rows, 5 columns in result. Chose "Export as CSV". Got popup "blob:.. is ready" (as usual). Clicked popup; file-selection dialog ended up hidden behind fullscreen main Antares window, had to shrink to find it. Changed file name from "query-12.csv" to "tmobile-new-emails.csv" and clicked Save. Antares crashed, no file saved.

To Reproduce This is not readily reproducible. Also mentioned in bug #516

Expected behavior CSV file is saved under selected name.

Additional context In both cases noted so far (here and #516) connection was in read-only mode.

bart-schaefer commented 1 year ago

The popup actually reads Portal blob file://.... is ready

Fabio286 commented 1 year ago

Hi @bart-schaefer,

I tried to replicate the error but with no luck from a machine running Ubuntu 22.10. Can you give me some more info about the OS where you use Antares, as desktop environment or any other particular configuration? In the next few days I will continue the tests also from Ubuntu 20.04. I suspect it may be a problem related to the app permissions via Ubuntu Store. Could you tell me if the problem occurs even if you install Antares via PPA?

Thanks!

bart-schaefer commented 1 year ago

Hi @Fabio286, I was able to reproduce the error using the query from #516 by first exporting as CSV and then immediately exporting again as JSON. I did edit the file name in each case before Save. I was hoping for a coredump file but none was created.

This is on a 2011 iMac onto which I have installed Ubuntu. 4x Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz 20GB RAM

I will try the PPA install later.

bart-schaefer commented 1 year ago

I was NOT able to reproduce this with the PPA install.

Get:1 https://antares-sql.github.io/antares-ppa ./ antares 0.7.1 [80.5 MB] Fetched 80.5 MB in 13s (6,422 kB/s)
Selecting previously unselected package antares. (Reading database ... 219743 files and directories currently installed.) Preparing to unpack .../antares_0.7.1_amd64.deb ... Unpacking antares (0.7.1) ... Setting up antares (0.7.1) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...

  1. Run any query
  2. Export as CSV - this directly opens the file dialog
  3. Immediately export again as JSON - this produces the "Portal blob file://... is ready" pop-up

With the Ubuntu Software Sources / snap install, the foregoing leads to the hidden (behind the Antares main window) file dialog and a crash on save. With the PPA install, clicking the "Portal ..." pop-up opens the file dialog in front of Antares, and the save is successful.

Fabio286 commented 1 year ago

Can you paste me the output of snap interfaces antares?

Thanks.

bart-schaefer commented 1 year ago

Slot Plug gnome-3-38-2004:gnome-3-38-2004 antares gtk-common-themes:gtk-3-themes antares gtk-common-themes:icon-themes antares gtk-common-themes:sound-themes antares :browser-support antares :desktop antares :desktop-legacy antares :gsettings antares :home antares :network antares :opengl antares :unity7 antares :wayland antares :x11 antares - antares:cups-control - antares:pulseaudio - antares:removable-media

'snap interfaces' is deprecated; use 'snap connections'.

For completeness, here's snap connections antares:

Interface Plug Slot Notes browser-support antares:browser-support :browser-support - content[gnome-3-38-2004] antares:gnome-3-38-2004 gnome-3-38-2004:gnome-3-38-2004 - content[gtk-3-themes] antares:gtk-3-themes gtk-common-themes:gtk-3-themes - content[icon-themes] antares:icon-themes gtk-common-themes:icon-themes - content[sound-themes] antares:sound-themes gtk-common-themes:sound-themes - cups-control antares:cups-control - - desktop antares:desktop :desktop - desktop-legacy antares:desktop-legacy :desktop-legacy - gsettings antares:gsettings :gsettings - home antares:home :home - network antares:network :network - opengl antares:opengl :opengl - pulseaudio antares:pulseaudio - - removable-media antares:removable-media - - unity7 antares:unity7 :unity7 - wayland antares:wayland :wayland - x11 antares:x11 :x11 -

Fabio286 commented 1 year ago

I was finally able to reproduce this bug. I tested from some Ubuntu versions and other Debian-based distros and it seems that the crash occurs only on Ubuntu 20.04 with snap app distribution (Ubuntu Store). I noticed from my testing that the save window goes behind the main Antares window even with the deb app distribution on Ubuntu 20.04 but there is no crash on the second save.

Unfortunately, at this time I have not yet found any clues to help solve the problem, and for now I recommend that anyone experiencing this problem momentarily switch to the deb distribution.

Can you tell me if this problem also happened with versions prior to 0.7.1?

bart-schaefer commented 1 year ago

I believe it did happen prior to 0.7.1, yes, although I am not able to confirm a particular version where I first saw it.

64knl commented 1 year ago

I noticed from my testing that the save window goes behind the main Antares window even with the deb app distribution on Ubuntu 20.04 but there is no crash on the second save.

This bug seems to be related to: https://github.com/microsoft/vscode/issues/146422

Fabio286 commented 1 year ago

This bug seems to be related to: microsoft/vscode#146422

thanks for the reported link. It is discussed in more detail in this issue (still open). I will try to see if there is any workaround that solves the problem.