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

(MinGW) Angelscript Crashing at Callfunc
someone972 Offline

Posts: 57
Threads: 4
Joined: May 2012
Reputation: 1
RE: (MinGW) Angelscript Crashing at Callfunc

After some fishing around in IDA Pro, I think I've found what is wrong. The function that is being called does not properly setup the base stack pointer when compiled with MinGW, so the arguments it tries to access are garbage. I'm experimenting with modifying the assembly code to push the base stack pointer and move the current stack pointer into ebp. Hopefully that will fix the problem.

EDIT: I can confirm that adding "pushl %ebp \n" and "movl %esp, %ebp \n" to the beginning of the x86 inline asm function calls and adding "popl %ebp \n" to the end did indeed fix the problem I was having. The game now loads and runs fine. It took a lot of library compiling and a couple changes to the code, but I finally got Penumbra to compile and work successfully with MinGW and Code::Blocks Big Grin .
(This post was last modified: 05-02-2012, 08:04 AM by someone972.)
05-02-2012, 07:37 AM
Find Reply

Messages In This Thread
RE: (MinGW) Angelscript Crashing at Callfunc - by someone972 - 05-02-2012, 07:37 AM

Users browsing this thread: 1 Guest(s)