chrisidefix / transmisson-remote-gui

Automatically exported from code.google.com/p/transmisson-remote-gui
0 stars 0 forks source link

Access violatoin attempting to connect using SSL #544

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Open transgui
2.Attempt to connect
3.

What is the expected output? What do you see instead?
I see an access violation popup.
This shows in the shell:

TApplication.HandleException Access violation
  Stack trace:
  $00007F23203D26F1

What version of the product are you using? On what operating system?
Latest build from trunk using lazarus 0.9.30.4 and fpc-2.6.0

Please provide any additional information below.
This was working fine until I upgraded my debian sid instace today, here is a 
list of packages included in this update and their old/new versions:

acpid:amd64 (2.0.15-2, 2.0.16-1),
acpi-support-base:amd64 (0.140-1, 0.140-3),
aptdaemon:amd64 (0.43+bzr769-1, 0.43+bzr790-1),
aptdaemon-data:amd64 (0.43+bzr769-1, 0.43+bzr790-1),
bash:amd64 (4.2-1, 4.2-2),
cpp-4.6:amd64 (4.6.3-1, 4.6.3-2),
cpp:amd64 (4.6.3-3, 4.6.3-4),
cups-filters:amd64 (1.0.11-1, 1.0.12-1),
cups-pdf:amd64 (2.6.1-5, 2.6.1-6),
dos2unix:amd64 (5.3.3-1, 5.3.3-2),
fonts-opensymbol:amd64 (102.2+LibO3.5.2~rc2-1, 102.2+LibO3.5.2-1),
g++-4.6:amd64 (4.6.3-1, 4.6.3-2),
g++:amd64 (4.6.3-3, 4.6.3-4),
gcc-4.6:amd64 (4.6.3-1, 4.6.3-2),
gcc-4.6-base:amd64 (4.6.3-1, 4.6.3-2),
gcc-4.7-base:amd64 (4.7.0-1, 4.7.0-2),
gcc:amd64 (4.6.3-3, 4.6.3-4),
geoip-database:amd64 (20120308-1, 20120404-1),
gir1.2-atk-1.0:amd64 (2.4.0-1, 2.4.0-2),
gir1.2-vte-2.90:amd64 (0.30.1-4, 0.32.0-2),
gnome-icon-theme:amd64 (3.2.1.2-1, 3.4.0-2),
groff-base:amd64 (1.21-6, 1.21-7),
grub2-common:amd64 (1.99-18, 1.99-21),
grub-common:amd64 (1.99-18, 1.99-21),
grub-pc:amd64 (1.99-18, 1.99-21),
grub-pc-bin:amd64 (1.99-18, 1.99-21),
gvfs:amd64 (1.10.1-3, 1.12.0-1),
gvfs-backends:amd64 (1.10.1-3, 1.12.0-1),
gvfs-common:amd64 (1.10.1-3, 1.12.0-1),
gvfs-daemons:amd64 (1.10.1-3, 1.12.0-1),
gvfs-libs:amd64 (1.10.1-3, 1.12.0-1),
imagemagick:amd64 (6.6.9.7-7, 6.7.4.0-3),
imagemagick-common:amd64 (6.6.9.7-7, 6.7.4.0-3),
inkscape:amd64 (0.48.3.1-1, 0.48.3.1-1+b1),
iso-codes:amd64 (3.33-1, 3.34-1),
kid3:amd64 (2.0.1-3, 2.0.1-4),
lib32gcc1:amd64 (4.7.0-1, 4.7.0-2),
lib32stdc++6:amd64 (4.7.0-1, 4.7.0-2),
libatk1.0-0:amd64 (2.4.0-1, 2.4.0-2),
libatk1.0-data:amd64 (2.4.0-1, 2.4.0-2),
libcanberra0:amd64 (0.28-3, 0.28-4),
libcanberra-gtk3-0:amd64 (0.28-3, 0.28-4),
libcanberra-gtk3-module:amd64 (0.28-3, 0.28-4),
libcln6:amd64 (1.3.2-1.1, 1.3.2-1.2),
libcupsfilters1:amd64 (1.0.11-1, 1.0.12-1),
libdjvulibre21:amd64 (3.5.25.2-1, 3.5.25.2-2),
libdjvulibre-text:amd64 (3.5.25.2-1, 3.5.25.2-2),
libdmtx0a:amd64 (0.7.2-2, 0.7.2-2+b1)
libdrm2:amd64 (2.4.32-1, 2.4.33-1),
libdrm-intel1:amd64 (2.4.32-1, 2.4.33-1),
libdrm-nouveau1a:amd64 (2.4.32-1, 2.4.33-1),
libdrm-radeon1:amd64 (2.4.32-1, 2.4.33-1),
libexpat1:amd64 (2.1.0~beta3-2, 2.1.0-1),
libfribidi0:amd64 (0.19.2-2, 0.19.2-3),
libgcc1:amd64 (4.7.0-1, 4.7.0-2),
libgfortran3:amd64 (4.7.0-1, 4.7.0-2),
libgomp1:amd64 (4.7.0-1, 4.7.0-2),
libhtml-form-perl:amd64 (6.02-1, 6.03-1),
libhtml-parser-perl:amd64 (3.69-1+b1, 3.69-2),
libilmbase6:amd64 (1.0.1-3, 1.0.1-4),
libjavascriptcoregtk-1.0-0:amd64 (1.6.3-2, 1.8.0-2),
liblua5.1-0:amd64 (5.1.4-12, 5.1.5-1),
libmp3lame0:amd64 (3.99.5-0.0, 3.99.5-0.1),
libmpg123-0:amd64 (1.13.7-5, 1.13.7-6),
libmtp9:amd64 (1.1.2-3, 1.1.3-1),
libmtp-common:amd64 (1.1.2-3, 1.1.3-1),
libmtp-runtime:amd64 (1.1.2-3, 1.1.3-1),
libmusicbrainz3-6:amd64 (3.0.2-2, 3.0.2-2.1),
libneon27-gnutls:amd64 (0.29.6-1, 0.29.6-2),
libnm-glib4:amd64 (0.9.4.0-1, 0.9.4.0-3),
libnm-glib-vpn1:amd64 (0.9.4.0-1, 0.9.4.0-3),
libnm-util2:amd64 (0.9.4.0-1, 0.9.4.0-3),
libopenal1:amd64 (1.13-6, 1.14-1),
libopenal-data:amd64 (1.13-6, 1.14-1),
libopenexr6:amd64 (1.6.1-4.1, 1.6.1-5),
libparted0debian1:amd64 (2.3-8, 2.3-9),
libpci3:amd64 (3.1.8-2, 3.1.9-1),
libpcsclite1:amd64 (1.8.3-1, 1.8.3-2),
libpstoedit0c2a:amd64 (3.60-2, 3.60-2+b1),
libpython2.7:amd64 (2.7.3~rc2-1, 2.7.3~rc2-2),
libqrencode3:amd64 (3.2.0-2, 3.3.0-2),
libqtruby4shared2:amd64 (4.7.1-1+b1, 4.7.4-1),
libquadmath0:amd64 (4.7.0-1, 4.7.0-2),
libreoffice-base-core:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-calc:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-common:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-core:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-draw:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-impress:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-java-common:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-math:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-style-galaxy:amd64 (3.5.2~rc2-1, 3.5.2-1),
libreoffice-writer:amd64 (3.5.2~rc2-1, 3.5.2-1),
librsvg2-2:amd64 (2.36.0-2, 2.36.0-5),
librsvg2-common:amd64 (2.36.0-2, 2.36.0-5),
libsane:amd64 (1.0.22-7, 1.0.22-7.1),
libsane-common:amd64 (1.0.22-7, 1.0.22-7.1),
libsepol1:amd64 (2.1.4-2, 2.1.4-3),
libsmokebase3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekdecore4-3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekdeui4-3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekfile3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekhtml3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekio3:amd64 (4.7.1-1, 4.7.4-1),
libsmokeknewstuff2-3:amd64 (4.7.1-1, 4.7.4-1),
libsmokeknewstuff3-3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekparts3:amd64 (4.7.1-1, 4.7.4-1),
libsmokektexteditor3:amd64 (4.7.1-1, 4.7.4-1),
libsmokekutils3:amd64 (4.7.1-1, 4.7.4-1),
libsmokenepomuk3:amd64 (4.7.1-1, 4.7.4-1),
libsmokeplasma3:amd64 (4.7.1-1, 4.7.4-1),
libsmokeqtcore4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtdbus4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtgui4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtnetwork4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtopengl4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtsql4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtsvg4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtwebkit4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokeqtxml4-3:amd64 (4.7.1-1+b1, 4.7.4-1),
libsmokesolid3:amd64 (4.7.1-1, 4.7.4-1),
libssl1.0.0:amd64 (1.0.1-2, 1.0.1-4),
libssl-dev:amd64 (1.0.1-2, 1.0.1-4),
libssl-doc:amd64 (1.0.1-2, 1.0.1-4),
libstdc++6-4.6-dev:amd64 (4.6.3-1, 4.6.3-2),
libstdc++6:amd64 (4.7.0-1, 4.7.0-2),
libsystemd-login0:amd64 (37-1.1, 44-1),
libupower-glib1:amd64 (0.9.15-2, 0.9.15-3),
libusb-0.1-4:amd64 (0.1.12-20, 0.1.12-21),
libusb-1.0-0:amd64 (1.0.9~rc3-3, 1.0.9~rc3-4),
libusb-dev:amd64 (0.1.12-20, 0.1.12-21),
libvirtodbc0:amd64 (6.1.3+dfsg1-2.1, 6.1.3+dfsg1-2.1+b1),
libvte-2.90-9:amd64 (0.30.1-4, 0.32.0-2),
libvte-2.90-common:amd64 (0.30.1-4, 0.32.0-2),
libwavpack1:amd64 (4.60.1-2, 4.60.1-3),
libwebkitgtk-1.0-0:amd64 (1.6.3-2, 1.8.0-2),
libwebkitgtk-1.0-common:amd64 (1.6.3-2, 1.8.0-2),
libx264-122:amd64 (0.122.2184+git5c85e0a-0.0, 0.122.2184+git5c85e0a-0.1),
libxvidcore4:amd64 (1.3.2-0.4, 1.3.2-0.6),
libzbar0:amd64 (0.10+doc-7+b1, 0.10+doc-7+b2),
mobile-broadband-provider-info:amd64 (20120307-1, 20120402-1),
mtp-tools:amd64 (1.1.2-3, 1.1.3-1),
network-manager:amd64 (0.9.4.0-1, 0.9.4.0-3),
obex-data-server:amd64 (0.4.5-1+b2, 0.4.5-1+b3),
openconnect:amd64 (3.02-2, 3.15-2),
openssh-client:amd64 (5.9p1-4, 5.9p1-5),
openssh-server:amd64 (5.9p1-4, 5.9p1-5),
openssl:amd64 (1.0.1-2, 1.0.1-4),
pciutils:amd64 (3.1.8-2, 3.1.9-1),
perlmagick:amd64 (6.6.9.7-7, 6.7.4.0-3),
pstoedit:amd64 (3.60-2, 3.60-2+b1),
python2.7:amd64 (2.7.3~rc2-1, 2.7.3~rc2-2),
python2.7-minimal:amd64 (2.7.3~rc2-1, 2.7.3~rc2-2),
python-aptdaemon:amd64 (0.43+bzr769-1, 0.43+bzr790-1),
python-aptdaemon.gtk3widgets:amd64 (0.43+bzr769-1, 0.43+bzr790-1),
python-gi:amd64 (3.1.0-2, 3.2.0-2),
python-gobject:amd64 (3.1.0-2, 3.2.0-2),
rsyslog:amd64 (5.8.9-1, 5.8.10-1),
ruby-kde4:amd64 (4.7.1-1, 4.7.4-1),
ruby-plasma:amd64 (4.7.1-1, 4.7.4-1),
ruby-qt4:amd64 (4.7.1-1+b1, 4.7.4-1),
ruby-qt4-webkit:amd64 (4.7.1-1+b1, 4.7.4-1),
sane-utils:amd64 (1.0.22-7, 1.0.22-7.1),
synaptic:amd64 (0.75.7, 0.75.9),
ttf-opensymbol:amd64 (102.2+LibO3.5.2~rc2-1, 102.2+LibO3.5.2-1),
udisks:amd64 (1.0.4-4, 1.0.4-5),
uno-libs3:amd64 (3.5.2~rc2-1, 3.5.2-1),
unzip:amd64 (6.0-5, 6.0-6),
upower:amd64 (0.9.15-2, 0.9.15-3),
ure:amd64 (3.5.2~rc2-1, 3.5.2-1),
virtuoso-opensource-6.1-bin:amd64 (6.1.3+dfsg1-2.1, 6.1.3+dfsg1-2.1+b1),
virtuoso-opensource-6.1-common:amd64 (6.1.3+dfsg1-2.1, 6.1.3+dfsg1-2.1+b1),
xserver-xorg-input-synaptics:amd64 (1.5.99.901-1, 1.5.99.902-1),
xserver-xorg-video-cirrus:amd64 (1.3.2-4+b2, 1.4.0-1),
xserver-xorg-video-i128:amd64 (1.3.4-2+b2, 1.3.5-1),
xserver-xorg-video-intel:amd64 (2.18.0-1, 2.18.0-2),
xserver-xorg-video-mach64:amd64 (6.9.0-1+b1, 6.9.1-1),
xserver-xorg-video-radeon:amd64 (6.14.3-2, 6.14.4-1),
xserver-xorg-video-vesa:amd64 (2.3.0-7+b1, 2.3.1-1),
xserver-xorg-video-vmware:amd64 (12.0.1-1, 12.0.2-1),

