Author Topic: Debug error due to heap corruption  (Read 2003 times)

0 Members and 1 Guest are viewing this topic.

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Debug error due to heap corruption
Woutersmits has said he got heap corruption errors while running the debug executable of FS2_Open. Are there any ways to solve this?

[attachment stolen by Russian hackers]
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
Please post your fs2_open.log file.  Instructions on how to do this can be found in this post.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
Woutersmits said there's no fs2_open.log file to post here.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
I'm pretty sure that a log is there. Make sure that you follow the instructions in the thread I linked to.

When does the crash happen? Right at game start or during a mission?

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
The crash happened right at game start, not during amission, as Woutersmits seen it. He executed it, but without logs.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 
Re: Debug error due to heap corruption
i still need help here

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
Without a debug log there isn't much I can do without having the mod data you are using. If you can narrow down which option or table entry of FSO causes that error it would help me find the cause of this bug.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
It's something to do with heap corruption, not option or table entry of FSO.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
Yes ... that's what the error says...

It obviously has something to do with how you use FSO since it doesn't happen for anyone else or we would already know about it. When did this error start to appear? Which build are you using and did you change something when the error first appeared?

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
It first appeared when Woutersmits tried on the Shattered Stars TC mod independent of the FreeSpace 2 directory. Anywhere.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline Black Wolf

  • Twisted Infinities
  • Global Moderator
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: Debug error due to heap corruption
Well, does that not suggest an asset problem might be the cause then?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
I think it could be the absence of required Interfaces is the problem.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
That statement does make absolutely no sense. Without any idea of what asset or FSO option causes this issue there is no way to find a solution for this.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
However, as for all of you involved aside from me and Woutersmits, I suspect there's something I missed during my TC asset creation. I guess this is something which would need to be addressed at the forum's Help Wanted section though (to get help from others), and for that matter this discussion should probably be closed.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Debug error due to heap corruption
Might want to check the \data folder in the main FS2 folder, or use something like Everything and search for fs2_open.log (it will find it instantly after performing an index of your drive).

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
Might want to check the \data folder in the main FS2 folder, or use something like Everything and search for fs2_open.log (it will find it instantly after performing an index of your drive).
Woutersmits says there's no log there. There must be some problem deep within the code itself. I think replacing malloc with calloc is one of the solutions, but I doubt this will help.

EDIT: To anyone who's unheard of heap corruption, here's the definition: a program attempts to allocate memory after it's been freed. the heap is corrupted long before the release of a block of memory. the fault occurs on a subsequent block of memory. adjacent memory blocks are used.
« Last Edit: July 03, 2017, 11:48:52 am by Bryan See »
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
[...] I think replacing malloc with calloc is one of the solutions, but I doubt this will help.
Stop using words of which you have no idea what they mean. calloc simply initializes allocated data with zero. The problem here has to do with corrupting the heap memory somehow which is something completely different.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
I think it's obvious. I think Woutersmits have to download the entire FSO source code from Github and debug it from Visual Studio. The developers would guide him from there.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Debug error due to heap corruption
Please post your fs2_open.log file.  Instructions on how to do this can be found in this post.
Here is the fs2_open.log file when it crashed due to heap corruption error - namely, writing memory after heap buffer.

[attachment stolen by Russian hackers]
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 211
Re: Debug error due to heap corruption
That log shows that the game was exited successfully without any error. Are you sure that the error actually occurred when that log was created?