Announcement

Collapse
No announcement yet.

Quit-Crash

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

    Quit-Crash

    Greetings! Recently i've been implementing slaceform menus, particularly the CLIK main menu tutorial. Tutorial worked just fine for me, so i decided to expand the main menu and add a "Quit" button. I've done some lame coding, compiled the code and started testing. When i start the game, menu appears, blah-blah-blah, quit button works fine, let's start the desired level...Loading screen appears and then application crashes.

    Logs looked like this:
    Code:
    [0007.95] Log: LoadMap: Temple?Name=Player?Team=255
    [0007.95] Log: --- LOADING MOVIE START ---
    [0008.40] ScriptWarning: Invalid user index (255) specified for ClearReadProfileSettingsCompleteDelegate()
    	OnlineSubsystemSteamworks Transient.OnlineSubsystemSteamworks_0
    	Function OnlineSubsystemSteamworks.OnlineSubsystemSteamworks:ClearReadProfileSettingsCompleteDelegate:00FE
    [0008.41] Log: 
    [0008.41] DevMemory: Memory allocations reported by the OS: 261.07 MB (with 0.00 MB waste)
    [0008.41] DevMemory: Virtual memory tracked in the allocators: 115.44 MB (with 103.73 MB used, 3.56 MB slack and 8.15 MB waste)
    [0009.42] Log: Game class is 'TestProjGame'
    [0009.52] Log: Primary PhysX scene will be in software.
    [0009.52] Log: Creating Primary PhysX Scene.
    [0009.64] Log: *** WARNING - PATHS MAY NOT BE VALID ***
    [0009.64] Log: Bringing World Temple.TheWorld up for play (0) at 2012.03.28-11.24.34
    [0009.77] Log: Bringing up level for play took: 0.352382
    [0009.78] ScriptWarning: Accessed None 'Profile'
    	UIDataStore_OnlinePlayerData Transient.DataStoreClient_0:UIDataStore_OnlinePlayerData_1
    	Function Engine.UIDataStore_OnlinePlayerData:OnLoginChange:0134
    [0009.78] ScriptWarning: Accessed None 'Profile'
    	UIDataStore_OnlinePlayerData Transient.DataStoreClient_0:UIDataStore_OnlinePlayerData_1
    	Function Engine.UIDataStore_OnlinePlayerData:OnLoginChange:0168
    [0009.79] Log: UserPawn_0 PLAYSOUND with no sound cue called from PlayTeleportEffect
    [0009.79] Log: Script call stack:
    	Function UTGame.UTGame:PostLogin
    	Function Engine.GameInfo:PostLogin
    	Function Engine.GameInfo:PendingMatch.StartMatch
    	Function UTGame.UTGame:StartMatch
    	Function Engine.GameInfo:StartMatch
    	Function Engine.GameInfo:StartHumans
    	Function UTGame.UTGame:RestartPlayer
    	Function Engine.GameInfo:RestartPlayer
    	Function UTGame.UTPawn:PlayTeleportEffect
    
    [0009.79] Error: Can't start an online game that hasn't been created
    [0009.79] ScriptLog: START MATCH
    [0009.79] ScriptWarning: Accessed None 'PlayerOwner'
    	GameHUD Temple.TheWorld:PersistentLevel.GameHUD_0
    	Function TestProj.GameHUD:PostBeginPlay:0013
    [0009.79] ScriptWarning: Accessed None 'PlayerOwner'
    	GameHUD Temple.TheWorld:PersistentLevel.GameHUD_0
    	Function TestProj.GameHUD:PostBeginPlay:003F
    [0009.79] ScriptLog: False
    [0009.79] ScriptLog: SmallFont
    [0009.79] ScriptWarning: Accessed None 'PlayerOwner'
    	Dialog Transient.Dialog_0
    	Function TestProj.Dialog:AssignVar:0029
    [0009.79] ScriptWarning: Accessed None 'PlayerOwner'
    	Dialog Transient.Dialog_0
    	Function TestProj.Dialog:AssignVar:0029
    [0009.84] Log: ########### Finished loading level: 1.891707 seconds
    [0009.93] ScriptWarning: Invalid user index (255) specified for ClearReadProfileSettingsCompleteDelegate()
    	OnlineSubsystemSteamworks Transient.OnlineSubsystemSteamworks_0
    	Function OnlineSubsystemSteamworks.OnlineSubsystemSteamworks:ClearReadProfileSettingsCompleteDelegate:00FE
    [0009.96] Exit: Preparing to exit.
    [0012.55] Critical: appError called: Rendering thread exception:
    Fatal error!
    
    Address = 0x25590ce  (filename not found) [in C:\UDK\Flash Menu Testing\Binaries\Win32\UDK.exe]
    
    [0012.55] Critical: Windows GetLastError: ?5@0F8O CA?5H=> 7025@H5=0. (0)
    [0012.57] Log: === Critical error: ===
    Rendering thread exception:
    Fatal error!
    
    Address = 0x25590ce  (filename not found) [in C:\UDK\Flash Menu Testing\Binaries\Win32\UDK.exe]
    
    
    System.Runtime.InteropServices.SEHException error in UDK:
    
    =5H=89 :><?>=5=B A>740; 8A:;NG5=85.
    
       2 GuardedMainWrapper(Char* , HINSTANCE__* , HINSTANCE__* , Int32 )
       2 ManagedGuardedMain(Char* CmdLine, HINSTANCE__* hInInstance, HINSTANCE__* hPrevInstance, Int32 nCmdShow)
    The log information above is not complete. I have intentionally omitted the beggining, cause problem is related to the loading process of man named "Temple"
    The code for my GFx looks like that:

    Code:
    class SFMenuTutorial extends GFxMoviePlayer;
    
    var GFxClikWidget StartButton;
    var GFxClikWidget QuitButton;
    var GFxObject MainMenuTitle;
    
    function bool Start (optional bool StartPaused = false)
    {
            super.Start();
            Advance(0);
    
            MainMenuTitle = GetVariableObject("_root.textField");
            MainMenuTitle.SetText("Flashback");
    
            return true;
    
    }
    
    event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
    {
        switch(WidgetName)
        {
            case ('startBtn'):
                    StartButton = GFxClikWidget(Widget);
                    StartButton.addEventListener('CLIK_press', OnStartButtonPress);
            case ('quitBtn'):
                    QuitButton = GFxClikWidget(Widget);
                    QuitButton.addEventListener('CLIK_press', OnQuitButtonPress);
    
                    break;
            default:
                    break;
        }
            return true;
    }
    
    
    
    function OnStartButtonPress (GFxClikWidget.EventData ev)
    {
        ConsoleCommand("open Temple");
    }
    
    function OnQuitButtonPress (GFxClikWidget.EventData ev)
    {
        ConsoleCommand("quit");
    }
    
    defaultproperties
    {
        WidgetBindings.Add((WidgetName="startBtn", WidgetClass=class'GFxClikWidget'))
        //WidgetBindings.Add((WidgetName="quitBtn", WidgetClass=class'GFxClikWidget'))
    }
    I tried to comment the OnQuitButtonPress function and quitBtn case. That worked, game stoped crashing, but i'm missing the exit-button functionality. What's wrong with my code?

    #2
    Try ensuring that you close the Scaleform movie before quitting.

    Seems illogical, but I remember doing it for another project and it resolved that problem.

    Comment


      #3
      The only thing I can see wrong with your menu code is a missing 'break;' in the first case of your switch statement. Other than that it looks fine. I've written similar code dozens of times that doesn't crash the game when launching a map. Try a different map maybe, like DM-Deck? Just for the sake of seeing what happens.

      As Solid Snake suggested though, you could try modifying your OnStartButtonPress function:

      Code:
      function OnStartButtonPress (GFxClikWidget.EventData ev)
      {
          ConsoleCommand("open Temple");
          Close(true);
      }

      Comment


        #4
        Thank you, kind people! All the advices that been given above were very useful. Now menu works just fine!

        Comment

        Working...
        X