help: Exception: CStringConverter::WtoA()

sundaywork
edited March 2011 in Photon Server
Hi,

I tried to launch Photon as application using PhotonControl.exe on a WindowsXP, it didn't succeed to start. The icon was lighted for two seconds and went gray again. The log is as below:

3628: 15:25:41.437 - ---
3628: 15:25:41.437 - WARNING: Photon has been built to operate on an operating system earlier than Windows Vista.
3628: 15:25:41.437 - WARNING: Performance will not be as good as when built for Windows Vista or later.
3628: 15:25:41.437 - Server Starting...
3628: 15:25:41.437 - CService::OnException() - Exception: CStringConverter::WtoA() - The data area passed to a system call is too small.
3628: 15:25:41.437 - Server shutting down...
3628: 15:25:41.437 - Shutting down socket servers...
3628: 15:25:41.437 - Destroying ENet thread pool
3628: 15:25:41.437 - Destroying TCP inactivity timer
3628: 15:25:41.437 - Destroying Business logic thread pool
3628: 15:25:41.437 - Destroying servers
3628: 15:25:41.437 - Destroying ENet host
3628: 15:25:41.437 - Destroying CLR dispatcher
3628: 15:25:41.437 - Destroying CLR applications
3628: 15:25:41.437 - Destroying I/O thread pool
3628: 15:25:41.437 - Destroying ENet buffer allocator
3628: 15:25:41.437 - Destroying TCP buffer allocator
3628: 15:25:41.437 - Destroying TCP socket allocator
3628: 15:25:41.437 - Destroying ENet socket allocator
3628: 15:25:41.437 - Destroying performance counters
3628: 15:25:41.437 - Shutdown complete...

I have .Net framework 3.5 sp1. I've put the license file downloaded into the same directory as PhotonControl.exe. I am running in ExitGames-Photon-Server-SDK_v2-4-7\deploy\bin_Win32_xp.
Looking forward to any help. Thanks.

