User forums > Using Code::Blocks
SIGFPE crash when debug Excel dll
BlueHazzard:
--- Quote from: DrOli on February 01, 2016, 04:54:28 pm ---FYI, have just dloaded/installed the just released CB 16. It also fails with SIGFPE exactly as before when attempting to do debug Excel/DLL's etc.
--- End quote ---
As i mentioned i don't think that this is a problem of codeblocks, but a problem with gdb and how it handles signals. So i would recommend you to search help in a gdb forum, or on the gdb mailing list. They can help you more.
You may also look at this:
http://stackoverflow.com/questions/15662810/gdb-catching-a-signal-and-continue-debugging
https://www.gnu.org/software/gsl/manual/html_node/Handling-floating-point-exceptions.html
http://fpc-devel.freepascal.narkive.com/klJ6iOWq/hot-to-handle-sigfpe-sigsegv-using-gdb-as-debugger
--- Quote from: DrOli on February 01, 2016, 04:54:28 pm ---BTW, on a separate note, and I hope this is not too cheeky, I am trying to get some sort of listing/display to show up in a View or Toolbar that shows all the Subroutines/Functions in the currently displayed file (all Fortran 90/95 etc, usually Modules). Ideal also to be able to navigate between them, etc. I wasn't sure if that would be the job of the "Symbol Browser" (it did not work for me) or ???. Is there such a feature in CB? How is it launched? ... Perhaps there is a post for this.
--- End quote ---
This is the code completition plugin (with the symbols tab as you have found), and should work. Have you checked if the right "View" is selected (in the symbol tab is a drop down menu)? At least it works with c/c++ i don't know if fortran has an cc that supports symbols...
greetings
DrOli:
Many thanks for that, it was helpful, and have made at least some progress:
1) SIGFPE: the 2nd link you had kindly provided inspired a guess (I am "math geek" not an "IT geek", so some of this is in the "nether regions" for me). Notably, I put the expression
handle SIGFPE nostop
into the Settings/Debugger "Debugger Initialization commands" field, for each Debugger ( default/x86/i686, just in case) ... on a hunch.
This works, more or less. CB/debugger still crashes sometimes (e.g. sometimes when a breakpoint is set), and it still throws various complaints at various times ... still, it is a massive improvement over "attach" etc.
2) Symbol Browser: Yes I get the Symbol Browser tab/categories etc, just no symbols (with Fortran) files. Yes, it does work with my C projects, the Symbol Browser tab shows the expected things. This was not entirely unexpected. For example, with older MSDev IDE's working with Fortran, one had to ask the "machine/IDE" explicitly to create a special browser file on Build, and it would produce a ".PDB" file, which then could be used with MSDev for at least some listing/navigation for Fortran.
So, I thought there might be some "hidden switch" to create a ".PDB" equivalent in CB.
... it sounds like not, and so it seems no joy for Fortran ... perhaps this might go on a "wish list".
A couple of points:
1) Please please please, de-couple this from "code completion". I hate code completion, I just need the symbol browser.
2) There are various times at which the CB interface "re-locates focus" (without indication) to a portion NOT currently under the cursor. Then, when using a mouse wheel (expecting the portion where the cursor is) to scroll, instead that "not in focus" portion scrolls. Sometimes this is just annoying, but at other times it can become more serious. For example, when I tested one of my C projects with the CB Symbol Browser, I scrolled the wheel while the cursor was over the "symbols", but instead CB scrolled the drop-down field which selects the scope of the symbols. So, I had it set to "my project", and on its own, it scrolled to "everything" ... and then of course, CB when off to never-never-land for a long time while it sorted the symbols for every single bit of code in any way associated with that C project.
... I am guessing a simple solution is for CB to be a bit more diligent in checking/re-checking the cursor location and the implied "object in focus", perhaps another item for the wish list.
Once again, many many thanks for your prompt and helpful efforts.
DrOli:
As a follow-up, it appears that the Excel/Fortran/DLL debuging process also has serious difficulties when large arrays are involved (e.g. 50 meg).
I don't know enough to decide if this is a CB issue or a GDB issue (or ???). In short,
1) CB/GFortran/DLL debugging works with the settings discussed previously, at least for "normal" size arrays/vars
2) I have set -Wl,--stack,52800000 in the linker settings (I also use OpenMP, not sure what difference that makes to this issue, but the problems exist for both OpenMP and non-OpemMP code).
3) Everything works in Release mode, and also in Debug "run" mode, at least until I try to set break points in s/r's that pass/use large arrays etc. Then and or all of the following occurs:
a) CB "goes off into the ether" for a very long time, sometimes crashing CB outright, sometimes crashing Excel, etc, resulting with SIGFPE
At various times, the CB GUI itself does weird things (border changes colour), and generally has the feeling of "not responding" etc.
b) I started experimenting with the array sizes. If I set small enough arrays, all seems well. As I increase the array sizes, trying to stop at break points becomes increasingly difficult/time consuming (with much CB cpu/mem usage "whirling and twirling"). At sufficiently small array sizes, even with difficulties, CB can eventually complete the calc (though not stopping at break points in any predictable way, as I click the continue icon). At large enough array sizes, the full crash occurs ... sometimes requiring CB to be "end process" from TaskManager, etc.
Is there some internal limit in CB or GDB etc? If so, how/where can that limit be changed?
Many thanks
DrO
oBFusCATed:
Add this "set print elements 200" to the initial commands in the debugger settings and should fix the problem.
DrOli:
Cheers, that fixed it.
My gut suggested that it might be a "watch window thing", and this fix appears to limit the number of items per watch window var. Is that correct? Does the setting do anything else?
BTW, on a related point, though I am not sure if this should be in a different thread: I have tried to link in ArrayVisualizer (AV) for "watching" array var's during debug, but I have no idea how to link a watch var to AV (the Tools set up does not have an obvious option for this). I have tried a few things, and did a search, but no joy.
Also, when watching vars that are of a User Defined Type, the CB watch just presents, effectively, the "flat array block representation". Is it possible for the Watch viewer to have a "Tree" or "structure relevant" view/format?
Many thanks
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version