Improbable Icon

Unreal Engine 4 build error for RPGDemo (4.14 + 4.15)

unreal

#1

Hello everyone l an very new here I think my second day trying to learn the robes. I have been playing with Unreal Engine 4 for sometime now before i heard about his OS. I wanted to see what it was all about and how it may help my team’s project.

The issue is have have yet to successfully build or open either Unreal Demos. I already had the clean source to both 4.14 + 4.15 (plus older versions)

It seems when going through the tutorial i start having issues when attempting to apply the “0001-Make-linux-work-with-WorkerSdk.patch” patch via GIT. I was able to get this to kinda run once but sadly didnt take a screen and cant repeat. That time I believe it stated 1 or 2 patched failed.

Thinking it was a issue with my engine I deleted my build re-downloaded the source and rebuilt UE4 and AutomationTool again both successfully.

I created a blank project and was about to open it fine. Wen back through the tutorial and received same error/results. I have attached a few screens to see if they help.

Also i am sorry if this seems all over the place i lack proper troubleshooting for these type of issue.



#2

I am new to this but if there is any info you need from me to help resolve this please let me know.


#4
   at SpatialOSModule.InterpolateFileContents(String SourceDirectory, String FileFilter, Func`2 ProcessAction) in g:\RPGDemo\workers\unreal\Game\Source\RpgDemo\SpatialOSModule.Build.cs:line 367
   at SpatialOSModule.GenerateCode() in g:\RPGDemo\workers\unreal\Game\Source\RpgDemo\SpatialOSModule.Build.cs:line 295
   at RpgDemo..ctor(TargetInfo Target) in g:\RPGDemo\workers\unreal\Game\Source\RpgDemo\RpgDemo.Build.cs:line 16
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, TargetInfo Target, FileReference& ModuleFileName) in G:\OneDrive\DEV\UnrealEngine-4.14\Engine\Source\Programs\UnrealBuildTool\System\RulesCompiler.cs:line 1142```

#5

Hey @BlackFox,

I’m really sorry to see that you’re having trouble getting this working!

It looks like your RPGDemo project is up to date with the release we made yesterday - one of the changes we made was to restructure the project to support recommendations by Epic Games and your file paths (for example, g:\RPGDemo\workers\unreal\Game\Source\RpgDemo) reflect this change, where the Unreal project now lives in a new Game\ directory.

However, unfortunately it looks like we missed some of the pages in our documentation when we were updating and this page https://spatialos.improbable.io/docs/reference/10.3/workers/unreal/introduction is now out of date! We’ll be fixing this as soon as possible.

In the meantime, in order to get you running, please could you try cloning/downloading a fresh version of the Unreal Engine 4.15.1 source (which is now the supported version) and placing it in your g:\RPGDemo\workers\unreal\ directory? You’ll also need to update the UNREAL_HOME environment variable to point to the new location of your engine and apply the patch again (which should work this time :slight_smile: ).

I hope this helps and please come back with any further issues!


#6

Thank you for the reply killing everything and will start fresh now.


#7

Just to make sure i am understanding this correctly i am to copy UE 4.15.1 into \RPGDemo\workers\unreal\Game?


#8

Sorry - I actually meant to say the RPGDemo\workers\unreal folder! Sorry for the confusion :tired_face:. I’ve updated this in my original reply.


#9

I believe the patch went threw this time but i am still receiving errors. When i do to build the project using spatial worker build --target=development, spatial worker build, or via unreal build it errors:

Failed to produce item: G:\RPGDemo\workers\unreal\Game\Binaries\Win64\UE4Editor-RpgDemo.dll

I will attach logs.spatial.log (63.9 KB)

I have my file structure as:

The full build error message is:

BlackFox@BlackFox MINGW64 /g/RPGDemo
$ spatial worker build --target=development
Generating bridge settings for UnrealClient.
Generating bridge settings for UnrealWorker.
Generating managed worker configuration for UnrealWorker.
No changes detected, skipping code generation.
Running task ‘build’ for worker ‘UnrealClient’, target ‘development’
[1/3] > Build Codegen
[1/2] > Codegen Dependencies
[1/2] < Codegen Dependencies (0.0s)
[2/2] > Codegen Setup build script
[2/2] < Codegen Setup build script (0.0s)

Codegen (0.0s)
[1/3] < Build Codegen (0.0s)
[2/3] > Build Compile Editor
Performing 3 actions (4 in parallel)
Module.RpgDemo.cpp
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2143: syntax error: missing ‘;’ before '&'
G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\Improbable\Generated\cpp\unreal\ Commander.cpp(34): note: see reference to function template instantiation ‘worke r::Dispatcher::CallbackKey worker::Dispatcher::OnCommandResponse<improbable::spa wner::Spawner::Commands::SpawnPlayer>(const std::function<void (const worker::Co mmandResponseOpimprobable::spawner::Spawner::Commands::SpawnPlayer &)> &)’ bei ng compiled
G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\ExportSnapshotCommandlet.cpp(58) : note: see reference to class template instantiation ‘std::array<float,0x05>’ b eing compiled
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2461: ‘worker::Dispatcher::OnCo mmandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>’: constructor syntax mi ssing formal parameters
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2238: unexpected token(s) prece ding ';'
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2143: syntax error: missing ‘,’ before '&'
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2610: ‘worker::Dispatcher::OnCo mmandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d04 4b0846cf8556b3d297>(const int)’: is not a special member function which can be d efaulted
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2061: syntax error: identifier '<lambda_e4840e44de2d044b0846cf8556b3d297>'
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): error C2535: ‘worker::Dispatcher::OnCo mmandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d04 4b0846cf8556b3d297>(void)’: member function already defined or declared
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): note: see declaration of 'worker::Disp atcher::OnCommandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4 840e44de2d044b0846cf8556b3d297>'
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(429): error C2228: left of ‘.CommandId’ must have class/struct/union
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(429): note: type is 'unknown-type’
G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i nclude\improbable/detail/worker.i.h(444): fatal error C1903: unable to recover f rom previous error(s); stopping compilation
ERROR: UBT ERROR: Failed to produce item: G:\RPGDemo\workers\unreal\Game\Binar ies\Win64\UE4Editor-RpgDemo.dll
Total build time: 17.89 seconds (Local executor: 0.00 seconds)
[2/3] x Build Compile Editor (18.2s)

