Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[QUESTION]Is it possible to crash Amnesia if...
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#1
[QUESTION]Is it possible to crash Amnesia if...

...my script tries to do a lot of things with entities that don't exist?

My computer seems to be running just fine, but a beta-tester crashed (blackbox) upon loading a map, that he had already been at.

When looking at the .log file, I was trying to do stuff with objects that don't exist, and I'm aware of this.
But could it cause a blackbox crash?

Trying is the first step to success.
01-29-2015, 05:44 PM
Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#2
RE: [QUESTION]Is it possible to crash Amnesia if...

I'm not sure, but that doesn't sound very optimized if it's trying to do a lot of things with entities that don't exist.

But I haven't seen the code so I couldn't tell you.


My immediate assumption is that YES that would cause at the very least a lot of errors, I don't think it's good practice to do this.

Unity crashes if I mess with things that don't exist at least.

01-29-2015, 06:00 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: [QUESTION]Is it possible to crash Amnesia if...

Weird thing is, I just played through the thing, and didn't get a single crash

Trying is the first step to success.
01-29-2015, 06:06 PM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#4
RE: [QUESTION]Is it possible to crash Amnesia if...

This sounds familiar to me, although I'm not sure if it's exactly the same...

HPL2 is designed to handle when an entity doesn't exist, but writing a warning to the log takes up resources.

For a while I was getting a recurring crash with Second Dimension, always on loading a new map. The weird thing was that it seemed to be dependent on how long the engine was running for, nothing to do with the complexity of the map or anything like that. It also seemed to include time when the engine is frozen, i.e., the window loses focus. I figured that it must be something to do with memory, because the memory allocated to the engine was the only thing that could be changing.

SD has a timer loop that runs 30 times per second. During that loop, it was performing operations on entities that may or may not exist in the current map. I thought it would be more efficient to attempt to call an entity that didn't exist than to check whether the entity existed or not first. I forget how many times, but let's say this happened 10 times per loop. So in 1 second, there were up to 300 lines of warnings written to the log. In five minutes of testing the log could be about 100000 lines long.

tl;dr - the log was getting too big.

It turned out that, crashes aside, testing whether an entity exists is more efficient than writing a warning to the log to say that it doesn't. I made lots of changes that reduced the number of warnings in general, and got a big performance boost and little to no crashes. (I'm still working on this optimisation - obviously the goal is zero crashes.)

Could your problem be similar to this?

(This post was last modified: 01-29-2015, 11:42 PM by MrBehemoth.)
01-29-2015, 11:39 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: [QUESTION]Is it possible to crash Amnesia if...

I don't know.

I had another friend do the exact same thing guy number 1 did. No problems. No crashes.


I'm mostly thinking something is wrong with the files on guy number 1's computer, but I honestly don't know.

Trying is the first step to success.
01-30-2015, 12:17 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#6
RE: [QUESTION]Is it possible to crash Amnesia if...

Maybe the error is because the tester didn't have some necessary stuff?

"Veni, vidi, vici."
"I came, I saw, I conquered."
01-30-2015, 08:36 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: [QUESTION]Is it possible to crash Amnesia if...

(01-30-2015, 08:36 AM)Julius Caesar Wrote: Maybe the error is because the tester didn't have some necessary stuff?

That seems weird, since the tester already had visitted the map before, with no crash, right?

Trying is the first step to success.
01-30-2015, 05:42 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: [QUESTION]Is it possible to crash Amnesia if...

(01-30-2015, 05:42 PM)FlawlessHappiness Wrote:
(01-30-2015, 08:36 AM)Julius Caesar Wrote: Maybe the error is because the tester didn't have some necessary stuff?

That seems weird, since the tester already had visitted the map before, with no crash, right?

That is weird. Usually something goes wrong in Windows or something and maybe that's the cause.

Sometimes, if I start up the Level Editor, it will say that I don't have OpenAL installed, then once it's closed, I open it up and nothing appears. Windows had a brainfart :/

"Veni, vidi, vici."
"I came, I saw, I conquered."
01-31-2015, 02:56 AM
Find




Users browsing this thread: 2 Guest(s)