User forums > Using Code::Blocks

SIGFPE crash when debug Excel dll

(1/6) > >>

DrOli:
I have set the Project "programmes arguments" so that on debug the current code (which is a Fortran DLL/Excel Add In) first launches Excel, and a particular XLS file that relies on the source Fortran loaded in C::B.

On clicking the Debug process (red arrow/triangle), the debug appears to begin, it starts to launch Excel, however it crashes before Excel completes its launch.  The Crash is a SIGFPE (arithmetic fault) raised be kernel32.dll, following msvbvm60.dll.

This exact some process works correctly when the dll/debug is launched from any of CVF/Intel/VisualStudio etc.

To be clear, it never makes it back to C::B or any lines in the source.

I have tried it with a couple specific xls's, and also without any xls, just Excel on its own.  Always the same crash, at the same point.

I would be grateful for any assistance as without this facility the entire C::B/GCC/MingW strategy is shot ... and I would like to move away from the commercial compilers.

BlueHazzard:
This is probably a problem with gdb...

you can try to update gdb, or use CDB instead

you can try to run excel trought gdb without c::b, if this works, it would be great if you can post the output from gdb...

oBFusCATed:
Another option is to use the Debug -> Attach instead of starting Excel under gdb control.

DrOli:
OK, I tried CDB vs GDB, as well as all of the permutation of the GDB's (Default, i686, x86) etc. ... NO JOY.  It always crashes CB/MingW etc in exactly the same way.

I tried the "attach" route also, but after entering the PID, and saving etc, on trying to run it told me that I must choose a PID, and on checking the previously entered PID had disappeared ... I repeated this a few times, always with the same results, again NO JOY.

Once again, and from earlier, when I do this same process with Visual Studio/CVF/IVF etc, it always works (Excel launches from the debugger, and activating DLL Funcs in sheets etc causes entry back into the IDE/source).

Also, on an earlier (non-DLL) project,  I had tested CB/MingW with "console/GUI" code, where debugging worked, more or less ... so it may be something special in relation to DLL's/Excel etc ... but no idea really.

A few other really weird things are noticeable.  For example, the DLL works in Debug compile mode (not running gdb), but Excel crashes with the Release mode of the exact same DLL as soon as one of that DLL's funcs is attempted to be calc'd.

By contrast, both Debug and Release formats from VS etc work as expected.

This is all on WinXP64, using the 32bit MingW64 4.9.1 machinery with gdb 7.81.

... I am a little apprehensive about updating MingW etc, since I had used that to build GTK etc etc, which was very difficult due to the many version collisions/issues ... so I'd rather not have to install a new MingW etc, and the lose some months getting everything else to work.

I attach the CB (crash) log:

Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\FORTRAN\Climate\Hitran1\
Adding source dir: E:\FORTRAN\
Adding file: D:\Apps\MSO\Office10\EXCEL.EXE
Changing directory to: E:/FORTRAN/Climate/Hitran1/.
Set variable: PATH=.;D:\Apps\MingW\mingw32\bin;D:\Apps\MingW\mingw32;C:\Documents and Settings\All Users\Application Data\Oracle\Java\javapath;D:\Apps\Winteracter\bin;d:\Apps\MsDev\Common\TOOLS;d:\Apps\MsDev\Common\MSDEV98\BIN;d:\Apps\MsDev\DF98\BIN;d:\Apps\MsDev\VC98\BIN;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ART\ARTLibXL;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn;C:\Program Files\Microsoft SQL Server\90\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn;D:\Apps\GhostScript\gs\gs9.10\lib;D:\Utilities\Universal Extractor;D:\Apps\Intel\IDB\9.1\IA32\Script;D:\Apps\Intel\Compiler\Fortran\9.1\IA32\Bin;D:\Apps\Intel\Compiler\Fortran\9.1\em64t\bin;D:\Apps\Intel\IDB\9.1\EM64T\Script;D:\Apps\AMD\CodeAnalyst\bin;C:\Program Files (x86)\AMD\CodeAnalyst\bin;D:\Apps\MingW\local32\bin;D:\Apps\MingW\msys\1.0\bin;D:\Apps\CMake\bin
Starting debugger: D:\Apps\MingW\mingw32\bin\gdb.exe -nx -fullname  -quiet  -args D:/Apps/MSO/Office10/EXCEL.EXE
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Reading symbols from D:/Apps/MSO/Office10/EXCEL.EXE...(no debugging symbols found)...done.
Debugger name and version: GNU gdb (GDB) 7.8.1
Child process PID: 192
Program received signal SIGFPE, Arithmetic exception.
In RaiseException () (C:\WINDOWS\syswow64\kernel32.dll)