Build (18.2s)


Error: exit status 5


See the full log of what happened here:
G:\RPGDemo\logs\spatial.log

Or re-run to see more information in the console:
spatial build --target=development --log_level=debug

‘spatial.exe build’ failed (18.6s)
time=“2017-04-29T12:44:17-04:00” level=warning msg=“At 2017-04-29 16:44:17 UTC f ailed executing command: \n c:\tools\spatial\spatial.exe worker build --ta rget=development” cli-version=20170428.084629.e649e2c
time=“2017-04-29T12:44:17-04:00” level=fatal msg=“exit status 1” cli-version=201 70428.084629.e649e2c

This is from a fresh Unreal Engine 4.15.1 build

Any suggestions? And thank you again for any help you may be able to provide,


#10

Hi there!

What you will need is to place the contents of UnrealEngine-4.15.1 into workers/unreal, resulting in the following structure:

workers
 |- gsim
 |- unreal
      |- spatialos.UnrealClient.worker.json
      |- spatialos.UnrealWorker.worker.json
      |- Game
           |- spatialos.unreal.client.build.json
           |- spatialos.unreal.worker.build.json
           |- RpgDemo.uproject
      |- Engine
      |- FeaturePacks
      |- Samples
      |- Templates

There is a possibility that your project folders might have intermediate files from a previous build. Can you try to delete the Intermediate folder of your Unreal project directory? While you are at it, try deleting the following folders too:

workers/unreal/Game/Intermediate
workers/unreal/Game/Source/RpgDemo/SpatialOS
workers/unreal/Game/Source/RpgDemo/Improbable
workers/unreal/.spatialos


#11

Sorry for the delay needed to take a break. I set the folder as listed getting the following structure:

