Announcement

Collapse
No announcement yet.

Development Server compilation and Debuging ...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Development Server compilation and Debuging ...

    Well I'm in the process of setting up connection between the client and server and started working with the source code.
    Working with 4.1 zipped version not forked git. Got the additional zips in as well, all compiles fine, no issues there.
    I have this working and tested in editor mode no issues there. Now tho I've setup the Cooked dir's and then compiled
    Development Server, again no issues there until it actually gets to loading the server up (This is in DEBUG Mode)
    as one of the ways I learn a system is to step thru it in debug mode...

    In International.cpp, Line 183:
    Code:
            DataDirectory = FPaths::EngineContentDir() / TEXT("Localization");
    	if( !FPaths::FileExists(DataDirectory / TEXT("icudt51l.dat")) )
    	{
    		DataDirectory = FString(FPlatformProcess::BaseDir()) / FPaths::EngineContentDir() / TEXT("Localization");
    	}
    Is failing as the directory it ends up with is incorrect on how its getting the ( FPaths::EngineContentDir() )
    It is close, it has gone Up dir ../../ correctly, but is missing the names where the (engine/) dir is located
    which is (Unreal4/UnrealEngine-4.1), but during debug, this part is not in the path...

    Ends up: C:\Development\EWProjects\(game)\..\..\..\engine (etc)
    Where as it should be: C:\Development\EWProjects\Unreal4\UnrealEngine-4.1\..\..\..\engine (etc)
    notice the missing (game) in the correct dir...

    I have the two sitting side by side,
    (root drive)\game
    (root drive)\Unreal4\UnrealEngine-4.1

    This causes it assert not suprisingly.

    So the big question:
    Is compilation an issue for dedicated server versions still?
    I have (i think) got my (game)server.target.cs build file correct.
    I am using a code base customized from the original shootergame for testing and learning...
    Last edited by SteeleDriver; 05-09-2014, 05:14 AM.

    #2
    two additional notes on this...
    The cooked dir is the following:
    (root dev dir)\(game)\Saved\Sandboxes\Cooked-WindowsNoEditor
    (root dev dir)\(game)\Saved\Sandboxes\Cooked-WindowsServer

    Interestingly, the cooking only creates the content in the \Cooked-WindowsNoEditor
    So I copied that over the auto created \Cooked-WindowsServer

    I also noticed that the \engine\Content\Localization was not in the client dir so I copied that over from the source dir

    This resolved the issue with finding: icudt51l.dat which started this post as that was where it failed.
    Instead I now get a :
    unrealengine-4.1\engine\source\runtime\core\public\templates\SharedPointer.h(195): Assertion failed: InRawPtrProxy.Object != NULL
    from here:
    namespace
    {
    TSharedRef<const icu::Collator> CreateCollator( const icu::Locale& ICULocale )
    {
    UErrorCode ICUStatus = U_ZERO_ERROR;
    return MakeShareable( icu::Collator::createInstance( ICULocale, ICUStatus ) );
    }
    Last edited by SteeleDriver; 05-09-2014, 05:32 AM.

    Comment


      #3
      Here's a tutorial for dedicated servers:
      https://wiki.unrealengine.com/Standa...dicated_Server

      The problems you describe can be solved by moving the server binary to the binaries directory of the cooked game.

      Comment


        #4
        That would be true for just running the Server, I am discussing running it in debug mode local debugger
        That cannot be done that way unless I connect to the instance after it starts up. Stepping thru the startup is
        very important during intial design with an unfamilair code base. Try running debug mode and you will see what I mean
        Its configured to start in the project/intermediate dir.
        I have played around with changing the start location to the new directory, but that doesn't work and
        I have already been reading all those and what is found in the answers/forums.

        I have read up also on using the UnRealFrontend but have been unable to successfully Cook the
        server version as talked about in one of the answers posts: https://answers.unrealengine.com/que...ed-server.html

        So yeah, I have been reading all the posts...
        Last edited by SteeleDriver; 05-09-2014, 10:23 AM.

        Comment


          #5
          I see, but you can still move the exe to the right place, open the project properties in Visual Studio, go to "Debugging", set the "Command" field to "C:\path\to\your\server.exe" and "Working Directory" to the same directory and start debugging.

          Comment


            #6
            Yep, and that isn't the problem. I get it to load and use the Cooked content I created. I get it started in Debug mode
            THEN it asserts due to localization issues.... That is the issue, not the location of the Exe file.

            Comment


              #7
              Weird, I just tested it a second time in debug mode and it doesn't assert for me.
              I know that assert occurs when the exe is not in the right location or the working directory isn't set correctly, that's all I can say.
              Also, I start the server without any uproject file, just with -debug.

              Comment


                #8
                Okay.. so if ya got it working lets see what I did different..
                I started with the Original ShooterGame Project, was 4.0, updated to 4.1 and redid all my current files to the changes
                in the sample project for 4.1 as all my files are renamed and modified.. It runs fine in editor.

                I then Uninstalled the Original launcher code app and setup just the 4.1 source files from zip and recompiled the engine.
                I then switched (using the switcher application) in engine binaries dir to 4.1

                I removed the Launcher app as it was giving me conflicts with using both and so this was easiest way to go for the moment.

                I then rebuilt my vc files from the updated engine source by right click project->generate...

                I then built the Development Editor... Runs fine, allows me to run standalone or in editor window.

                I then selected Development Server as the configuration and made sure my project was set to that and set to x64
                I only build the project not the whole engine files as they should not need to be rebuilt (so build project not solution).

                I then load the project and cook the contents.
                When I then click on local windows debugger with no changes it then fails

                I suspect you have done this differently

                Also I just tried this again with a clean setup (removed all built binaries for game)
                I did the cooking, it creates the following dir:
                (projectdir)\saved\sandboxes\Cooked-WindowsNoEditor

                When I then run debug with JUST -debug removing the "$(SolutionDir)$(SolutionName).uproject" from the front part of line
                I still get the missing Localisaztion file path assert..
                Localization dir IS NOT in the Cooked-WindowsNoEditor dir

                I can run it in Debug mode for Developer Editor no problem and as long as I don't run it standalone I can debug it then.

                I also tried the DebugGame Server Configuration. Same result.
                I am also going to try this as DebugGame Client next just to test it.

                Comment


                  #9
                  the main thing to know here is I am using the default setup for debugging that utilizes the sandbox dir
                  by just cooking the content not cooking for release so it is suppose to use the SandBox dir, which when doing the
                  editor, it does use it. If I don't create the Cooked contents, it properly complains that they haven't been created.

                  (edit)
                  Just tested the DebugGame Client... This one fails as does server with no localization found ...
                  And for good measure I'm going back to the base original shootergame and testing that one the same way.
                  Last edited by SteeleDriver; 05-10-2014, 10:52 AM.

                  Comment


                    #10
                    well, at least I know it wasn't me
                    Just took the basic original ShooterGame 4.1, compiled it (Development Editor)
                    Ran editor, tested in editor window..
                    Cooked the Files (not packaged), then compiled Development Server x64 and got the same assert
                    DataDirectory L"C:/Users/mythic/Documents/Unreal Projects/Shooter Game 4.1/Binaries/Win64/../../../Engine/Content/Localization"
                    Is not there

                    (edit)
                    Reminder.. The Sandbox Dir is the one being used, not a packaged dir
                    It is NOT copying the Localization dir from the Source Engine, (UnZipped source dir has it), dir to the cooked dir

                    Another thing I've noticed in the ShooterGame is the Error:
                    LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/game' is not a standard unreal filename or a long path name

                    Which has carried over to my verison and I cannot find Where is setting that and causing the error *sigh*
                    The best I can figure from log is here...
                    LogInit: Build Configuration: Development
                    LogInit: Branch Name: UE4
                    LogInit: Command line: /game
                    Last edited by SteeleDriver; 05-10-2014, 11:47 AM.

                    Comment


                      #11
                      I'll figure this out yet..
                      For further testing I've created the simple FPP c++ project with sample content.
                      Compiled Development Editor, Ran Editor, tested in Viewport, Cooked sandbox, Compiled Development Client, Ran Local Debuger..

                      Bam: Localization Error lol
                      C:\Development\Unreal4\UnrealEngine-4.1\Engine\Source\Runtime\Core\Private\Internationalization\Internationalization.cpp(188): Assertion failed: FPaths::FileExists(DataDirectory / TEXT("icudt51l.dat"))

                      As the Localization Dir has again NOT been created in the Sandbxo...
                      This is with absolutely No Changes to defaults

                      Interestingly:
                      LogInit: Compiled (64-bit): May 7 2014 10:56:37
                      LogInit: Build Configuration: Development
                      LogInit: Branch Name: UE4
                      LogInit: Command line:
                      LogInit: Base directory: C:/Development/Unreal4/UnrealEngine-4.1/Engine/Binaries/Win64/

                      The base creation does not add the /game to command line, and that command line is nowhere
                      that I can find withing the project or files.. I've done a in-depth serach of all files and manually
                      checked every setting in the project.

                      (I should always use spell check lol)
                      Last edited by SteeleDriver; 05-10-2014, 12:05 PM.

                      Comment


                        #12
                        Heres another test of that same Project with the Exe moved to the sandbox dir...

                        Log file open, 05/10/14 17:08:01
                        LogInitisplay: No sandbox specified, assuming ../../../TestFPP/Saved/Sandboxes/Cooked-WindowsNoEditor
                        LogWindows:Error: appError called: Assertion failed: FPaths::FileExists(DataDirectory / TEXT("icudt51l.dat")) [File:C:\Development\Unreal4\UnrealEngine-4.1\Engine\Source\Runtime\Core\Private\Internationalization\Internationalization.cpp] [Line: 188]

                        Stack:
                        FWindowsPlatformStackWalk::StackWalkAndDump() 0x3fcbccc6 + 0 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:177] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        FDebug::AssertFailed() 0x3fb43b38 + 0 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\core\private\misc\outputdevice.cpp:176] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        FInternationalization::Initialize() 0x3fab9462 + 0 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\core\private\internationalization\internationalization.cpp:189] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        FInternationalization::Get() 0x3faadd34 + 0 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\core\private\internationalization\internationalization.cpp:38] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        FEngineLoop::AppInit() 0x3f9f0db4 + 5 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\launch\private\launchengineloop.cpp:2218] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        FEngineLoop::PreInit() 0x3f9fb937 + 0 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\launch\private\launchengineloop.cpp:895] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        GuardedMain() 0x3f9f617b + 15 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\launch\private\launch.cpp:111] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        GuardedMainWrapper() 0x3f9f628a + 5 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        WinMain() 0x3fa01957 + 17 bytes [File=c:\development\unreal4\unrealengine-4.1\engine\source\runtime\launch\private\windows\launchwindows.cpp:207] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        __tmainCRTStartup() 0x41c8c8bd + 21 bytes [File=f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] [in C:\Users\mythic\Documents\Unreal Projects\TestFPP\Binaries\Win64\TestFPP.exe]
                        Address = 0x776d652d (filename not found) [in C:\Windows\system32\kernel32.dll]
                        Address = 0x77a5c541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]
                        Address = 0x77a5c541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]

                        LogWindows:Error: Windows GetLastError: The handle is invalid. (0)
                        LogWindows: === Critical error: ===
                        So it is correctly using the sandbox dir it is in...
                        Sadly it has Locked the Starting dir to the binaries dir even tho this was started from a copy in the sandbox dir.
                        Last edited by SteeleDriver; 05-10-2014, 12:15 PM.

                        Comment


                          #13
                          hmm, I hate any errors but this is unusual...
                          I have finally found where it is setting it but not how to change it.

                          In SSessionLauncherPreviewPage.cpp (Engine Source) we have the following:
                          + SVerticalBox::Slot()
                          .AutoHeight()
                          .Padding(0.0f, 8.0f, 0.0f, 0.0f)
                          [
                          SNew(SHorizontalBox)

                          + SHorizontalBox::Slot()
                          .AutoWidth()
                          [
                          SNew(STextBlock)
                          .Text(LOCTEXT("CommandLineLabel", "Command Line:"))
                          ]

                          + SHorizontalBox::Slot()
                          .FillWidth(1.0f)
                          .HAlign(HAlign_Right)
                          .Padding(8.0f, 0.0f, 0.0f, 0.0f)
                          [
                          // command line
                          SNew(STextBlock)
                          .Text(this, &SSessionLauncherPreviewPage::HandleCommandLineTextBlockText)
                          ]
                          ]
                          This is part of the // launch section
                          But in the Editor I am unable to locate that Menu item anywhere in the editor settings so far... been looking hard.

                          (edit)
                          Argh.. Its a default setting somewhere, once I started a Full Packaging of the TestFPP the error returned.
                          I suspect I have run the Launcher app seperate from the editor to get at it.
                          Last edited by SteeleDriver; 05-10-2014, 12:55 PM.

                          Comment


                            #14
                            Alrite.. My head hurts *sigh*
                            I have looked and still havent found where it is setting "/game" (Notice lowercase) for any of the projects.
                            I have loaded up the Game Launcher app and gone thru it... The Launch section has the Command Line: <empty>

                            Yet it is setting a default: "/game" in it when it cooks. Something is wrong with the settings and thankfully
                            it aint me...

                            Boy they hid that real good.. I even searched thru the registry and still havent found it lol
                            its got to be something simple in the setup where it builds from pieces as the search features of Express
                            and all files cant find
                            Last edited by SteeleDriver; 05-10-2014, 01:35 PM.

                            Comment


                              #15
                              still havent found that dogone "/game" setting, at least the correct one...
                              There are several points where it uses "/game", but not sure which one it is...

                              UnrealVersionSelector.cpp :
                              else if (Arguments.Num() == 2 && Arguments[0] == TEXT("/game"))
                              {
                              // Play a game using the editor executable
                              bRes = LaunchEditor(Arguments[1], L"/game");
                              }
                              else if (Arguments.Num() == 2 && Arguments[0] == TEXT("/projectfiles"))
                              (this probably isn't it as its accessing the registry)
                              DesktopPlatformWindows.cpp :
                              // HKLM\SOFTWARE\Classes\Unreal.ProjectFile\shell\run
                              FRegistryKey *ShellRunKey = ShellKey->FindOrAddKey(TEXT("run"));
                              ShellRunKey->SetValue(TEXT(""), TEXT("Launch game"));
                              ShellRunKey->SetValue(TEXT("Icon"), QuotedExecutableFileName);
                              ShellRunKey->FindOrAddKey(L"command")->SetValue(TEXT(""), QuotedExecutableFileName + FString(TEXT(" /game \"%1\"")));
                              But I was able to Cook for "windows" and run the DebugGame Client and then attach after starting it in the correct dir.
                              This was done using the Launcher app to do the advanced build without deploying it.

                              Running it from VC it keeps setting the default startup wrong and trying to run from intermediate..\..\(etc) instead of using
                              the Values I put in. This means the NMake values are holding the local project settings and overriding the project properties.
                              I so love when you have extremely complex build configurations that interfere with what would be considered standard setups *sigh*

                              So the VC configuration setup by the unreal build system is the cause of the Localization issue, not anything I've done.
                              This interferes with doing a full debug as you have to start it manually then attach, makes it hard to catch startup issues.

                              Comment

                              Working...
                              X