Bug: Overwrites incorrect file
Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Configuration
pgAdmin3
./configure --prefix=/usr/local
$ uname -a
Linux jaguar 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux
$ psql --version
psql (PostgreSQL) 8.4.4
Reproduce the Problem
The file joe2.sql should contain some text.
Actual Results
At this point one of two things will happen:
Addendum
Crashing is good. Overwriting other files is... bad.
This might not be a pgAdmin error. If it is not, please let me know where I should direct the problem, as it is quite severe.
Dave
pgAdmin3
./configure --prefix=/usr/local
$ uname -a
Linux jaguar 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux
$ psql --version
psql (PostgreSQL) 8.4.4
Reproduce the Problem
- Create an empty directory; put some empty files inside.
- Make some empty directories in the formerly empty directory.
- In the following steps, make sure you use that empty directory created in step 1 or you might lose work.
- Click the "Execute arbitrary queries" button
- Type in some text
- Type: Alt-f
- Type: a
- Type: Alt-n
- Type: joe.sql
- Type: Alt-s
- Repeat steps 2 - 7, but for step 6 use joe2.sql
- Type: Alt-f
- Type: a
- Click joe2.sql
- Click Save
The file joe2.sql should contain some text.
Actual Results
At this point one of two things will happen:
- another file in the same directory as joe2.sql will be overwritten
- pgadmin3 will crash:
**
Gtk:ERROR:/build/buildd/gtk+2.0-2.20.1/gtk/gtkfilechooserdefault.c:8125:get_display_name_from_file_list: assertion failed: (had_selection)
Aborted
Gtk:ERROR:/build/buildd/gtk+2.0-2.20.1/gtk/gtkfilechooserdefault.c:8125:get_display_name_from_file_list: assertion failed: (had_selection)
Aborted
Addendum
Crashing is good. Overwriting other files is... bad.
This might not be a pgAdmin error. If it is not, please let me know where I should direct the problem, as it is quite severe.
Dave
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Sorry, I shifted the sequence. The correct order is:
- Make some empty directories in the formerly empty directory.
- In the following steps, make sure you use that empty directory created in step 1 or you might lose work.
- Click the "Execute arbitrary queries" button
- Type in some text
- Type: Alt-f
- Type: a
- Type: Alt-n
- Type: joe.sql
- Type: Alt-s
- Repeat steps 4 - 9, but for step 8 use joe2.sql
- Type: Alt-f
- Type: a
- Click joe2.sql
- Click Save
Dave
Re: Bug: Overwrites incorrect file
От:
Dave Page <dpage@pgadmin.org>
Дата:
On Fri, Jun 25, 2010 at 9:29 AM, David Jarvis wrote: > Sorry, I shifted the sequence. The correct order is: > > Make some empty directories in the formerly empty directory. > In the following steps, make sure you use that empty directory created in > step 1 or you might lose work. > Click the "Execute arbitrary queries" button > Type in some text > Type: Alt-f > Type: a > Type: Alt-n > Type: joe.sql > Type: Alt-s > Repeat steps 4 - 9, but for step 8 use joe2.sql > Type: Alt-f > Type: a > Click joe2.sql > Click Save First off, what version of pgAdmin is this? It certainly doesn't seem to be 1.12.x. It looks like it might be 1.10, but I can't see what pressing Alt-n is supposed to do in a Save As dialog (it does nothing here in CentOS 5). Ignoring the Alt-n issue, it works as I'd expect here. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Alt-n focuses the cursor to the Name field.
pgAdmin v1.10.3
Dave
Re: Bug: Overwrites incorrect file
От:
Dave Page <dpage@pgadmin.org>
Дата:
On Fri, Jun 25, 2010 at 11:20 AM, David Jarvis wrote: > Alt-n focuses the cursor to the Name field. > > pgAdmin v1.10.3 I can't find anything wrong when following your instructions. It always updates the file that is named/selected. Does the 'overwrite file?' warning show the correct filename? -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company
Re: Bug: Overwrites incorrect file
От:
Dave Page <dpage@pgadmin.org>
Дата:
On Fri, Jun 25, 2010 at 12:06 PM, David Jarvis wrote: > Hi, > > Here is the sequence of events: > > http://i.imgur.com/2MCY4.png "image not found" -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company
Re: Bug: Overwrites incorrect file
От:
Dave Page <dpage@pgadmin.org>
Дата:
On Fri, Jun 25, 2010 at 12:08 PM, David Jarvis wrote: > I am very off my game tonight, my apologies once more. > > http://imgur.com/y5CCl I certainly don't see anything like that. Anyone else? -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
I haven't been able to track down what file it picks "at random". At first I thought it was an off-by-one error because it seemed to pick the file (or directory) above the one I selected. In this case, "work".
However, the more I looked into it, no pattern emerged.
Either way, it should not have selected the .openshot folder when I asked it to select the plr_stations SQL file. :-)
Let me know if there's anything else I can do to help -- tomorrow.
Good night!
Dave
Re: Bug: Overwrites incorrect file
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 25/06/2010 13:10, Dave Page a écrit : > On Fri, Jun 25, 2010 at 12:08 PM, David Jarvis wrote: >> I am very off my game tonight, my apologies once more. >> >> http://imgur.com/y5CCl > > I certainly don't see anything like that. Anyone else? > I tried tonight a few times. I don't see any issue, the behaviour seems right to me. I don't have the issue mentioned by David. FYI, I checked on Linux (Xubuntu 10.04, with XFCE 4.6). -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Hi,
I compiled a debug version of pgAdmin3. The problem still happens. I have not yet made it crash, but it continually uses the previous file (or directory) in the dialog. The ldd:
linux-vdso.so.1 => (0x00007fff8bbff000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f1e3ca96000)
libwx_gtk2ud_stc-2.8.so.0 => /usr/lib/libwx_gtk2ud_stc-2.8.so.0 (0x00007f1e3c791000)
libwx_gtk2ud_ogl-2.8.so.0 => /usr/lib/libwx_gtk2ud_ogl-2.8.so.0 (0x00007f1e3c524000)
libwx_gtk2ud_richtext-2.8.so.0 => /usr/lib/libwx_gtk2ud_richtext-2.8.so.0 (0x00007f1e3c226000)
libwx_gtk2ud_aui-2.8.so.0 => /usr/lib/libwx_gtk2ud_aui-2.8.so.0 (0x00007f1e3bfa8000)
libwx_gtk2ud_xrc-2.8.so.0 => /usr/lib/libwx_gtk2ud_xrc-2.8.so.0 (0x00007f1e3bcfd000)
libwx_gtk2ud_qa-2.8.so.0 => /usr/lib/libwx_gtk2ud_qa-2.8.so.0 (0x00007f1e3bad9000)
libwx_gtk2ud_html-2.8.so.0 => /usr/lib/libwx_gtk2ud_html-2.8.so.0 (0x00007f1e3b820000)
libwx_gtk2ud_adv-2.8.so.0 => /usr/lib/libwx_gtk2ud_adv-2.8.so.0 (0x00007f1e3b52d000)
libwx_gtk2ud_core-2.8.so.0 => /usr/lib/libwx_gtk2ud_core-2.8.so.0 (0x00007f1e3aec6000)
libwx_baseud_xml-2.8.so.0 => /usr/lib/libwx_baseud_xml-2.8.so.0 (0x00007f1e3acb9000)
libwx_baseud_net-2.8.so.0 => /usr/lib/libwx_baseud_net-2.8.so.0 (0x00007f1e3aa86000)
libwx_baseud-2.8.so.0 => /usr/lib/libwx_baseud-2.8.so.0 (0x00007f1e3a6f7000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f1e3a3a7000)
libxslt.so.1 => /usr/lib/libxslt.so.1 (0x00007f1e3a16b000)
libpq.so.5 => /usr/lib/libpq.so.5 (0x00007f1e39f43000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f1e39c2f000)
libm.so.6 => /lib/libm.so.6 (0x00007f1e399ab000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f1e39794000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f1e39577000)
libc.so.6 => /lib/libc.so.6 (0x00007f1e391f4000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f1e38fce000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00007f1e38dca000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f1e38bc1000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00007f1e389be000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007f1e387a5000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007f1e38182000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007f1e37ed5000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f1e37cb4000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f1e37a89000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f1e3786d000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f1e375ba000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f1e3736f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f1e370e9000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f1e36eb4000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f1e36c6b000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f1e36a67000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f1e36862000)
librt.so.1 => /lib/librt.so.1 (0x00007f1e36659000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007f1e3637b000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f1e36178000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f1e35f6e000)
libpng12.so.0 => /lib/libpng12.so.0 (0x00007f1e35d47000)
libz.so.1 => /lib/libz.so.1 (0x00007f1e35b30000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f1e3590b000)
libtiff.so.4 => /usr/lib/libtiff.so.4 (0x00007f1e356a9000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f1e354a5000)
libexpat.so.1 => /lib/libexpat.so.1 (0x00007f1e3527a000)
libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007f1e3502a000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007f1e34c99000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f1e34a65000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f1e3482c000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x00007f1e345df000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1e3cd81000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f1e343cd000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f1e341c2000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f1e33fb2000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f1e33da9000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f1e33b9e000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f1e33991000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f1e3365b000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f1e33457000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f1e33254000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f1e3304e000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f1e32dca000)
libpcre.so.3 => /lib/libpcre.so.3 (0x00007f1e32b9c000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00007f1e3297d000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f1e32762000)
libuuid.so.1 => /lib/libuuid.so.1 (0x00007f1e3255c000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007f1e3234e000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007f1e32133000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007f1e31e91000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f1e31c74000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f1e31a1b000)
libdirectfb-1.2.so.0 => /usr/lib/libdirectfb-1.2.so.0 (0x00007f1e31798000)
libfusion-1.2.so.0 => /usr/lib/libfusion-1.2.so.0 (0x00007f1e3158d000)
libdirect-1.2.so.0 => /usr/lib/libdirect-1.2.so.0 (0x00007f1e31374000)
libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0x00007f1e31170000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f1e30f66000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007f1e30d55000)
libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007f1e30adc000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f1e308d8000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f1e306d2000)
libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007f1e304cd000)
I have pgadmin3 loaded up in ddd. If someone wants to tell me where I should set a break-point, that would be great.
Dave
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Try this:Next:
- cd $HOME
- touch .xsession-errors
- pgadmin3
- Connect to a database
- Click on tables
- Click the Execute arbitrary statements button
- Type some text
- Save as ... test.sql
You should now receive an error that the file could not be saved (because you are saving over a directory) OR it will overwrite an existing file..
- Type Alt-f
- Type a
- Click test.sql
- Click Save
- Click Replace
If the file .xsession-errors is in the same directory that you are saving, the save as routine will "randomly" select a different file to save over.
I discovered this by:This meant that the main difference was that there are hidden "dot" files in $HOME but not in /home/temp. (Admittedly, it could have been a combination of dot directories, dot files, the number of files, or some weird sum of name lengths issue.)
- Saving the file into /tmp: there was no error.
- Recreating all of the hidden "dot" subdirectories from $HOME directory into /home/temp.
- Saving the file into /home/temp; there was no error.
I then noticed I had a 100k .xsession-errors file in $HOME that I did not need. After I deleted it, I could no longer recreate the bug. Certainly more than a coincidence. ;-)
Dave
Re: Bug: Overwrites incorrect file
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 27/06/2010 02:21, David Jarvis a écrit : > Try this: > > 1. cd $HOME > 2. touch *.xsession-errors* > 3. pgadmin3 > 4. Connect to a database > 5. Click on tables > 6. Click the Execute arbitrary statements button > 7. Type some text > 8. Save as ... test.sql > > Next: > > 1. Type *Alt-f* > 2. Type *a* > 3. Click test.sql > 4. Click Save > 5. Click Replace > > You should now receive an error that the file could not be saved > (because you are saving over a directory) *OR* it will overwrite an > existing file.. > > If the file .xsession-errors is in the same directory that you are > saving, the save as routine will "randomly" select a different file to > save over. > > I discovered this by: > > 1. Saving the file into */tmp*: there was no error. > 2. Recreating all of the hidden "dot" subdirectories from $HOME > directory into */home/temp*. > 3. Saving the file into */home/temp*; there was no error. > > This meant that the main difference was that there are hidden "dot" > files in $HOME but not in */home/temp*. (Admittedly, it could have been > a combination of dot directories, dot files, the number of files, or > some weird sum of name lengths issue.) > > I then noticed I had a 100k .xsession-errors file in $HOME that I did > not need. After I deleted it, I could no longer recreate the bug. > Certainly more than a coincidence. ;-) > Tried it, worked fine to me. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Salut, Guillaume.
$ ls -la $(which pgadmin3)
-rwxr-xr-x 1 root root 45324803 2010-06-26 16:26 /usr/local/bin/pgadmin3
That was built using:
I have posted my debug build at (16MB):
The binary is shared (not static) because I am missing the static version of wxWidgets.
I wonder if it's strictly a problem with the GTK libraries used by Kubuntu 10.04?
I can reproduce the problem 100% of the time on my machine. Are there any particular versions of libraries (relating to that dialog box) that I should have installed?
Dave
$ ls -la $(which pgadmin3)
-rwxr-xr-x 1 root root 45324803 2010-06-26 16:26 /usr/local/bin/pgadmin3
That was built using:
./configure --prefix=/usr/local --enable-debug
make && make install
make && make install
I have posted my debug build at (16MB):
The binary is shared (not static) because I am missing the static version of wxWidgets.
I wonder if it's strictly a problem with the GTK libraries used by Kubuntu 10.04?
I can reproduce the problem 100% of the time on my machine. Are there any particular versions of libraries (relating to that dialog box) that I should have installed?
Dave
Re: Bug: Overwrites incorrect file
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 27/06/2010 12:14, David Jarvis a écrit : > Salut, Guillaume. > Hi David :) > $ ls -la $(which pgadmin3) > -rwxr-xr-x 1 root root 45324803 2010-06-26 16:26 /usr/local/bin/pgadmin3 > > That was built using: > > ./configure --prefix=/usr/local --enable-debug > make && make install > > I have posted my debug build at (16MB): > > http://whitemagicsoftware.com/pgadmin3.gz > > The binary is shared (not static) because I am missing the static > version of wxWidgets. > > I wonder if it's strictly a problem with the GTK libraries used by > Kubuntu 10.04? > > I can reproduce the problem 100% of the time on my machine. Are there > any particular versions of libraries (relating to that dialog box) that > I should have installed? > I tried your debug binary and it works correctly on my Xubuntu. A test you can do is try your binary on Gnome. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
Re: Bug: Overwrites incorrect file
От:
David Jarvis <thangalin@gmail.com>
Дата:
Hi,
Cannot install Gnome, sorry.
Any other way to isolate the cause?
Dave
Re: Bug: Overwrites incorrect file
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 27/06/2010 22:20, David Jarvis a écrit : > Hi, > > Cannot install Gnome, sorry. > > Any other way to isolate the cause? > Sorry, I don't see another one. It works without any issues on 1.10.3+ and 1.12beta2+ on my linux. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com