When attempting to generate project files i get the following error:

Checking the engine files it looks like the patch applied correctly this time around.

Any suggestions?


#12

Hi @BlackFox,

Could you try and run spatial codegen again first and then try again? It should produce workers/unreal/Game/Source/RpgDemo/SpatialOSBuildModule.cs


#13

My mistake, doing that allowed me to generate project files. But the build still fails here is the log attempting a local build:

Generating bridge settings for UnrealClient.
Generating bridge settings for UnrealWorker.
Generating managed worker configuration for UnrealWorker.
No changes detected, skipping code generation.
Running task 'build' for worker 'UnrealClient', target 'development'
[1/3] > Build Codegen
[1/2] > Codegen Dependencies
  Extracting packages 0/1 (0%)
  Extracting packages 1/1 (100%)
[1/2] < Codegen Dependencies (0.0s)
[2/2] > Codegen Setup build script
[2/2] < Codegen Setup build script (0.0s)
>>> Codegen (0.0s)
[1/3] < Build Codegen (0.0s)
[2/3] > Build Compile Editor
  Creating makefile for RpgDemoEditor (no existing makefile)
  Performing full C++ include scan (no include cache file)
  spatial worker_package unpack-to worker_sdk linux_x64_unreal "G:\RPGDemo\worke                                                                                                                                                                                               rs\unreal\Game\Intermediate\Improbable\WorkerSdk\linux_x64" --log_level=warning
  Overriding deprecated package worker_sdk/linux_x64_unreal with worker_sdk/cpp-                                                                                                                                                                                               static-x86_64-clang_libstdcpp-linux. Please update your build scripts.


  spatial worker_package unpack-to worker_sdk windows_x86 "G:\RPGDemo\workers\un                                                                                                                                                                                               real\Game\Intermediate\Improbable\WorkerSdk\windows_x86" --log_level=warning
  Overriding deprecated package worker_sdk/windows_x86 with worker_sdk/cpp-stati                                                                                                                                                                                               c-x86-msvc_md-win32. Please update your build scripts.


  spatial worker_package unpack-to worker_sdk windows_x64 "G:\RPGDemo\workers\un                                                                                                                                                                                               real\Game\Intermediate\Improbable\WorkerSdk\windows_x64" --log_level=warning
  Overriding deprecated package worker_sdk/windows_x64 with worker_sdk/cpp-stati                                                                                                                                                                                               c-x86_64-msvc_md-win32. Please update your build scripts.


  spatial worker_package unpack-to code_generation Improbable.CodeGeneration "G:                                                                                                                                                                                               \RPGDemo\workers\unreal\Game\Intermediate\Improbable\bin" --log_level=warning


  WorkerSdkDir = G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSd                                                                                                                                                                                               k
  GeneratedCodeDir = G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\Improbable\Ge                                                                                                                                                                                               nerated\cpp
  IntermediateDir = G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable
  UnrealWorkerRootDir = G:\RPGDemo\workers\unreal
  SpatialOsSdkDir = G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\SpatialOS
  SpatialOsApplicationDir = G:\RPGDemo
  spatial process_schema generate --cachePath="G:\RPGDemo\workers\unreal\Game\In                                                                                                                                                                                               termediate\Improbable\cache_std" --output="G:\RPGDemo\workers\unreal\Game\Source                                                                                                                                                                                               \RpgDemo\Improbable\Generated\cpp\Std" --language=cpp --input="G:\RPGDemo\build\                                                                                                                                                                                               dependencies\schema\WorkerSdkSchema" --log_level=warning


  spatial process_schema generate --cachePath="G:\RPGDemo\workers\unreal\Game\In                                                                                                                                                                                               termediate\Improbable\cache_usr" --output="G:\RPGDemo\workers\unreal\Game\Source                                                                                                                                                                                               \RpgDemo\Improbable\Generated\cpp\Usr" --language=cpp --input="G:\RPGDemo\schema                                                                                                                                                                                               " --log_level=warning


  spatial process_schema generate --cachePath="G:\RPGDemo\workers\unreal\Game\In                                                                                                                                                                                               termediate\Improbable\cache_json_std" --output="G:\RPGDemo\workers\unreal\Game\I                                                                                                                                                                                               ntermediate\Improbable\json\Std" --language=ast_json --input="G:\RPGDemo\build\d                                                                                                                                                                                               ependencies\schema\WorkerSdkSchema" --log_level=warning


  spatial process_schema generate --cachePath="G:\RPGDemo\workers\unreal\Game\In                                                                                                                                                                                               termediate\Improbable\cache_json_usr" --output="G:\RPGDemo\workers\unreal\Game\I                                                                                                                                                                                               ntermediate\Improbable\json\Usr" --language=ast_json --input="G:\RPGDemo\schema"                                                                                                                                                                                                --repository="G:\RPGDemo\build\dependencies\schema" --log_level=warning


  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\bin\CodeGenerator.exe -                                                                                                                                                                                               -json-dir="G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\json" --unreal                                                                                                                                                                                               -output-dir="G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\Improbable\Generated\                                                                                                                                                                                               cpp\unreal" --unreal-project-name=RpgDemo
  SpatialOS Codegen
  Generating unreal classes into G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\I                                                                                                                                                                                               mprobable\Generated\cpp\unreal
  Finished generating code


  Building UnrealHeaderTool...
  Creating makefile for UnrealHeaderTool (no existing makefile)
  Target is up to date
  Total build time: 1.16 seconds (NoActionsToExecute executor: 0.00 seconds)
  Parsing headers for RpgDemoEditor
    Running UnrealHeaderTool "G:\RPGDemo\workers\unreal\Game\RpgDemo.uproject" "                                                                                                                                                                                               G:\RPGDemo\workers\unreal\Game\Intermediate\Build\Win64\RpgDemoEditor\Developmen                                                                                                                                                                                               t\RpgDemoEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdata                                                                                                                                                                                               base error" -Unattended -WarningsAsErrors
  Reflection code generated for RpgDemoEditor in 10.3703495 seconds
  Performing 14 actions (4 in parallel)
  PCH.RpgDemo.cpp
  RpgDemo.generated.1.cpp
  standard_library.cc
  Module.RpgDemo.cpp
  RpgDemo.generated.2.cpp
  spawner.cc
  spawner.pb.cc
  transform.cc
  transform.pb.cc
  standard_library.pb.cc
  heartbeat.pb.cc
  heartbeat.cc
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2143: syntax error: missing ';'                                                                                                                                                                                                before '&'
  G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\Improbable\Generated\cpp\unreal\                                                                                                                                                                                               Commander.cpp(34): note: see reference to function template instantiation 'worke                                                                                                                                                                                               r::Dispatcher::CallbackKey worker::Dispatcher::OnCommandResponse<improbable::spa                                                                                                                                                                                               wner::Spawner::Commands::SpawnPlayer>(const std::function<void (const worker::Co                                                                                                                                                                                               mmandResponseOp<improbable::spawner::Spawner::Commands::SpawnPlayer> &)> &)' bei                                                                                                                                                                                               ng compiled
  G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\ExportSnapshotCommandlet.cpp(58)                                                                                                                                                                                               : note: see reference to class template instantiation 'std::array<float,0x05>' b                                                                                                                                                                                               eing compiled
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2461: 'worker::Dispatcher::OnCo                                                                                                                                                                                               mmandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>': constructor syntax mi                                                                                                                                                                                               ssing formal parameters
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2238: unexpected token(s) prece                                                                                                                                                                                               ding ';'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C4430: missing type specifier -                                                                                                                                                                                                int assumed. Note: C++ does not support default-int
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2143: syntax error: missing ','                                                                                                                                                                                                before '&'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2610: 'worker::Dispatcher::OnCo                                                                                                                                                                                               mmandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d04                                                                                                                                                                                               4b0846cf8556b3d297>(const int)': is not a special member function which can be d                                                                                                                                                                                               efaulted
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2061: syntax error: identifier                                                                                                                                                                                                '<lambda_e4840e44de2d044b0846cf8556b3d297>'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): error C2535: 'worker::Dispatcher::OnCo                                                                                                                                                                                               mmandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d04                                                                                                                                                                                               4b0846cf8556b3d297>(void)': member function already defined or declared
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): note: see declaration of 'worker::Disp                                                                                                                                                                                               atcher::OnCommandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4                                                                                                                                                                                               840e44de2d044b0846cf8556b3d297>'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(429): error C2228: left of '.CommandId' must                                                                                                                                                                                                have class/struct/union
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(429): note: type is 'unknown-type'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\i                                                                                                                                                                                               nclude\improbable/detail/worker.i.h(444): fatal error C1903: unable to recover f                                                                                                                                                                                               rom previous error(s); stopping compilation
  ERROR: UBT ERROR: Failed to produce item: G:\RPGDemo\workers\unreal\Game\Binar                                                                                                                                                                                               ies\Win64\UE4Editor-RpgDemo.dll
  Total build time: 96.97 seconds (Local executor: 0.00 seconds)
