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


I can compile it, but it crashes...
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#1
I can compile it, but it crashes...

So I got it all compiled, and got a Penumbra.exe, but it just crashes.

I copied it to my Penumbra: Overture game folder.




I don't really know what's wrong, or how I could possibly find out.



I had to ignore TaskKeyHook.lib though. Perhaps that's the problem? I have no idea what it is, or where to get it? It's not included in the source. Another deprecated Windows SDK library perhaps?

Edit: Oh... It's part of the HPL1Engine... TaskKeyHook.h

[Image: 16455.png]
05-14-2010, 07:47 PM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#2
RE: I can compile it, but it crashes...

game folder? or the redist folder? It needs to be in the same folder where the resources.cfg file is.

Also look at the hpl.log that is generated in the Game folder in your "Documents And Settings" folder.

All errors are only logged to the hpl.log :-D

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-14-2010, 07:50 PM
Website Find
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#3
RE: I can compile it, but it crashes...

(05-14-2010, 07:50 PM)Urkle Wrote: game folder? or the redist folder? It needs to be in the same folder where the resources.cfg file is.

Also look at the hpl.log that is generated in the Game folder in your "Documents And Settings" folder.

All errors are only logged to the hpl.log :-D

I'm placing it where the original Penumbra.exe is.

There's no log created...

I just launch the executable, and "Penumbra.exe has stopped working" pops up.

That's it.


Here's my executable: http://www.treesoft.dk/penumbra/Penumbra.zip

[Image: 16455.png]
05-14-2010, 07:57 PM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#4
RE: I can compile it, but it crashes...

I've removed the TaskKeyHook stuff as it wasn't even being used anymore.

Try building a debug build for windows and configuring Visual Studio to install and debug the binary to see where it crashes.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-14-2010, 08:21 PM
Website Find
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#5
RE: I can compile it, but it crashes...

(05-14-2010, 08:21 PM)Urkle Wrote: I've removed the TaskKeyHook stuff as it wasn't even being used anymore.

Try building a debug build for windows and configuring Visual Studio to install and debug the binary to see where it crashes.

It crashes before it reaches
int hplMain(const tString& asCommandLine)

I placed a Sleep(10000); and it still crashes instantly.


Edit: I just compiled a debugging executable. It's failing in OAL_LoggerObject.cpp

In function
wstring BuildLogFilename ( const string& asFilename )
When it's returning... Access violation...

[Image: 16455.png]
05-14-2010, 08:33 PM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#6
RE: I can compile it, but it crashes...

OK.. That's odd.. Step through that function and see what is returning bad data. I've personally only tested the non-windows branch of that function..

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-14-2010, 08:58 PM
Website Find
Thomas Offline
Frictional Games

Posts: 2,634
Threads: 184
Joined: Apr 2006
Reputation: 68
#7
RE: I can compile it, but it crashes...

Might also be that the OALWrapper is not compiled correctly or something like that and that the function it tries to access does not exist.

Add all OALWrapper cpp files to the HPL1 project and build it that way (in case you are not already doing so).

Otherwise just do what Urkle said and try and nail it down. Might also wanna just do a sepperate project where u only try and run the OALWrapper.
05-14-2010, 09:13 PM
Find
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#8
RE: I can compile it, but it crashes...

(05-14-2010, 09:13 PM)Thomas Wrote: Add all OALWrapper cpp files to the HPL1 project and build it that way (in case you are not already doing so).

Still the same. hmm... I'll make a small video.

Edit: Nevermind... I included it in a copy project I then deleted... lol... It seems to work now... at least it executes code it didn't before.


Well, at least it launched... I got a black screen... Then a mouse, then a "LOADING" text, and then a crash.


Here's the log:
Quote:-------- THE HPL ENGINE LOG ------------

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 haptic module
Creating scene module
--------------------------------------------------------

Initializing Resources Module
--------------------------------------------------------
Creating resource managers
Misc Creation
--------------------------------------------------------

