Opened 5 years ago

Closed 5 years ago

#758 closed Bug / Defect (fixed)

Crash application openvpn-gui.exe

Reported by: Micka.c Owned by: Selva Nair
Priority: major Milestone: beta 2.4
Component: Generic / unclassified Version: OpenVPN 2.4_alpha2 (Community Ed)
Severity: Patch Queue: New / awaiting ACK Keywords:
Cc: Samuli Seppänen, Selva Nair


OpenVPN 2.4_alpha2 -- released on 2016.10.20


Install On Windows 7 32 bits with admin access--> OK
Service : OpenVpnService? on Automatic and start
Execute OpenVPN GUI on account user with no admin access, clic connection --> Error message, crash application

Impossible to launch application

Attachments (1)

2016-11-15_083755.jpg (119.7 KB) - added by micka.c 5 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 5 years ago by Gert Döring

Cc: Samuli Seppänen snair added

comment:2 Changed 5 years ago by Samuli Seppänen

Component: OpenVPN ConnectGeneric / unclassified
Priority: blockermajor

OpenVPNService is dummy in the sense that it launches all .ovpn files under <installdir>\OpenVPN\config. It might be useful to be able to launch some system-wide OpenVPN connections via OpenVPNService, and connect to additional ones manually using OpenVPN-GUI.

Does OpenVPN-GUI crash only if you try to launch a connection that is already running, or if you launch any connection?

Last edited 5 years ago by Samuli Seppänen (previous) (diff)

comment:3 Changed 5 years ago by Gert Döring

#760 is a duplicate of this, and has a bit more information (albeit in french only)

comment:4 Changed 5 years ago by Selva Nair

Cc: Selva Nair added; snair removed

comment:5 in reply to:  2 Changed 5 years ago by micka.c

I tried with OpenVPNService automatic starting and manual, The problem is the same, application crash

This problem is only with a no admin user

comment:6 Changed 5 years ago by micka.c

If I'm with windows 7 64 bits, there is no problem. It's only windows 7 32 bits there is problem

comment:7 Changed 5 years ago by Samuli Seppänen

@micka_c: so what happens on Windows 7 64-bit exactly? OpenVPN-GUI does not crash, but does it still try to start the OpenVPN connection, or just skip it?

comment:8 Changed 5 years ago by micka.c

With Wds 7 64-bit, OpenVPN-GUI does not crash, I try OpenVPNService automatic start and connection vpn is OK (with no admin user)

comment:9 Changed 5 years ago by Samuli Seppänen

What happens when you click on "Connect" in OpenVPN-GUI on Windows 7 64-bit? Does the usual connection log window pop up?

comment:10 Changed 5 years ago by micka.c

With wds 7 64-bit, the connection log window pop up appears and after I can type my login and password then the vpn connection is ok

comment:11 Changed 5 years ago by Samuli Seppänen

micka.c: interesting. The fact that OpenVPNService is set to "Automatic" means that the OpenVPN connection you're launching via OpenVPN-GUI should actually be running. Could you launch "Windows Powershell" as an administrator and run the following commands:

Stop-Service OpenVPNService
Start-Service OpenVPNService
Get-WmiObject Win32_Process -Filter "Name = 'openvpn.exe'"|Select Commandline

That should produce a list of running openvpn processes alongside their command-line options, right after OpenVPNService has started.

Then try to (re)launch one of those running connections using OpenVPN-GUI. I think OpenVPN-GUI should fail.

comment:12 Changed 5 years ago by Selva Nair

The GUI should not crash in any case, so looks like we have a bug which shows up only in the 32 bit version. As micka_c reported that running the GUI as admin works fine, the bug is likely in the GUI-iservice interaction -- note that when run as admin, iservice is not used. I'm trying to setup a 32 bit system to reproduce the crash.

comment:13 Changed 5 years ago by Selva Nair

Owner: set to Selva Nair
Status: newaccepted

@micka.c: Please test the GUI executable provided here. Just copy it to the desktop and run without admin rights. No special installation required.

Previous crashes might have left behind stale openvpn processes, so first kill any running openvpn.exe processes. The service OpenVPNServiceInteractive should be running and OpenVPNService stopped. This is the default setup after a new install.

Technically, I think the crash is caused by a missing __stdcall: the asynchronous read completion routine HandleServiceIO() is not declared as WINAPI or __stdcall. This causes a stack corruption in 32 bit windows. The 64 bit version is not affected by this.

Changed 5 years ago by micka.c

Attachment: 2016-11-15_083755.jpg added

comment:14 Changed 5 years ago by micka.c

I try the GUI executable, I have got a message (see attachement) but after validate the message, vpn connection is ok

comment:15 Changed 5 years ago by micka.c

I think error is link with _up.bat (I created this batch on config directory) The batch is ipconfig /flushdns

comment:16 Changed 5 years ago by Selva Nair

micka.c: Thanks for testing. When the GUI is running as user (not admin), scripts requiring admin rights will not work. To restart dns client service and flush the cache, add the 'register-dns' option to the config.

comment:17 Changed 5 years ago by Selva Nair

Severity: Not set (if unsure, select this one)Patch Queue: New / awaiting ACK

A fix is in PR 95

comment:18 Changed 5 years ago by Samuli Seppänen

The fix has been merged and will be included in subsequent snapshot installers, as well as in OpenVPN 2.4_beta1 Windows installers.

comment:19 Changed 5 years ago by Samuli Seppänen

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.