[2/3] x Build Compile Editor (1m:37s)
>>> Build (1m:37s)
************************************
Error: exit status 5
************************************

See the full log of what happened here:
    G:\RPGDemo\logs\spatial.log

Or re-run to see more information in the console:
    spatial build --target=development --log_level=debug

'spatial.exe build' failed (1m:38s)
time="2017-04-30T15:20:53-04:00" level=warning msg="At 2017-04-30 19:20:53 UTC f                                                                                                                                                                                               ailed executing command: \n    c:\\tools\\spatial\\spatial.exe worker build --ta                                                                                                                                                                                               rget=development" cli-version=20170428.084629.e649e2c
time="2017-04-30T15:20:53-04:00" level=fatal msg="exit status 1" cli-version=201                                                                                                                                                                                               70428.084629.e649e2c

#14

Hey, this seems to have popped out again. Did you manage to delete RPGDemo\workers\unreal\Game\Intermediate\ before?


#15

Correct I deleted
workers/unreal/Game/Intermediate
workers/unreal/Game/Source/RpgDemo/SpatialOS
workers/unreal/Game/Source/RpgDemo/Improbable

before and after build didn’t see
workers/unreal/.spatialos


#16

Went back and deleted the folders again. It rebuild fresh copies but still errors, attached it the log.

