Author Topic: Sudden Freezing  (Read 2579 times)

Offline ZaneWolfe

  • Sr. Member
  • ****
  • Posts: 272
Sudden Freezing
« on: May 17, 2014, 10:06:54 am »
Since the 7.025 patch I've been having strange freezes, where everything locks up, no crash report, nothing. It wont even let me alt-tab out anymore, leaving me with no choice but to Ctrl+Alt+Delete and use the task manager to shut the process down. The problem doesn't seem to have any rhyme or reason to it, and I've not been able to reproduce it. Sometimes I can play for hours and never get a freeze, other times I get one rather quickly. Anyone else having similar issue?

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Sudden Freezing
« Reply #1 on: May 17, 2014, 10:29:10 am »
It may be an infinite-loop bug. If you have autosaves on and post the last autosave before a freeze, I may be able to get it to happen again by just running it, and when it starts looping I'll hit pause on the debugger to see where it's stuck.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ZaneWolfe

  • Sr. Member
  • ****
  • Posts: 272
Re: Sudden Freezing
« Reply #2 on: May 17, 2014, 12:12:40 pm »
Since I'm using a memory hack to freeze/alter certain addresses, IE the HP on a Botnet golem, could it be causing feedback? I've never had it happen before, so it really shocked me to see it happening now. I'll try and get a save readied up, but as I said before, I've never seen any rhyme or reason to it. Even when I reload the exact same saves, I've never seen it repeat at the same time.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Sudden Freezing
« Reply #3 on: May 17, 2014, 12:17:25 pm »
Freezing certain values might lead to an infinite loop, sure, if it became part of a "loop until this is <= zero" condition, etc.  But if that didn't cause this before then I agree that the memory editing is probably not causing the freezes.  But it might be.  In general freezing a memory cell like that can have... interesting consequences.  Particularly if the memory is reassigned to something else for whatever reason.

Anyway, I know the save won't reproduce it reliably, but sometimes I can just let it run until it happens, and have the debugger watching.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ZaneWolfe

  • Sr. Member
  • ****
  • Posts: 272
Re: Sudden Freezing
« Reply #4 on: May 17, 2014, 01:24:12 pm »
Here you go. I'm not sure how close it was to the freeze, but it shouldn't be too far. Last time I checked, it was auto saving every 15 minutes.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Sudden Freezing
« Reply #5 on: May 18, 2014, 02:39:58 pm »
Careful with memory freezing in programs with garbage collection. Garbage collectors are free to move objects around in memory (that includes addresses relative to virtual memory), so addresses may not be consistent. Unless your memory poker is aware of this or at least adjust for it, you may start writing to something completely different than you were before even if the address remains the same if the GC shuffles things around.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Sudden Freezing
« Reply #6 on: May 19, 2014, 03:22:35 pm »
Ok, I ran it for a long time but no freezes or errors or whatever.  So I'd have to guess that something shifted due to some unrelated change and now the GC is doing things that are unfriendly to your memory-editing.

Quote
Did you think we wouldn't see?
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ZaneWolfe

  • Sr. Member
  • ****
  • Posts: 272
Re: Sudden Freezing
« Reply #7 on: May 19, 2014, 04:17:47 pm »
Ok, I ran it for a long time but no freezes or errors or whatever.  So I'd have to guess that something shifted due to some unrelated change and now the GC is doing things that are unfriendly to your memory-editing.

Well then, I shall have to make my own program smarter then. Your AI may be a galaxy conquoring monstrusity, but I am Zane Wolfe. I do not lose, I am merely delayed. The AI War shall be won by me.

Quote
Did you think we wouldn't see?

Of course I knew you would see AI, but I am the Master of Shadows, and deception is my greatest skill. You will watch, closely observing all that I WANT you to, while the real trick catches completely by surprise.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Sudden Freezing
« Reply #8 on: May 19, 2014, 04:25:12 pm »
You don't really need a memory editor, you know.  "ilostit,AIHunterKillerIV,1000,1000,100" (after a few "activate the omega"s to cover the bill) should take care of most of what you need ;)  If not, change the 100 to 1000, or 2000.

