DataPortal.Fetch failed (System.ArithmeticException : Overflow or under underflow in the arithmetic operation.)

DataPortal.Fetch failed (System.ArithmeticException : Overflow or under underflow in the arithmetic operation.)

Old forum URL: forums.lhotka.net/forums/t/7086.aspx


flying_monkey posted on Thursday, June 11, 2009

I am receiving this exception and I have no idea why I am receiving it. I can't seem to track down what is wrong. If anyone can offer any help it will be greatly appreciated.

The message box that pops up says the text below:

"DataPortal.Fetch failed (System.ArithmeticException: Overflow or underflow in the arithmetic operation.)"

I am receiving the error while running test cases. The problem is I can run the same test with the exact same data and sometimes I receive the error and sometimes I don't. It all seems so random.

rsbaker0 replied on Thursday, June 11, 2009

Are you debugging while running the local data portal?

If so, in Visual Studio look at your Debug->Exceptions screen and check the "Thrown" box under Common Language Runtime exceptions, the debugger will stop at the actual location where you are getting the error. Hopefully, the cause will be apparent at that point...

flying_monkey replied on Thursday, June 11, 2009

Unfortunately I am not and can't debug the application in the scenario where I am getting an error. The application I am building is a tool that updates a SQL database from a language called Blaise that doesn't have SQL connection capabilities but does support calling external DLL's. I am running a Blaise program that call's my DLL and updates about 50 cases in the SQL database.

If anyone knows how to debug a dll that is being called by an external program that would be great!

What did you mean by a local data portal? The setup I have is that my Visual Studio runs a test script which runs a blaise application on a server that my dll resides on as well which then updates a SQL database on a second server. All in all 3 computers...

Also, I am not completely sure about this but the problem only seems to happen when there is a large number of child objects for one parent object. Say around 8000+

Hopefully all this info will shed some light on any issues I am having.

Thanks

flying_monkey replied on Friday, June 12, 2009

Here is the stack dump from the the exception I am receiving...Basically my work just renamed the CSLA to SADF I do not believe there are any differences in the two.

ajj3085 replied on Friday, June 12, 2009

Actualy you should still be able to debug the assembly, even if it's called by a non-.net program.

Since the program will have to host the CLR eventually, you can attach the debugger to the program using your assembly. Make sure the assembly was compiled with Debug settings. You should then be able to trace through your code.

You may have to go into the Debug -> Modules menu and manually lose your PDB, by the way.

HTH

flying_monkey replied on Friday, June 12, 2009

I'm not sure how to do this... are you able to provide any more explanation?

ajj3085 replied on Friday, June 12, 2009

Run the program, then go into VS with your assembly's solution loaded, then goto the Debug -> Attach to Process menu item.

Look for the process which loads your assembly. You can select it and attach there.

flying_monkey replied on Friday, June 12, 2009

Excellent, thank you very much. This will be helpful. Fortunately I have solved the error. It seems to have been caused by the Blaise application that was running. I was doing my tests against a new version. I switched to the older version and the bugs have gone away.

Thanks for all the help.

Dan King

Copyright (c) Marimer LLC