Alaska Software Inc. - 'Com Surrogate' Windows process interference
Username: Password:
AuthorTopic: 'Com Surrogate' Windows process interference
Otto Trapp'Com Surrogate' Windows process interference
on Tue, 17 Jan 2017 10:05:01 +0100
Hello,

I found a strange behavior regarding my project: it seems that my 
executable interferes with Windows processes that read meta information 
from its file (eg. icon, version info, etc.) if it is put into a shared 
folder on the local network (no matter if it is a Samba share or a 
Windows shared folder).

For me the easiest way to reproduce this behaviour is:
- I build my project in the command line with Xbase 2.0 (pbuild).
- I copy the executable to a shared folder.
- I create a shortcut on my local desktop pointing to the executable.
   (It takes a longer time..)
- I right click on the shortcut and from the appearing context menu I 
choose 'Properties' -> For me half a minute elapses until the Properties 
dialog window appears. In the meantime I can observe in Task Manager 
that my 100Mbit/s bandwith local network is totally saturated with 
traffic produced by the process 'Com Surrogate'. This process is 
responsible for showing thumbnails.
- Additionally, if I open this shared folder in Windows Explorer and 
right click the .exe the same saturation happens, now the process that 
creates the traffic is Windows Expolorer.
- The same is with Total Commander, the file manager I use.

Additional info:
- My .exe is 64Mb
- There is NO issue if the very same codebase is built with Xbase++ 1.9 
SL1, only if it built with 2.0 .
- Nothing changes if I remove parts (all the 3rd libs for example) of 
the project and a somewhat smaller executable is created (60Mb).
- I can reproduce this with my .exe on any computer running Windows 7 
and Windows 10 OS. (And as such all my customers can, some of them 
reported this)
- The exe runs fine if it is launched.

I turned to Alaska Software Support, they has not heard of this problem. 
Before I send my whole project to them I wanted to ask for info here.

Has anyone of you come accross this problem? Can you reproduce this with 
your own project built with 2.0?

Thanks for any help!

Best Regards,
Otto
Otto TrappRe: 'Com Surrogate' Windows process interference
on Tue, 21 Feb 2017 15:39:09 +0100
Hello,

My .exe also caused problems when it is launched from a network share: 
it uses the whole bandwith and generates 4-6 times more network traffic 
compared to its version compiled with Xbase++ 1.9.

After contacting support and providing some additional info Mr. Herdt 
pointed out that they changed the default behaviour of the linker in 
Xbase++ 2.0. that affects the loading 'method' of Xbase++ created exe 
and dll files by Windows OS if they are launched from a network share.

See the PDR for further explanation and use the /noswap linker option to 
change the behaviour back to pre 2.0 state. (Still, their recommended 
solution is to deploy an executable to a local drive.)

http://www.alaska-software.com/scripts/waa001.dll?WAA_PACKAGE=PUBLICDTS&WAA_FORM=DISPLAYPDR&PDRID=6858

Thanks goes to Alaska for their help!

Regards
Otto