Log.log (684.0 KB)


#17

Could you check line 444 of the following file? Or perhaps attach your version of the file?
Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable\detail\worker.i.h


#18

worker.i.zip (3.2 KB)


#19

line 424 - 444
line 424 template
Dispatcher::CallbackKey
Dispatcher::OnCommandResponse(const Callback<CommandResponseOp>& callback) {
detail::EnsureStaticInitializationHasOccurred();
auto wrapper_callback = [callback](const detail::DispatcherImpl::CommandResponseWrapperOp& op) {
if (op.CommandId != T::CommandId) {
return;
}
CommandResponseOp wrapper{RequestId<OutgoingCommandRequest>{op.RequestId},
op.EntityId,
static_cast(op.StatusCode),
op.Message,
{}};
if (op.Response) {
const auto& generic_response =
static_cast<const typename T::ComponentMetaclass::GenericCommandObject>(op.Response);
wrapper.Response.emplace(
*generic_response.CommandObject.template data());
}
callback(wrapper);
line 444 };


#20

Thanks, I’m still investigating this, but these are the offending lines from the logs:

  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2143: syntax error: missing ';' before '&'
  G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\Improbable\Generated\cpp\unreal\Commander.cpp(34): note: see reference to function template instantiation 'worker::Dispatcher::CallbackKey worker::Dispatcher::OnCommandResponse<improbable::spawner::Spawner::Commands::SpawnPlayer>(const std::function<void (const worker::CommandResponseOp<improbable::spawner::Spawner::Commands::SpawnPlayer> &)> &)' being compiled
  G:\RPGDemo\workers\unreal\Game\Source\RpgDemo\ExportSnapshotCommandlet.cpp(58): note: see reference to class template instantiation 'std::array<float,0x05>' being compiled
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2461: 'worker::Dispatcher::OnCommandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>': constructor syntax missing formal parameters
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2238: unexpected token(s) preceding ';'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2143: syntax error: missing ',' before '&'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2610: 'worker::Dispatcher::OnCommandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d044b0846cf8556b3d297>(const int)': is not a special member function which can be defaulted
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2061: syntax error: identifier '<lambda_e4840e44de2d044b0846cf8556b3d297>'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): error C2535: 'worker::Dispatcher::OnCommandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d044b0846cf8556b3d297>(void)': member function already defined or declared
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): note: see declaration of 'worker::Dispatcher::OnCommandResponse::<lambda_e4840e44de2d044b0846cf8556b3d297>::<lambda_e4840e44de2d044b0846cf8556b3d297>'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(429): error C2228: left of '.CommandId' must
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(429): note: type is 'unknown-type'
  G:\RPGDemo\workers\unreal\Game\Intermediate\Improbable\WorkerSdk\windows_x64\include\improbable/detail/worker.i.h(444): fatal error C1903: unable to recover from previous error(s); stopping compilation

