View previous topic :: View next topic |
Author |
Message |
j clark
Joined: 29 Mar 2008 Posts: 20 Location: Bala Cynwyd (Pennsylvania)
|
Posted: Mon Jun 16, 2008 2:17 pm Post subject: Callback on Collected Delegate |
|
|
Hi. I'm back with another problem.
Starting an F95 dll in Visual Studio 2005, about half the time in debug mode and sometimes not in debug mode, I get a "Callback to Collected Delegate" exception that traces back to the ..._personal_banner() module as the little control exits.
Is there anything that can be done to suppress this behaviour? I have tried the "/NB" linker switch, but that seems to do nothing. |
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Wed Jun 18, 2008 8:51 am Post subject: |
|
|
The personal banner is our only limitation to the free version, so there is no way to supress it.
I am not sure why this is happening, the call to display the personal banner is a simple pinvoke, with no arguments and certainly no delegates - we have seen one instance of something similar before but it does not look to be a generalised problem. Could you post the full stack trace? |
|
Back to top |
|
|
j clark
Joined: 29 Mar 2008 Posts: 20 Location: Bala Cynwyd (Pennsylvania)
|
Posted: Wed Jun 18, 2008 12:18 pm Post subject: More details |
|
|
Good morning Andrew.
Once again, the immutable laws of the universe, such as quantum entanglement and s*** happens, take hold. I've tried a dozen times and cannot get it to fail. But there are 2 facts that may help.
1) The exception usually happens after I have made changes to the programs and the run-time has to do it's JITting thing. Probably what one would expect. In fact, I'm not sure it has ever happened restarting the application without changes.
2) The entire project (the dll) is itself a delegate. It is called by the Print Page event handler. Because it is re-entered for each page printed and the state of pretty much everything must be preserved, the SAVE command is used. It's complex, but once it gets past the banner, it runs like clockwork.
I hope this helps, but when I make more changes and it dumps, I'll post the output. Thanks. |
|
Back to top |
|
|
j clark
Joined: 29 Mar 2008 Posts: 20 Location: Bala Cynwyd (Pennsylvania)
|
Posted: Thu Jun 19, 2008 6:40 pm Post subject: |
|
|
Here is the console output when the exception occurs. (The first 4 lines are normal program output):
Waiting for a connection...
Waiting for a connection...
Selected Printer is HPP3005
Requested Program is Purchase Order
System.AccessViolationException: Attempted to read or write protected memory. This is ofte
n an indication that other memory is corrupt.
at Salford.Fortran.RTLibrary.__display_personal_banner()
at Salford.Fortran.RTLibrary.DisplayPersonalBanner()
at Forms.PURCHASE_ORDER(Int16* more_pages) in C:\vs2005\Sources\PurchaseOrder.F95:line
7
at Forms.PurchaseOrder(Int16& )
at VMSPrinting.Printing.PageMaker(Object sender, PrintPageEventArgs e) in C:\vs2005\Pro
jects\VMSPrintServer\CsLibrary\PrintMethods.cs:line 52
Purchase Order Completed.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at VMSPrinting.Client.RecvPacket(Byte[] buffer) in C:\vs2005\Projects\VMSPrintServer\Cs
Library\ClientMethods.cs:line 74
System.Exception: Receive Failure
at VMSPrinting.MainThread.Processor(Object anything) in C:\vs2005\Projects\VMSPrintServ
er\CsLibrary\Processor.cs:line 38 |
|
Back to top |
|
|
|