And you can use the load_script thing to batch-cheat to avoid lots of typing, etc.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Sudden Freezing
« Reply #9 on: May 19, 2014, 04:32:11 pm »
Quote
Did you think we wouldn't see?

Of course I knew you would see AI, but I am the Master of Shadows, and deception is my greatest skill. You will watch, closely observing all that I WANT you to, while the real trick catches completely by surprise.

Reminds me that I blew up an AI Parasite Eye last night.  Threw 8 riots, 4 lightning torpedo frigates, and 6 enclave starships at the problem.  None of them are reclamation vulnerable, so I just kind of left them there to take care of the system.

After finally utterly neutering the system and pulling my ships back, the last drone died and the AI taunted me with "Did you think we wouldn't see?" and I snorted and went "No."

Offline ZaneWolfe

  • Sr. Member
  • ****
  • Posts: 272
Re: Sudden Freezing
« Reply #10 on: May 19, 2014, 04:33:04 pm »
But I LOVE my nearly immortal Botnet Golem. Sure it can't do shit against anything protected by a shield or immune to reclamation, but it does WONDERS for clearing up pesky threat. And its really all I've been using the memory hacker for.

Edit: It also gives me a chance to both prove I'm a better programer, and offers me something I can't easily resist, a challenge of my skill.
« Last Edit: May 19, 2014, 04:34:46 pm by ZaneWolfe »

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Sudden Freezing
« Reply #11 on: May 19, 2014, 04:47:59 pm »
Edit: It also gives me a chance to both prove I'm a better programer, and offers me something I can't easily resist, a challenge of my skill.

I did the same thing with Monster's Den.  Cheat Engine'd about going "ooh shiny" and finding a couple of item flags that existed in the code/memory but which were not present within the game itself.  I could turn them on and get a listing of what it was, but I'm not sure it did anything.

It was also incredibly challenging to locate those values, too, as items didn't upgrade, so there wasn't a changing value in RAM that I could narrow the search for (the second game, on the other hand, did, and it made it a lot easier to find).

Offline NickAragua

  • Sr. Member
  • ****
  • Posts: 281
Re: Sudden Freezing
« Reply #12 on: May 19, 2014, 05:41:13 pm »
As an aside, I love the "bug report cycle" going on in this thread. Not trying to rag on you, Zane, as successful direct memory manipulation takes some serious analysis and math.

Poster: I am having a problem with the game crashing.
Dev: Ok, can you provide some details?
Poster: Well, I am directly altering the game state from outside the normal program cycle.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Sudden Freezing
« Reply #13 on: May 19, 2014, 05:49:57 pm »
As an aside, I love the "bug report cycle" going on in this thread. Not trying to rag on you, Zane, as successful direct memory manipulation takes some serious analysis and math.

Poster: I am having a problem with the game crashing.
Dev: Ok, can you provide some details?
Poster: Well, I am directly altering the game state from outside the normal program cycle.
Haha, yea, that had occurred to me too.  I wanted to investigate mainly to check if it was a broader thing, as the memory-editing approach apparently has worked for a while without causing the freezing and thus might not actually be the cause.

It also reminded me a bit of http://xkcd.com/1172/
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Winge

  • Hero Member
  • *****
  • Posts: 601
Re: Sudden Freezing
« Reply #14 on: May 19, 2014, 07:08:02 pm »
As an aside, I love the "bug report cycle" going on in this thread. Not trying to rag on you, Zane, as successful direct memory manipulation takes some serious analysis and math.

Poster: I am having a problem with the game crashing.
Dev: Ok, can you provide some details?
Poster: Well, I am directly altering the game state from outside the normal program cycle.
Haha, yea, that had occurred to me too.  I wanted to investigate mainly to check if it was a broader thing, as the memory-editing approach apparently has worked for a while without causing the freezing and thus might not actually be the cause.

It also reminded me a bit of http://xkcd.com/1172/


That reminds me...is this fixed yet?  I really want to see a 100,000,000+ ship wave...

My other bonus ship is a TARDIS.