Original issue reported on code.google.com by varbanse...@gmail.com on 6 Apr 2012 at 1:23

GoogleCodeExporter commented 9 years ago
Please build a debug version of the latest trunk using the following command:
make clean debug

Then provide the error call stack of this debug version.

Original comment by j...@cp-lab.com on 6 Apr 2012 at 8:51

GoogleCodeExporter commented 9 years ago
There is nothing more, the popup says:

Access violation
---
The error details has been copied to the clipboard.
---
$00007F258058D6F1

But all that's in the clipboard is 

Access violation
$00007F258058D6F1

and this is what's in the shell:

TApplication.HandleException Access violation
  Stack trace:
  $00007FB26B8A26F1
Access violation
$00007FB26B8A26F1

Is there something I need to pass to the transgui executable to get it to dump 
a stack trace?
Thanks!

Original comment by varbanse...@gmail.com on 6 Apr 2012 at 12:13

GoogleCodeExporter commented 9 years ago
The error occurs in some external lib, that's why the call stack is not 
available. transgui uses GTK2 widgetset, double check the gtk2 libs.
Also check if other gtk2 apps works.

Original comment by j...@cp-lab.com on 6 Apr 2012 at 12:20

GoogleCodeExporter commented 9 years ago
This works fine: http://www.peazip.org/download-linux-gtk2-portable.html 