Initializing Graphics Module
--------------------------------------------------------
Init low level graphics
Setting video mode: 800 x 600 - 32 bpp
Init Glee...OK
Setting up OpenGL
Max texture image units: 32
Max texture coord units: 8
Two sided stencil: 1
Vertex Buffer Object: 1
Anisotropic filtering: 1
Max Anisotropic degree: 16
Multisampling: 1
Vertex Program: 1
Fragment Program: 1
NV Register Combiners: 1
NV Register Combiners Stages: 8
ATI Fragment Shader: 0
Creating graphic systems
Creating Renderer2D
Renderer2D created
Creating Renderer3D
Load Renderer3D gpu programs:
Extrude
CG: 'ShadowExtrude_vp.cg' using profile: 'vp40'
CG: 'ShadowExtrude_fp.cg' using profile: 'fp40'
Diffuse Vertex
CG: 'Diffuse_Color_vp.cg' using profile: 'vp40'
Diffuse Fragment
CG: 'Diffuse_Color_fp.cg' using profile: 'fp40'
Fog
CG: 'Fog_Solid_vp.cg' using profile: 'vp40'
CG: 'Fog_Solid_fp.cg' using profile: 'fp40'
Creating fog textures: Solid Additive Alpha
CG: 'refract_vp.cg' using profile: 'vp40'
CG: 'refract_fp.cg' using profile: 'fp40'
CG: 'refract_special_fp.cg' using profile: 'fp40'
init sky box
Renderer3D created
Creating screen buffers size 800.000000 : 600.000000
Creating programs
CG: 'PostEffect_Blur_vp.cg' using profile: 'vp40'
CG: 'PostEffect_Blur_Rect_fp.cg' using profile: 'fp40'
CG: 'PostEffect_Blur_2D_fp.cg' using profile: 'fp40'
CG: 'PostEffect_Bloom_vp.cg' using profile: 'vp40'
CG: 'PostEffect_Bloom_fp.cg' using profile: 'fp40'
CG: 'PostEffect_Motion_vp.cg' using profile: 'vp40'
CG: 'PostEffect_Motion_fp.cg' using profile: 'fp40'
CG: 'PostEffect_DoF_vp.cg' using profile: 'vp40'
CG: 'PostEffect_DoF_fp.cg' using profile: 'fp40'
RendererPostEffects created
Adding engine materials
--------------------------------------------------------

Initializing Sound Module
--------------------------------------------------------
Initializing OpenAL.
Trying to open software device... Success!
Device name: Generic Software
Number of mono sources: 32
Vendor name: Creative Labs Inc.
Renderer: Software
OpenAL Version Supported: 1.1
EFX: 0
Output Devices:
Generic Hardware
Generic Software
--------------------------------------------------------

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

User Initialization
--------------------------------------------------------
WARNING: Language entry 'EventKeyInNoPower' in category '01_10_small_shaft' already exists!
Initializing Penumbra: Overture
Version $Rev: 3013 $
Date $Date: 2010-02-06 22:45:08 +0000 $
Checking Supported Profiles
Profile CG_PROFILE_VP20 is supported
Profile CG_PROFILE_FP20 is supported
Profile CG_PROFILE_VP30 is supported
Profile CG_PROFILE_FP30 is supported
Profile CG_PROFILE_VP40 is supported
Profile CG_PROFILE_FP40 is supported
Profile CG_PROFILE_ARBVP1 is supported
Profile CG_PROFILE_ARBFP1 is supported
Profile CG_PROFILE_GLSLV is supported
Profile CG_PROFILE_GLSLF is supported
Profile CG_PROFILE_GLSLC is supported
Trying to load vertex program!
CG: 'Test' using profile: 'vp40'
Success!