By contrast, a comparable (successful) Log from VS is:

Loaded 'D:\Apps\MSO\Office10\EXCEL.EXE', no matching symbolic information found.
Loaded 'not_an_image', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\ntdll32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\secur32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\user32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\ole32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\shimeng.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\apphelp.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\AppPatch\acgenral.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\shlwapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\winmm.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\oleaut32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msacm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\userenv.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\uxtheme.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\wow64_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.5190_x-ww_B8C2A5B7\comctl32.dll', no matching symbolic information found.
Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\Office10\MSO.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msctf.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msctfime.ime', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\ctagent.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\clbcatq.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\comres.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msimtf.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\xpsp2res.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\setupapi.dll', no matching symbolic information found.
Loaded 'D:\Apps\MSO\Office10\Library\Analysis\ANALYS32.XLL', no matching symbolic information found.
Loaded 'D:\Apps\MSO\Office10\Xlcall32.dll', no matching symbolic information found.
Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\Office10\RICHED20.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\sxs.dll', no matching symbolic information found.
Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL', no matching symbolic information found.
Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\1033\VBE6INTL.DLL', no matching symbolic information found.
Loaded 'D:\Apps\Adobe\Acrobat 9.0\PDFMaker\Office\PDFMOfficeAddin.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcp80.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcr80.dll', no matching symbolic information found.
Loaded 'D:\Utilities\SnagIt 7\SnagItOfficeAddin.dll', no matching symbolic information found.
Loaded 'D:\Utilities\SnagIt 7\SnagItOfficeAddinRes.dll', no matching symbolic information found.
Loaded 'D:\Utilities\SnagIt 7\msvcr71.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.5190_x-ww_D21E1F39\comctl32.dll', no matching symbolic information found.
Loaded 'D:\XL AddIns\CodeCleaner\VBACodeCleaner.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msvbvm60.dll', no matching symbolic information found.
Loaded 'C:\Program Files (x86)\Common Files\Designer\MSADDNDR.DLL', no matching symbolic information found.
First-chance exception in EXCEL.EXE (KERNEL32.DLL): 0xC000008F: Float Inexact Result.
First-chance exception in EXCEL.EXE (KERNEL32.DLL): 0xC000008F: Float Inexact Result.
First-chance exception in EXCEL.EXE (KERNEL32.DLL): 0xC000008F: Float Inexact Result.
Loaded 'D:\Apps\Adobe\Acrobat 9.0\Acrobat\Adist.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\comdlg32.dll', no matching symbolic information found.
Loaded 'D:\Apps\Adobe\Acrobat 9.0\Acrobat\Adist.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\comdlg32.dll', no matching symbolic information found.
Loaded 'D:\Apps\Adobe\Acrobat 9.0\Acrobat\Adist.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\comdlg32.dll', no matching symbolic information found.
Loaded 'E:\C Work\ARTLibXLCore\CallerDims.xll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\oleacc.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\FM20.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\comdlg32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\linkinfo.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\ntshrui.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\netapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\FM20ENU.DLL', no matching symbolic information found.
Loaded 'D:\Apps\MSO\OFFICE11\REFEDIT.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\asycfilt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\wintrust.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\crypt32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msasn1.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\imagehlp.dll', no matching symbolic information found.
The thread 0x744 has exited with code 1 (0x1).
Loaded 'E:\FORTRAN\ARTLibXLCore\Add-In\ARTLibXLCore.xll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\mfc71d.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\msvcr71d.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\MFC71ENU.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\wininet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\normaliz.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\urlmon.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\iertutil.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\iphlpapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\psapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\ws2_32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\ws2help.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\DFORMDD.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\MSVCRTD.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\wsock32.dll', no matching symbolic information found.
Loaded 'E:\FORTRAN\ARTLibXLCore\Add-In\FuncNmXL.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\mlang.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\SysWOW64\hlink.dll', no matching symbolic information found.

... this too has a "float inexact" error, but seems to survive it somehow, and works.

DrOli:
I have also found a win binary of gdb ver 7.9 ... exactly the same results with that too.

Navigation

[0] Message Index

[#] Next page

Go to full version