Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
(MinGW) Angelscript Crashing at Callfunc
Author Message
someone972 Offline
Member

Posts: 55
Joined: May 2012
Reputation: 1
Post: #2
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 all posts by this user Quote this message in a reply
Post Reply 


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



User(s) browsing this thread: 1 Guest(s)