Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my compiled windows wsgate.exe will not run properly #109

Closed
tmakaro opened this issue Sep 13, 2015 · 7 comments

Comments

@tmakaro
Copy link

@tmakaro tmakaro commented Sep 13, 2015

So I have a working version of FreeRDP-WebConnect using the MSI installer for windows and it works great. When I replace the wsgate.exe with my compiled version, it just hangs after I press the connect button.

Hopefully you will see something that I have missed.

The following is the debug statements for my version and then the debug statements for the working version from the msi:

From my wsgate.exe

wsgate v1.2.0.Unknown starting
Listening on 0.0.0.0:4430
Listening on 0.0.0.0:8000
Request from 127.0.0.1: / => 304 Not modified
Request from 127.0.0.1: /css/style.css => 304 Not modified
Request from 127.0.0.1: /css/style.css => 304 Not modifiedRequest from 127.0.0.1: /css/vkb.css => 304 Not modified
Request from 127.0.0.1: /js/modernizr.js => 304 Not modified
Request from Reqest 0 0.1: 12/.0.s.mpletab:js/j=>/30ga
Request from Reqest 0 0.1: 12/.0.s.mpletab:js/j=>/30ga 
Request from 127.0.0.1: /js/mootools.js => 304 Not modified
Request from 127.0.0.1: /js/vkb.js => 304 Not modified
Request from 127.0.0.1: /images/loading.gif => 304 Not modified
Request from 127.0.0.1: /js/vkbl-en_US.json => 304 Not modified
Request from 127.0.0.1: /js/vkbl-de_DE.json => 304 Not modified
Request from 127.0.0.1: /empty_on_purpose => 304 Not modified
RDP::ContextNew
Created RDP client thread
Request FROM: 127.0.0.1 replied with 101
GOT WS CONNECT

From the wsgate.exe that came with the msi:

wsgate v1.2.0.330 starting
Listening on 0.0.0.0:4430
Listening on 0.0.0.0:8000
Request from 127.0.0.1: / => 304 Not modified
Request from 127.0.0.1: /css/style.css => 304 Not modified
Request from 127.0.0.1: /css/style.css => 304 Not modifiedRequest from 127.0.0.1: /css/vkb.css => 304 Not modified
Request from 127.0.0.1: /js/modernizr.js => 304 Not modified
Request from 127.0.0.1: /js/mootools.js => 304 Not modified
Request from 127.0.0.1: /js/simpletabs.js => 304 Not modified
Request from 127.0.0.1: /js/wsgate.js => 304 Not modified
Requ
Requ
Request from 127.0.0.1: /js/vkbl-en_US.json => 304 Not modified
Request from 127.0.0.1: /js/vkbl-de_DE.json => 304 Not modified
Request from 127.0.0.1: /empty_on_purpose => 304 Not modified
RDP Host:               '192.168.3.4'
RDP Pcb:               ''
RDP Port:               '3389'
RDP User:               'administrator'
RDP Desktop size:       1870x895
RDP Performance:        0
RDP No full windowdrag: 1
RDP No menu animation:  0
RDP No theming:         0
RDP Disable TLS:        0
RDP Disable NLA:        0
RDP NTLM auth:          0
RDP::ContextNew
Created RDP client thread
Update.cpp:43
Request FROM: 127.0.0.1
Primary.cpp:42
To URI: /wsgate?host=192.168.3.4&port=3389&pcb=&user=administrator&pass=********=0&fntlm=0&nowallp=0&nowdrag=1&nomani=0&notheme=0&nonla=0&notls=0&dtsize=1870x895 => 101
GOT WS CONNECT
Request FROM: 127.0.0.1
To URI: /cur/00A2E470/1 => 200 OK
@tmakaro tmakaro changed the title Windows wsgate.exe will not run properly my compiled windows wsgate.exe will not run properly Sep 13, 2015
@c64cosmin

This comment has been minimized.

Copy link
Contributor

@c64cosmin c64cosmin commented Sep 15, 2015

It seems that you installed the stable version of Web-connect. What is upstream is ahead of the stable version. You should try the beta version.

@tmakaro

This comment has been minimized.

Copy link
Author

@tmakaro tmakaro commented Sep 16, 2015

So I checked out FreeRDP and FreeRDP-WebConnect and rebuilt them both from scratch. I am getting the following messages in the event log:

RDP::ContextNew
Created RDP client thread
Request FROM: 127.0.0.1 replied with 101
GOT WS CONNECT

followed by the next event log:

Faulting application name: wsgate.exe, version: 0.0.0.0, time stamp: 0x55f8a003
Faulting module name: freerdp.dll, version: 1.2.5.0, time stamp: 0x55f84d30
Exception code: 0xc0000005
Fault offset: 0x000832fe
Faulting process id: 0x1dc0
Faulting application start time: 0x01d0f01247944fa3
Faulting application path: C:\FreeRDP-WebConnect\test\binaries\wsgate.exe
Faulting module path: C:\FreeRDP-WebConnect\test\binaries\freerdp.dll
Report Id: 9e2866cc-df87-48a0-880d-67ecf4eb18d2
Faulting package full name: 
Faulting package-relative application ID: 

