Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Debug Assertion Failed

longden_loo
Beginner
1,880 Views
I recently started getting these messages (below) during runtime ...
===========================
Debug Assertion Failed!
Program: ....blahlahlahmygui.exe
File: isctype.c
Line: 68
Expression: (unsigned)(c + 1) <= 256
For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
============================

This is a GUI app that's a mixture of C and Fortran that seems to run fine when compiled in VS 6 with CVF, but gets these errors when built under .NET with IVF.

Any suggestions? I see other postings about debug assertion failures, but wasn't sure if they were related since mine consistently refers to isctype.c. Is this a possible mismatch in the C/C++ debug libraries used during link?

Thx, Longden
0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,880 Views
That's coming from your C code - it's not necessarily a Fortran issue. Since you're converting from CVF, did you take care to match the calling mechanisms? CVF uses STDCALL and IVF uses C by default. If not, you can corrupt the stack and cause all sorts of mayhem.
0 Kudos
longden_loo
Beginner
1,880 Views
Yes, we did the conversion from STDCALL, and I believe we got them all, but wouldn't a mismatch have revealed itself as a build error anyway? Our builds are OK, even with this runtime debug assertion failure message.
0 Kudos
Steven_L_Intel1
Employee
1,880 Views
It depends on how you did it - if you had been using ALIAS that could mask a build error.

What I'd recommend is letting it stop in the debugger and see what it's complaining about. Sometimes when you have a mixed Fortran-C application and use the debug libraries. the C side doesn't understand that Fortran might not have freed everything, but it doesn't sound as if that's the issue here.
0 Kudos
longden_loo
Beginner
1,880 Views
Thanks, the debug suggestion helped.

I had tried that earlier but the code was a program that loaded another DLL and both were created using different solutions, so for some reason I was only getting a partial stacktrace. I rebuilt both parts (.exe and .dll) and was able to get a full stacktrace which showed a coding error in the DLL portion which I now fixed (an attempt to use isspace() on the first element of an empty and uninitialized Fortran array). Thx again Steve!
0 Kudos
Reply