What libraries are part of the gtk2 widgetset? Here are the gtk packages 
installed on my system

i A fp-units-gtk-2.6.0              
i A fp-units-gtk2-2.6.0             
i A gir1.2-gtk-3.0                  
i   gtk-theme-switch                
i   gtk2-engines                    
i   gtk2-engines-oxygen             
i   gtk2-engines-qtcurve            
i   ia32-libs-gtk                   
i   kde-config-gtk-style            
i A lazarus-ide-gtk2-0.9.30.2       
i A lcl-gtk2-0.9.30.2               
i   libcanberra-gtk3-0              
i   libcanberra-gtk3-module         
i   libdbusmenu-gtk3-4              
i   libdbusmenu-gtk4                
i   libgpod4-nogtk                  
i   libgtk-3-0                      
i A libgtk-3-bin                    
i A libgtk-3-common                 
i   libgtk2-perl                    
i   libgtk2.0-0                     
i   libgtk2.0-0-dbg                 
i   libgtk2.0-bin                   
i   libgtk2.0-common                
i A libgtk2.0-dev                   
i A libgtkmm-2.4-1c2a               
i A libgtkspell0                    
i   libjavascriptcoregtk-1.0-0      
i   libnm-gtk-common                
i   libnm-gtk0                      
i   libwebkitgtk-1.0-0              
i   libwebkitgtk-1.0-common         
i   libwxgtk2.8-0                   
i A python-aptdaemon.gtk3widgets    
i   python-gtk2                     
i A python-wxgtk2.8                 
i   software-properties-gtk         

