DebugStop() stopped working !?
BlitzMax Forums/BlitzMax Programming/DebugStop() stopped working !?
| ||
Ok I have an incredibly weird issue... after months of coding on my project and probably near 100,000 lines of code DebugStop() has stopped working in certain situations. I have tried it in blide and MaxIDE and the debugger "starts" but doesn't halt execution. Now I can't reproduce this error or provide source code here (doh!) so I guess I am asking if anyone has any experience with this happening and what things it could be, what I could look for ? Last edited 2012 |
| ||
weird.. do you have debug build enabled? (just checking) |
| ||
Are you using MaxGUI? I've found I can't step through my maxgui project but I've never tried stepping through one before. |
| ||
hehe yeah had debug enabled. Also heavily using maxgui! I tracked it down to me throwing a lua_error which is destroying the stack somehow? I havn't fixed it, well its fixed if i don't call lua_error ... but I need to call that so I guess a day of hair pulling is ahead of me :) |
| ||
Well I found a solution, If I wrap my lua_pcall code in a try/catch block it at least protects the stack. No exception is being reported but it solves the issue :) ... hopefully? |
| ||
Isn't this a bug? |
| ||
lua_error: Generates a Lua error. The error message (which can actually be a Lua value of any type) must be on the stack top. This function does a long jump, and therefore never returns. I highly doubt longjmp-ing works well together with BMax (it doesn't even work in C++, where destructors won't get called). |