Running wFreeRDP.exe works fine. Any idea what might be wrong? Is there any specific tag I should be building against?

@c64cosmin

This comment has been minimized.

Copy link
Contributor

@c64cosmin c64cosmin commented Sep 16, 2015

@tmakaro Can you tell me what you've done, so I can reproduce the error?

@tmakaro

This comment has been minimized.

Copy link
Author

@tmakaro tmakaro commented Sep 16, 2015

@c64cosmin Please look at the errors I got while compiling FreeRDP-WebConnect at the bottom of this comment. Perhaps my solution of casting variables is what is causing this problem. Also, why would I have to use cast in the first place?

My compilation process

Tools used

cmake-gui (cmake-3.3.1-win32-x86.exe)
Windows 10 64bit
Visual Studio 12 2013

Here are the libraries that I didn't compile:

OpenSSL OpenSSL 1.0.2d 9 Jul 2015 downloaded from https://slproweb.com/download/Win32OpenSSL-1_0_2d.exe
ActivePerl 5.20 http://www.activestate.com/activeperl/downloads/thank-you?dl=http://downloads.activestate.com/ActivePerl/releases/5.20.2.2002/ActivePerl-5.20.2.2002-MSWin32-x86-64int-299195.msi
Boost 1_58 downloaded from http://sourceforge.net/projects/boost/files/boost-binaries/1.58.0/boost_1_58_0-msvc-12.0-32.exe/download
PThreads w32 2.9.1 downloaded from http://sourceforge.net/projects/pthreads4w/files/pthreads-w32-2-9-1-release.zip/download (I used the pre-built.2 folder)

Here are the libraries that I compiled: (I Ran cmake-gui to generate a VS2013 solution file)

Zlib 1.2.8 downloaded from http://zlib.net/zlib128.zip
libpng1618 downloaded from http://sourceforge.net/projects/libpng/files/libpng16/1.6.18/lpng1618.zip/download

From git: (Use cmake-gui for all except casablanca which already has a Visual studio solution file)

casablanca from https://git01.codeplex.com/casablanca (checkout 2.0.1 tag). It also, uses nuget packages for boost 1_58
EHS from https://github.com/cloudbase/EHS.git (use master branch)
FreeRDP from git://github.com/FreeRDP/FreeRDP.git (use master branch)
FreeRDP-WebConnect from https://github.com/FreeRDP/FreeRDP-WebConnect.git (use master branch)

Other:
FreeRDP compiles and runs fine.
I had to modify FindCasaBlanca.cmake from:

    set(MSVC_SUFFIX "120_2_0.lib")
to
    set(MSVC_SUFFIX "120d_2_0.lib")

Errors during the compile of FreeRDP-WebConnect: I had to add about 50 casts for example in Update.cpp:

void Update::Register(freerdp *rdp) {
    log::debug << __PRETTY_FUNCTION__ << endl;
    rdp->update->BeginPaint = (pBeginPaint)cbBeginPaint;
    rdp->update->EndPaint = (pEndPaint)cbEndPaint;
    rdp->update->SetBounds = (pSetBounds)cbSetBounds;
    rdp->update->Synchronize = (pSynchronize)cbSynchronize;
    rdp->update->DesktopResize = (pDesktopResize)cbDesktopResize;
    rdp->update->BitmapUpdate = (pBitmapUpdate)cbBitmapUpdate;
    rdp->update->Palette = (pPalette)cbPalette;
    rdp->update->PlaySound = (pPlaySound)cbPlaySound;
    rdp->update->SurfaceBits = (pSurfaceBits)cbSurfaceBits;

    rdp->update->RefreshRect = (pRefreshRect)cbRefreshRect;
    rdp->update->SuppressOutput = (pSuppressOutput)cbSuppressOutput;
}

I may have fixed the problem incorrectly. Those above casts were originally not there. Looking at the method signatures. Example

From FreeRDP update.h:
    typedef BOOL (*pBeginPaint)(rdpContext* context);

    From FreeRDP-WebConnect update.hpp:
    static void cbBeginPaint(rdpContext* context);
@c64cosmin

This comment has been minimized.

Copy link
Contributor

@c64cosmin c64cosmin commented Sep 16, 2015

@tmakaro The casts are just typedefs to some function pointers, they shouldn't be any problem, but it's good you've done it, no problem there. I think the problem might be because you are using FreeRDP's master branch. Try this one : https://github.com/FreeRDP/FreeRDP/tree/stable-1.1

@tmakaro

This comment has been minimized.

Copy link
Author

@tmakaro tmakaro commented Sep 16, 2015

@c64cosmin Thanks. I'll give it a try tonight when I am off work.

@tmakaro

This comment has been minimized.

Copy link
Author

@tmakaro tmakaro commented Sep 17, 2015

@c64cosmin That worked! WooHoo!

@tmakaro tmakaro closed this Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.