Original comment by varbanse...@gmail.com on 6 Apr 2012 at 12:46

GoogleCodeExporter commented 9 years ago
It looks like the issue is from the use ssl option for a connection, if I 
tunnel trough and disable the option I can connect to the transmission instance 
without a problem. 
What libraries are used for the ssl functionality?

Original comment by varbanse...@gmail.com on 6 Apr 2012 at 12:52

GoogleCodeExporter commented 9 years ago
So it seems that libssl-1.0.0 moved the libraries from /usr/lib to 
/usr/lib/x86_64-linux-gnu for a 64 bit debian and that seems to break your 
code. I installed libssl-0.9.8 as well and it works fine now.
libssl-0.9.8 is no longer in sid so you might want to fix that or at least 
handle the exception better?

Original comment by varbanse...@gmail.com on 6 Apr 2012 at 1:53

GoogleCodeExporter commented 9 years ago
Thanks for the investigation.

transgui first tries to load libssl.so.0.9.8 and libcrypto.so.0.9.8 libs. If 
they not found then libssl.so and libcrypto.so are used.

Do you have libssl.so and libcrypto.so symlinks somewhere?

Original comment by j...@cp-lab.com on 6 Apr 2012 at 3:06

GoogleCodeExporter commented 9 years ago
The only one I found is in /usr/lib/x86_64-linux-gnu/
It doesn't look like libssl-0.9.8 setup any generic libssl.so links.

