- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a DLL compiled with DVF 6.1A.
When called from a Visual Basic front end it will sometimes fail with an overflow error. When I set the debugger to break on all overflows (FP & integer) I never hit such a break point - the code will still fail, but will always return to the VB.
The failure occurs after (say) 7,000 time steps (solving a system of differential equations), so single-stepping gets a bit tedious - there are also c. 1300 equations, so single-stepping through the equations also gets a bit tedious.
The problem does not always occur, so it is tied in (I think) with the specific numbers on the problem cases - and I don't know what numbers are causing the problem.
Does anyone have advice as to what I can do to better trap the problem?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well assuming more breakpoints or 'run to cursor' doesn't help you can always fall back on the old methods of inserting appropriate write statements (or messageboxes for windows code) into your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
The problem turned out to be a divide by zero that returned NaN to the Visual Basic; and Visual Basic in its turn handled this as an overflow error on the wrong variable.
Roughly speaking, I had code of the form
CALL EquationSolver(t, y[], dy[])
IF t at report point THEN
do stuff with y[]
END IF
The NaN was in y[], and the overflow error was reported at the
IF t
statement.
Last time I had this kind of problem was when the Fortran code addressed an array out of bounds, so I had searched the code for that.

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