Window's crash report:
Quote:Problem signature:
Problem Event Name: BEX
Application Name: Penumbra.exe
Application Version: 0.0.0.0
Application Timestamp: 4bee6e2d
Fault Module Name: MSVCR90.dll
Fault Module Version: 9.0.30729.4926
Fault Module Timestamp: 4a1743c1
Exception Offset: 0006c955
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.1.7600.2.0.0.256.4
Locale ID: 1030
Additional Information 1: b164
Additional Information 2: b16455ab78c8940c1f0d85ec24e984a8
Additional Information 3: 5dee
Additional Information 4: 5deea4f024be0715fdaf1965c5b7387a

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=1...cid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt



Edit: I've been trying to nail it down. It's apparently somewhere in
bool cInit::Init(tString asCommandLine)
In here
mpPlayer = hplNew( cPlayer,(this) );
When reaching line 1256 in MeshLoaderColladaLoader.cpp
cString::FloatStringToArray(&vRawData[0],pVecText->Value(),lSize * 3);

When I try to step over that line, I get this:
Quote:Microsoft Visual Studio C Runtime Library has detected a fatal error in Penumbra.exe.

Press Break to debug the program or Continue to terminate the program.

After some testing... It seems any reference to vRawData is causing the error. hmm...


Hmm... I fixed it by uncommenting the code just above instead... I guess that was the original code, which was then swapped with a more optimal solution?

Yup... At least I got to the main menu... I'm gonna do some testings...

Anyone got a way to fix it, so I don't have to use unoptimized code?


Edit: And crashes while loading a level Tongue

Edit: All fixed now Smile


Edit: Now it crashed... Mid-game Tongue

Hmm... My build is pretty unstable, lol.



I better find a way to fix the FloatStringToArray(); 'cause the lighting in my build is very poor, and it crashes randomly.


My compilations must be really bad... The random crashes I get is from
void iPhysicsWorld::DestroyBody(iPhysicsBody* apBody)
in PhysicsWorld.cpp

On this line (159):
for(; it != mlstBodies.end(); ++it)

[Image: 16455.png]
05-15-2010, 10:14 AM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#9
RE: I can compile it, but it crashes...

ahh yes.. the iterators.... Those have been a royal pain in the posterior. The issue is MS does their "own" implementation of them that doesn't follow the standard that everyone else follows when it comes to how erase() works.

However, for this specific issue that's not the problem.. It just seems the iteration is done incorrectly. as it = mlstBodies.erase(it); increments it so it is being double incremented (and can skip entries).. this is a bug.. I'll make a fix and push it up. And it looks like the only place that has that issue.. Good Smile

http://github.com/FrictionalGames/HPL1En...3470adfaee

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-16-2010, 04:34 PM
Website Find
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#10
RE: I can compile it, but it crashes...

(05-16-2010, 04:34 PM)Urkle Wrote: ahh yes.. the iterators.... Those have been a royal pain in the posterior. The issue is MS does their "own" implementation of them that doesn't follow the standard that everyone else follows when it comes to how erase() works.

However, for this specific issue that's not the problem.. It just seems the iteration is done incorrectly. as it = mlstBodies.erase(it); increments it so it is being double incremented (and can skip entries).. this is a bug.. I'll make a fix and push it up. And it looks like the only place that has that issue.. Good Smile

http://github.com/FrictionalGames/HPL1En...3470adfaee

Now I get a read access violation on line 161:
void iPhysicsWorld::DestroyBody(iPhysicsBody* apBody)
{
    //STLFindAndDelete(mlstBodies, apBody);
    tPhysicsBodyListIt it = mlstBodies.begin();
    for(; it != mlstBodies.end(); ++it)
    {
161:        iPhysicsBody *pBody = *it;
        if(pBody == apBody)
        {
            if(mpWorld3D) mpWorld3D->GetPortalContainer()->RemoveEntity(pBody);
            pBody->Destroy();
            hplDelete(pBody);
            mlstBodies.erase(it);
        }
    }
}

[Image: 16455.png]
05-16-2010, 08:01 PM
Find




Users browsing this thread: 2 Guest(s)