Comments

  • It looks like some code conflicts with TortoiseSVN. When the deploy directory was moved outside the directory under the control of TortoiseSVN, the server is running. I can't understand why.

    New problem arise:
    When I use the original 30DayTemporary.license, the server is ok.
    Then I delete 30DayTemporary.license and copy [email protected]e in, the server will start for about 10 seconds, and die again. Here are the logs:

    PhotonCLR.log
    2011-03-04 16:30:15,609 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created
    2011-03-04 16:30:15,656 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created
    2011-03-04 16:30:15,656 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - InitializeNewDomain PhotonSocketServer.exe
    2011-03-04 16:30:15,671 [ 1] INFO eUZGPfegjOmbduaYNZ.ebbeTiK9tAKfAZcNme - ### PhotonHostRuntime.Licensing: Getting license information...
    2011-03-04 16:30:17,515 [ 1] INFO eUZGPfegjOmbduaYNZ.ebbeTiK9tAKfAZcNme - LICENSE: Expiration: never; floating license: yes; max connections: 100; valid IPs: any
    2011-03-04 16:30:17,562 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain Lite , Lite
    2011-03-04 16:30:17,562 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy
    2011-03-04 16:30:17,562 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Lite\Lite;Lite\Lite\bin;bin_Win32_xp;Shared
    2011-03-04 16:30:17,562 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy\Lite\Lite\bin\Lite.dll.config
    2011-03-04 16:30:19,906 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain LiteLobby , LiteLobby
    2011-03-04 16:30:19,906 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy
    2011-03-04 16:30:19,906 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = LiteLobby\LiteLobby;LiteLobby\LiteLobby\bin;bin_Win32_xp;Shared
    2011-03-04 16:30:19,906 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy\LiteLobby\LiteLobby\bin\LiteLobby.dll.config
    2011-03-04 16:30:22,218 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain MmoDemo , Photon.MmoDemo.Server
    2011-03-04 16:30:22,234 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy
    2011-03-04 16:30:22,234 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Mmo\Photon.MmoDemo.Server;Mmo\Photon.MmoDemo.Server\bin;bin_Win32_xp;Shared
    2011-03-04 16:30:22,234 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy\Mmo\Photon.MmoDemo.Server\bin\Photon.MmoDemo.Server.dll.config
    2011-03-04 16:30:26,203 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain CounterPublisher , CounterPublisher
    2011-03-04 16:30:26,203 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy
    2011-03-04 16:30:26,203 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = CounterPublisher;CounterPublisher\bin;bin_Win32_xp;Shared
    2011-03-04 16:30:26,203 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy\CounterPublisher\bin\CounterPublisher.dll.config
    2011-03-04 16:30:32,406 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain Policy , Policy.Application
    2011-03-04 16:30:32,421 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy
    2011-03-04 16:30:32,421 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Policy\Policy.Application;Policy\Policy.Application\bin;bin_Win32_xp;Shared
    2011-03-04 16:30:32,421 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy\Policy\Policy.Application\bin\Policy.Application.dll.config
    2011-03-04 16:30:38,468 [10] ERROR eUZGPfegjOmbduaYNZ.ebbeTiK9tAKfAZcNme - Did not reach license monitor.
    2011-03-04 16:30:38,468 [10] ERROR eUZGPfegjOmbduaYNZ.ebbeTiK9tAKfAZcNme - On startup, license monitor must be available / reachable. Going to Shutdown.


    Photon-Instance1-20110304.log
    2560: 16:30:13.046 - ---
    2560: 16:30:13.046 - WARNING: Photon has been built to operate on an operating system earlier than Windows Vista.
    2560: 16:30:13.046 - WARNING: Performance will not be as good as when built for Windows Vista or later.
    2560: 16:30:13.046 - Server Starting...
    2560: 16:30:13.046 - Config File: C:\temp5\ExitGames-Photon-Server-SDK_v2-4-7\deploy\bin_Win32_xp\PhotonServer.config
    2560: 16:30:13.046 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them.
    2560: 16:30:13.187 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=02C301B61B060C4D
    2560: 16:30:13.187 - About to load CLR - versions available:
    2560: 16:30:13.203 - v2.0.50727
    2560: 16:30:13.203 - v4.0.30319
    2560: 16:30:13.203 - No preference in configuration file, will load latest.
    2560: 16:30:13.203 - About to load version: "v4.0.30319"
    2560: 16:30:13.203 - Loaded version: "v4.0.30319"
    2560: 16:30:15.671 - Photon host runtime loaded
    2560: 16:30:17.515 - License is valid.
    2560: 16:30:17.515 - Licensed for 100 concurrent connections.
    2560: 16:30:17.515 - Max Reliable Data In Transit (awaiting ACKs) per peer : 16384 bytes
    2560: 16:30:17.515 - Per peer bandwidth limit
    2560: 16:30:17.531 - Transmit Rate Limit: 128 KB/Sec
    2560: 16:30:17.531 - Limit period: 250ms
    2560: 16:30:17.531 - Limit per period: 32768 bytes
    2560: 16:30:17.531 - Max queued data for transmission per peer: 65536 bytes
    2560: 16:30:17.531 - Minimum retransmit timeout: 200
    2560: 16:30:17.531 - Minimum ENet timeout: 5000ms
    2560: 16:30:17.531 - Maximum ENet timeout: 30000ms
    2560: 16:30:17.531 - ENetHost: Using Timer Wheel
    2560: 16:30:17.531 - About to load application: Lite from Lite
    2560: 16:30:17.531 - Auto restart is enabled for application
    2560: 16:30:17.531 - Application will restart 10000ms after the last change detected
    2560: 16:30:17.531 - Application will restart if files matching the following are changed: "dll;config"
    2560: 16:30:17.531 - Application will NOT restart if files matching the following are changed: "log4net.config"
    2560: 16:30:19.906 - Application: "Lite" started in app domain: 2
    2560: 16:30:19.906 - About to load application: LiteLobby from LiteLobby
    2560: 16:30:19.906 - Auto restart is enabled for application
    2560: 16:30:19.906 - Application will restart 10000ms after the last change detected
    2560: 16:30:19.906 - Application will restart if files matching the following are changed: "dll;config"
    2560: 16:30:19.906 - Application will NOT restart if files matching the following are changed: "log4net.config"
    2560: 16:30:22.218 - Application: "LiteLobby" started in app domain: 3
    2560: 16:30:22.218 - About to load application: MmoDemo from Photon.MmoDemo.Server
    2560: 16:30:22.218 - Auto restart is enabled for application
    2560: 16:30:22.218 - Application will restart 10000ms after the last change detected
    2560: 16:30:22.218 - Application will restart if files matching the following are changed: "dll;config"
    2560: 16:30:22.218 - Application will NOT restart if files matching the following are changed: "log4net.config"
    2560: 16:30:26.203 - Application: "MmoDemo" started in app domain: 4
    2560: 16:30:26.203 - About to load application: CounterPublisher from CounterPublisher
    2560: 16:30:26.203 - Auto restart is enabled for application
    2560: 16:30:26.203 - Application will restart 10000ms after the last change detected
    2560: 16:30:26.203 - Application will restart if files matching the following are changed: "dll;config"
    2560: 16:30:26.203 - Application will NOT restart if files matching the following are changed: "log4net.config"
    2560: 16:30:32.406 - Application: "CounterPublisher" started in app domain: 5
    2560: 16:30:32.406 - About to load application: Policy from Policy.Application
    2560: 16:30:34.859 - Application: "Policy" started in app domain: 6
    2560: 16:30:34.875 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150
    2560: 16:30:34.875 - Nagle disabled
    2560: 16:30:34.875 - TCP inactivity timeout: 5000ms
    2560: 16:30:34.875 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
    2560: 16:30:34.875 - Adding UDP listener on :192.168.1.101: 5055 with a listen backlog of: 500
    2560: 16:30:34.875 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
    2560: 16:30:34.875 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
    2560: 16:30:34.875 - TCP inactivity timeout: 5000ms
    2560: 16:30:34.875 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
    2560: 16:30:34.875 - TCP inactivity timeout: 5000ms
    2560: 16:30:34.968 - Service is running...
    132: 16:30:38.500 - Shutdown request from PhotonHostRuntime: On startup, license monitor must be available / reachable.
    2560: 16:30:38.515 - Server shutting down...
    2560: 16:30:38.531 - Shutting down ENet host...
    2560: 16:30:38.531 - Disconnecting all peers...
    2560: 16:30:38.531 - Shutting down socket servers...
    2560: 16:30:38.531 - Shutting down ENet thread pool...
    132: 16:30:38.531 - Shutdown requested.
    2560: 16:30:38.531 - Shutting down TCP inactivity timers...
    2560: 16:30:38.531 - Shutting down business logic thread pool...
    2560: 16:30:38.546 - Shutting down I/O thread pool...
    2560: 16:30:38.546 - Flushing ENET buffer allocator...
    2560: 16:30:38.546 - Flushing TCP buffer allocator...
    2560: 16:30:38.546 - Flushing stream socket allocator...
    2560: 16:30:38.546 - Flushing datagram socket allocator...
    2560: 16:30:38.546 - Destroying ENet thread pool
    2560: 16:30:38.546 - Destroying TCP inactivity timer
    2560: 16:30:38.546 - Destroying Business logic thread pool
    2560: 16:30:38.546 - Destroying servers
    2560: 16:30:38.546 - Destroying ENet host
    2560: 16:30:38.546 - Destroying CLR dispatcher
    2560: 16:30:38.546 - Destroying CLR applications
    3276: 16:30:38.578 - CManagedHost::OnDomainUnload() - 5
    2560: 16:30:38.609 - CManagedHost::OnCLRDisabled()
    2560: 16:30:38.718 - Destroying I/O thread pool
    2560: 16:30:38.718 - Destroying ENet buffer allocator
    2560: 16:30:38.718 - Destroying TCP buffer allocator
    2560: 16:30:38.718 - Destroying TCP socket allocator
    2560: 16:30:38.718 - Destroying ENet socket allocator
    2560: 16:30:38.718 - Destroying performance counters
    2560: 16:30:38.718 - Shutdown complete...
  • Used [email protected] ... ccu.license and the same problem. Cannot connect to the license server? How can I test it? Thanks.
  • The personal free licenses are "Floating Licenses" by default and need to reach our License Monitor on startup and while running. A https connection is required.

    Please make sure the machine you're running Photon on is able to reach photonmonitor.appspot.com (via https).

    Edit: One question about your initial post: Did your original path to Photon include any multi-byte unicode characters? Maybe you can paste the path here?
  • This site is not reachable from me. Neither ping accessable. The tracert is as below:
    C:\>tracert photonmonitor.appspot.com

    Tracing route to photonmonitor.appspot.com [8.7.198.45]
    over a maximum of 30 hops:

    1 <1 ms <1 ms <1 ms 192.168.1.1
    2 35 ms 42 ms 38 ms 222.95.172.1
    3 30 ms 29 ms 29 ms 218.2.251.45
    4 37 ms 33 ms 33 ms 221.231.152.53
    5 37 ms 35 ms 37 ms 202.97.39.185
    6 39 ms 37 ms 40 ms 202.97.33.30
    7 34 ms 37 ms 37 ms 202.97.33.50
    8 296 ms 306 ms 306 ms 202.97.51.74
    9 251 ms * 269 ms te-8-1.car4.SanJose1.Level3.net [4.71.114.101]
    10 285 ms 306 ms 223 ms vlan70.csw2.SanJose1.Level3.net [4.69.152.126]
    11 302 ms 229 ms * ae-72-72.ebr2.SanJose1.Level3.net [4.69.134.213]

    12 239 ms 235 ms 233 ms ae-3-3.ebr1.Denver1.Level3.net [4.69.132.58]
    13 * ge-10-0.hsa3.Denver1.Level3.net [4.69.147.71] reports: Destinatio
    n host unreachable.

    Trace complete.

    The original path is like C:\work\项目\20110101\Photon\RUN\Photon
    I suspected the unicode, so I created a new directory which contains such unicode characters, it works fine. The server does run with the original license file coming with it. Then when I copied them into C:\work which is a TortoiseSVN directory, if failed again, with the same exception log.

    I did a lot more experiments. Path like C:\bin_Win32_xp\deploya啊\bin_Win32_xp makes the server run, but C:\temp3\项目\ExitGames-Photon-Server-SDK_v2-4-7\deploy\bin_Win32_xp will make it fail. I can't figure out why.
  • I got it. It seems a bit unbelievable. When there is any directory starts with a unicode character, it will run. (such as abc测试) When any directory in the path starts with unicode, such as 测试, it will fail. Each time I am running using freshly extracted executables. Hope this will give you a clue. Thanks.
  • Boris
    Boris ✭✭
    Your tracert seems to stop somewhere in the US (so you are not in China, right?) - maybe that was just a temporary problem?

    I just sent you binaries that should fix the unicode path problem.
  • I downloaded that directory. It works now. Thanks a lot!
    Sadly, the license problem looks like appspot.com, which run by Google, is blocked by China. I will try to use the 30 days trail license first.
    Thanks again for the quick response.
  • Boris
    Boris ✭✭
    Ok.. the tracert you pasted didn't look like China.. we can send you a license that does not require the license monitor -please send a request to [email protected]
  • Got it. Thanks!
  • Oh,shit! GFW!