2D array becoming "deallocaded"

This is a discussion on 2D array becoming "deallocaded" within the C Programming forums, part of the General Programming Boards category; Hello. I'm having trouble with a structure that points to a dynamically allocated 2D array. For some reason, after I ...

2D array becoming "deallocaded"

Hello. I'm having trouble with a structure that points to a dynamically allocated 2D array. For some reason, after I allocate the array, it becomes "deallocated" in the middle of the program.

I have a pointer to a structure which has a pointer to a 2D array. The full program gives a bus error, which happens when I try to access a cell in the structure's array. I've removed a bunch of the code that actually does stuff for this post. I can still see though where the problem is coming from through the debugger (I just have no clue why it's there!)