Original comment by varbanse...@gmail.com on 6 Apr 2012 at 3:12

GoogleCodeExporter commented 9 years ago
transgui works with any openssl version. Do you have libssl.so and libcrypto.so 
symlinks by default with openssl 1.0?

Original comment by j...@cp-lab.com on 6 Apr 2012 at 3:21

GoogleCodeExporter commented 9 years ago
Yes, and here is the output from ldconfig showing the libssl.so and 
libcrypto.so references are correct and exist (this is with libssl-0.9.8 
removed)

ldconfig -p | grep libssl
        libssl3.so.1d (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl3.so.1d
        libssl3.so.1d (libc6) => /usr/lib32/libssl3.so.1d
        libssl3.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl3.so
        libssl3.so (libc6) => /usr/lib32/libssl3.so
        libssl.so.1.0.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
        libssl.so.0.9.8 (libc6, hwcap: 0x0008000000008000) => /usr/lib32/i686/cmov/libssl.so.0.9.8
        libssl.so.0.9.8 (libc6, hwcap: 0x0004000000000000) => /usr/lib32/i586/libssl.so.0.9.8
        libssl.so.0.9.8 (libc6, hwcap: 0x0002000000000000) => /usr/lib32/i486/libssl.so.0.9.8
        libssl.so.0.9.8 (libc6) => /usr/lib32/libssl.so.0.9.8
        libssl.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl.so

ldconfig -p | grep libcrypto
        libcrypto.so.1.0.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
        libcrypto.so.0.9.8 (libc6, hwcap: 0x0008000000008000) => /usr/lib32/i686/cmov/libcrypto.so.0.9.8
        libcrypto.so.0.9.8 (libc6, hwcap: 0x0004000000000000) => /usr/lib32/i586/libcrypto.so.0.9.8
        libcrypto.so.0.9.8 (libc6, hwcap: 0x0002000000000000) => /usr/lib32/i486/libcrypto.so.0.9.8
        libcrypto.so.0.9.8 (libc6) => /usr/lib32/libcrypto.so.0.9.8
        libcrypto.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcrypto.so
        libcrypto++.so.9 (libc6,x86-64) => /usr/lib/libcrypto++.so.9

I wonder if the libssl.so.0.9.8 link to the 32bit libraries is causing the 
problem? Does your code check for arch compatibility?

Original comment by varbanse...@gmail.com on 6 Apr 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Fixed in r740. Please test.

Original comment by j...@cp-lab.com on 7 Apr 2012 at 1:34

GoogleCodeExporter commented 9 years ago
It works now, thanks!
Looking at the code you will have this issue again later when the libssl 
version changes. 
Some google search results suggest that the 32bit libssl-0.9.8 provided by the 
ia32-libs package could be the cause of the error. Apparently the LoadLibrary 
call would either throw the Access Violation error when attempting to load the 
32bit library or when you try to use it. In either case some error handling 
around the LoadLibrary call and when you try to use it might be a more 
permanent solution.
Thanks again for your work, it's a very helpful tool!

Original comment by varbanse...@gmail.com on 7 Apr 2012 at 2:01

GoogleCodeExporter commented 9 years ago
The error has been caused by passing NULL handle to the FreeLibrary(). It is 
not related to 32-bit libs. Now the code has been changed to avoid AV error. 
The proper error message about missing OpenSSL libs will be displayed.

Original comment by j...@cp-lab.com on 7 Apr 2012 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by j...@cp-lab.com on 7 Apr 2012 at 2:39