- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
===========================
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
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
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!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page