which appears to all be generated/provided code.

  • Could you please try running spatial diagnose and pasting the output here, please?

Also, let’s try to rule out a possible corruption with the source-built UE4. Could you, please:

  • Right click on RpgDemo.uproject
  • Click on “Switch Unreal Engine Version…”
  • Set it to a release version
  • Right click on RpgDemo.uproject and click `Generate Visual Studio Project files"
  • Open the resulting RpgDemo.sln and try building the project from there.

Thanks for your patience.


#21
$ spatial diagnose
JAVA_HOME environment variable
  [SUCCESS]
  - The 'JAVA_HOME' environment variable points to a valid JDK installation.
  - Installed at 'C:\Program Files\Java\jdk1.8.0_121'.
Java Runtime Environment
  [FAIL]
  - The currently installed Java Runtime Environment is 32-bit. The 64-bit versi                                           on is required.
Java compiler
  [SUCCESS]
  - Installed at '\c\Program Files\Java\jdk1.8.0_121\bin\javac.exe'.
  - Found version 1.8.0_121.
Microsoft Visual C++ (MSVC) Redistributable
  [SUCCESS]
  - Found version 14.0.24210.
Network access
  [SUCCESS]
  - All checks passed
  - Installed at '\c\ProgramData\chocolatey\bin\spatial'.
Project SpatialOS SDK version
  [SUCCESS]
  - Found version 10.3.0.
Spatial SDK command-line plugin
  [SUCCESS]
  - Installed at 'C:\Users\jamari\AppData\Local\.improbable\bin\plugins\sdk\10.3                                           .0\sdk.exe'.
  - Found version 10.3.0.
Spatial global command-line tool
  [SUCCESS]
  - Installed at '\c\ProgramData\chocolatey\bin\spatial'.
  - Found version 20170428.84629.
sbt
  [SUCCESS]
  - Installed at '\c\Program Files (x86)\sbt\bin\sbt'.
  - Found version 0.13.13.0.
unity
  [FAIL]
  - It appears that Unity is not installed.
[RESULT] There was at least one error produced while running diagnostics.
[RESULT] If some dependencies are not installed, you can try to run 'spatial set                                           up install-dependencies' to install them.
************************************
Error: Diagnostics found issues.
************************************

See the full log of what happened here:
    G:\RPGDemo\logs\spatial.log

Or re-run to see more information in the console:
    spatial diagnose --log_level=debug

'spatial.exe diagnose' failed (8.3s)
time="2017-05-01T07:58:30-04:00" level=warning msg="At 2017-05-01 11:58:30 UTC f                                           ailed executing command: \n    c:\\tools\\spatial\\spatial.exe diagnose" cli-ver                                           sion=20170428.084629.e649e2c
time="2017-05-01T07:58:30-04:00" level=fatal msg="exit status 1" cli-version=201                                           70428.084629.e649e2c