- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
David
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
testbayer.exe 0051D4C7 Unknown Unknown Unknown
testbayer.exe 004C1266 _MAIN__ 261 testdll.for
testbayer.exe 0057CAA3 Unknown Unknown Unknown
testbayer.exe 0051DB53 Unknown Unknown Unknown
testbayer.exe 0051D91D Unknown Unknown Unknown
kernel32.dll 7C816FD7 Unknown Unknown Unknown
Break on winsig.c line 419:
_VALIDATE_RETURN(("Invalid signal or error", 0), EINVAL, SIG_ERR);
/* should never happen, but compiler can't tell */
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
testbayer.exe 004C1266 _MAIN__ 261 testdll.for
Last known code of yours is line 261 in the main program.
Judging from the source file name, it's a call to a dll routine? Since the call stack does not include any dll code, it's plausible that you got the calling sequence wrong, as you suspected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Last known code of yours is line 261 in the main program.
Judging from the source file name, it's a call to a dll routine? Since the call stack does not include any dll code, it's plausible that you got the calling sequence wrong, as you suspected.
Yes, I was trying to test a DLL. However, I have now added the source files to my project, so that I have
testdll.for - main program
bayervb.f90 - visual basic interface routine with DLL EXPORT directives
bayer.for - main calculation routine, which is called by bayervb when called from Excel, but called directly from testdll in this implementation.
Excel version works perfectly. I can't get this fortran stand-alone version to work. I can't work out why the break occurs in the winsig.c routine, which is presumably part of IVF.
Thanks
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Most likely you have an automatic array that gets stack allocated by default, and you've overflowed the default 1MB stack. Presumably, Excel is built with a larger stack. You can build your EXE with a larger stack (Linker > System > Stack Reserve Size) or use Heap Arrays: 0 to have these arrays allocated dynamically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
I have the same problem with my code. I have some variables which are dynamically allocatated. They are shared by different subroutines using modules.
The program works perfect for small problems. However, as I changes the size of problem, which consequently increased the memory requirements by the variables.
I was trying to follow your advice give above, change the stack or heap reserve size, which is by defaut 0. I was wondering what values should be there?
I was looking for it but could not find it. Could you please tell me how the values should be specified, such in kb,MB or something else?
Waiting for your reply.
Regards,
Vinod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
I have already solved the problem after setting the value at 8000000.
But thanks anyway.
Regards,
Vinod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Breakpoint is trigerred inside winsig library which your code could have been linked to directly or indirectly.As Steve said the problem lies in stack overflow and it was solved in case of Vinod.
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page