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:
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
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.
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!"); } }
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(); } }
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.
Comment