Announcement

Collapse
No announcement yet.

Craaaaazy GUI crash bug

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

  • replied
    bah, well it turns out that if i manage to recover from the crash (get windows to shut the game down before it completely crashes my computer) the logfile is wiped. But if i let it crash my computer and reset it with the power button, i can see the logfile up to where it crashed.

    Unfortunately there STILL doesnt' seem to be anything especially suspicious. The only thing that might possibly resemble a problem is the log repeatedly says

    ScriptLog: Couldn't spawn player of type XGame.xPawn at SH-junktest(empty).PlayerStart0

    which i'm pretty sure is just a result of junktest being a test map and me only putting in one playerstart so the default bots that appear with you cant spawn. Any ideas?

    Leave a comment:


  • replied
    Actually i've been considering that, I specifically set the pause if possible variable to false for my menu page. Part of the reason is to have it act as a blinding attack when its called. Besides that it could be called during multiplayer where you cant pause the game anyway. I'm not sure if thats whats causing the problem though.

    I havn't been checking the logfile because my computer crashes so i figured the log would be useless... although I may be wrong. I'll run a few more tests and post anything crazy if i find it.

    Leave a comment:


  • replied
    No, lol. Do you pause the level before you open the menu? Not that you have to, but most menus should be open during paused gameplay.

    What are you extending as your GUIPage? Is there nothing in the log that would indicate the source of the problem?

    Leave a comment:


  • replied
    Do you think maybe it could have something to do with the fact that the menu page doesn't tick and the playercontroller that autocloses it does? Do you know if it would be possible for something in the playercontroller is trying to tick but cant because of the menu and therefore is going into some kind of infinite loop?

    Leave a comment:


  • replied
    Ah thanks, didn't know about the optional parameters, that should clean up my code a little bit.

    As for the problem being in the menu, i've looked through it (again to make sure) but like i said its really boring at the moment. There are no loops period, and the only functions that do anything out of direct eyesight is that they call super.InternalOnKeyEvent and super.Initcomponent (from their respective functions). Nothing that should crash the system, let alone my computer...

    Leave a comment:


  • replied
    My guess would be the problem is somewhere in your menu. Look for any while loops which might be crashing, and give it an escape clause (if you find any).

    Another thing, you can simply pass the text you want on the text box via the open menu command. It has 2 optional strings, which are "handled" in the HandleParameters() function. If the optional strings are blank, the function doesnt get called, but if you put something in one or both, the function gets called. Very useful

    Leave a comment:


  • started a topic Craaaaazy GUI crash bug

    Craaaaazy GUI crash bug

    Hey everybody. I've got a real winner for you this time. Been trying to fix this bug for the past 4 days or so to no avail so I figure'd i'd post what may be the single most annoying bug I've ever run into (and thats saying something).

    To make a relatively long story relatively short, I want to shoot someone and open a menu page. I've created a function (exec function for now so i can debug it) in my custom playercontroller that has the very simple code:
    Code:
    exec singular function OpenMyMenu(string caption)
    {
       Text= caption;
       if(!bmenuOpen){
    
       Player.GUIController.OpenMenu("junk.MenuPage");
       }
       else{
    
    	pawn.clientmessage("no go away!");
       }  
    }
    Most often, when i call this message, it works like its supposed to, it opens the menupage. The page itself is unremakable for now. Its a standard page except that it grabs one string variable from the playercontroller and dumps it into a textbox.

    The problem is, sometimes, calling this function will crash my computer... Thats right, no nice general protection fault, no random odd game crash, the ENTIRE COMPUTER acts like its getting completely overloaded (mouse freezes, things act in super slow motion for a little bit then freezes completely) and i'm stuck restarting my entire computer (with the power button) every time I try to fix this bug and fail.

    The crash doesn't normally happen when I call the function manually from the console but it happens basically every time when i'm shot by a menu projectile (a subclassed redeemer projectile that I appended some code to to call the openmenu class when it hits its target). The relavent code from the projectile itself is below

    Code:
    simulated function ProcessTouch (Actor Other, Vector HitLocation)
    {
    	local vector dir;
    
    	if( pawn(other) != none && other != instigator)
    	{
    	  Dir = vector(Rotation);
    	  Velocity = 0 * Dir;
    	  hitpawn = pawn(other);
    	  if(hitpawn != none && myPlayerController(hitpawn.controller) != none && doOpen == 1)
    		{	
                                    // attempted fix here, doesn't stop it
    		doOpen = 0;
    myPlayerController(hitpawn.controller).OpenMyMenu(option);
    		}
    	}
    	
    	super.processtouch(other, hitlocation);
    
    	if ( Other != instigator )
    	{
    	Destroy();
    	}
            
    
    }
    For a few days I thought the problem had to be somewhere in here since it didn't usually happen when I called the exec function, but today it started happenening even when i called the openmymenu function manually. By the way if I take off the "if other != instigator" clause in the if statement to test it by hitting myself it almsot always crashes every time i shoot and I cant figure out why. The Menu pops up, and my computer pops down.

    If anyone knows what might be the problem please let me know. This one's super irritating because i have to reboot my computer nearly every time I try a fix.
Working...
X