Frictional Games Forum (read-only)
Map Crashing Why? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Map Crashing Why? (/thread-12687.html)



Map Crashing Why? - GreyFox - 01-18-2012

Now this isn't my map I'm trying to help somebody, but his map just keeps crashing, with error crash,

Anyway to find out why it's crashing?

Thanks

-Grey Fox



RE: Map Crashing Why? - Statyk - 01-18-2012

(01-18-2012, 03:19 AM)GreyFox Wrote: Now this isn't my map I'm trying to help somebody, but his map just keeps crashing, with error crash,

Anyway to find out why it's crashing?

Thanks

-Grey Fox
You're not giving anything to work with...

- Could you give the error message that popped up?
- Is there a .hps?
- Maybe post the hpl.log in the "documents/main/hpl.log"


RE: Map Crashing Why? - GreyFox - 01-18-2012

Sorry But I've never had this problem before, so I didn't know what to post.

HPL.Log

Code:
Version 1.20 - s26ADEE0-539
-------- THE HPL ENGINE LOG ------------
Engine build ID 20101021192547

Creating Engine Modules
--------------------------------------------------------
Creating graphics module
Creating system module
Creating resource module
Creating input module
Creating sound module
Creating physics module
Creating ai module
Creating gui module
Creating generate module
Creating haptic module
Creating scene module
--------------------------------------------------------

Initializing Resources Module
--------------------------------------------------------
Creating loader handlers
Creating resource managers
Adding loaders to handlers
--------------------------------------------------------

Initializing Graphics Module
--------------------------------------------------------
Init lowlevel graphics: 1280x720 bpp:32 fs:0 ms:0 gpufmt:2 cap:'Amnesia - The Dark Descent - Loading...' pos:(-1x-1)
Setting video mode: 1280 x 720 - 32 bpp
Init Glew...OK
Setting up OpenGL
  Vendor: ATI Technologies Inc.
  Renderer: ATI Radeon HD 5700 Series
  Version: 4.1.11251 Compatibility Profile Context
  Max texture image units: 16
  Max texture coord units: 16
  Max user clip planes: 8
  Two sided stencil: 1
  Vertex Buffer Object: 1
  Anisotropic filtering: 1
  Max Anisotropic degree: 16
  Multisampling: 1
  Texture compression: 1
  Texture compression S3TC: 1
  Auto generate MipMaps: 1
  Render to texture: 1
  Max draw buffers: 8
  Max color render targets: 8
  Packed depth-stencil: 1
  Texture float: 1
  GLSL Version: 4.10
  ShaderModel 2: 1
  ShaderModel 3: 1
  ShaderModel 4: 1
  OGL ATIFragmentShader: 1
Setting up G-Bugger: type: 0 texturenum: 3
Adding engine materials
Initializing DevIL
  Vendor String: Abysmal Software
  Version String: Developer's Image Library (DevIL) 1.6.8pre Aug 12 2006
  Version Number: 168
Adding engine post effects
--------------------------------------------------------

Initializing Sound Module
--------------------------------------------------------
Initializing OpenAL
  Available OpenAL devices:
   0. Generic Software on Speakers (Logitech G35 Headset)(OpenAL default)
  Trying to open device 'Generic Software on Speakers (Logitech G35 Headset)'... Success!
  Number of mono sources: 32
  Streaming setup: 4 Buffers x 262144 bytes each
--------------------------------------------------------

Initializing Game Module
--------------------------------------------------------
Adding engine updates
Initializing script functions
--------------------------------------------------------

User Initialization
--------------------------------------------------------
--------------------------------------------------------

Game Running
--------------------------------------------------------
-------- Loading map 'menu_bg.map' ---------
    Cache Loading: 1694 ms
  Entities: 314 ms
  Compilation: 1 ms
  Total: 2024 ms
  Meshes created: 25
  Bodies created: 5
-------- Loading complete ---------
Setting profile: 'Mith' Path: 'C:\Users\Clay\Documents/Amnesia/Main/Mith/'

HPS

Code:
////////////////////////////
//Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Key_1", "mansion_3", "KeyOnDoor", true);
AddEntityCollideCallback("player","ScriptArea_1","CollideScriptArea_1", true, 1);


void CollideScriptArea_1(string &in asParent,string &in asChild,int alState)
{
    SetSwingDoorClosed("mansion_1", true, true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("mansion_3", false, true);
    PlaySoundAtEntity("", "Unlock_door", "mansion_3", 0, false);
    RemoveItem("Key_1");
}






RE: Map Crashing Why? - Statyk - 01-18-2012

The OnStart has no closing brackets, "player" should be "Player", and spaces after commas:

void OnStart()
{
AddUseItemCallback("", "Key_1", "mansion_3", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "CollideScriptArea_1", true, 1);

}


//________________________

Also, the syntax has no spaces here:


void CollideScriptArea_1(string &in asParent,string &in asChild,int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
}


Try:

void CollideScriptArea_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
}




//_________________________________

Full Replacement of .hps:



void OnStart()
{
AddUseItemCallback("", "Key_1", "mansion_3", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "CollideScriptArea_1", true, 1);
}


void CollideScriptArea_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "Unlock_door", "mansion_3", 0, false);
RemoveItem("Key_1");
}



RE: Map Crashing Why? - GreyFox - 01-18-2012

I Must've explained it wrong,

Its not one of those errors saying Expected Token or whatnot, it's an Amnesia Game Crash.

this is what it says

Amnesia.exe casued an EXCEPTION_ACCESS_VIOLATION in module MSVCR71.dll at 001B:7C3417FB, strlen()+0038 byte(s)

I just want to know if theres any way to firgure out whats causing this.

And it only happens on this guys Custom Story,
Any others work.

Thanks
Grey Fox



RE: Map Crashing Why? - Statyk - 01-18-2012

The hps is still an issue... Have you at least tried it?


RE: Map Crashing Why? - GreyFox - 01-18-2012

Yep, I Changed Everything and it still did the same crash.

Grey Fox

I fixed the problem,

He had <CATEGORY> Name="Whatever">
I removed the >

Thanks
Grey Fox