Author Topic: Transaction stack overflow exception  (Read 2332 times)

0 Members and 1 Guest are viewing this topic.

Tasaq

  • Guest
Transaction stack overflow exception
« on: February 11, 2015, 11:17:10 AM »
Hi,

I have some function in my project that run when project is loaded.

As the title says I've run into stack overflow exception with transactions, this happens instantly after loadng project in block edit mode or when this project was created in AutoCAD Architexture. To be precise, stack overflow occurs when transaction ends (call to Abort or Commit).

Did someone run into this before, any ideas why Transaction can cause stack overflow?

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: Transaction stack overflow exception
« Reply #1 on: February 11, 2015, 01:22:32 PM »
Would really help to see some code and/or the exact exception, stackoverflow is pretty generic.  My first guess is that your transaction has gone out of scope, i.e. you've committed, aborted, or disposed of it somewhere else in your code.
Revit 2019, AMEP 2019 64bit Win 10

Tasaq

  • Guest
Re: Transaction stack overflow exception
« Reply #2 on: February 11, 2015, 03:47:04 PM »
StackOverflowException was unhandled. An unhandled exception of type 'System.StackOverflowException' occurred in AcdbMgd.dll. This is all the info I can get.

Keep in mind that the code runs fine with standard AutoCAD projects. Another hint is that this occurs with nested transactions (but I am not sure if this is always the case).

As for code, I am under NDA so I can't show it in public, it would reveal to much.

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Transaction stack overflow exception
« Reply #3 on: February 12, 2015, 02:30:42 PM »
With information given about all I can tell you is maybe your recursively calling method, an event triggering itself, catching exception and calling method on instance that caused it, etc.....................

CADbloke

  • Bull Frog
  • Posts: 342
  • Crash Test Dummy
Re: Transaction stack overflow exception
« Reply #4 on: February 12, 2015, 06:38:07 PM »
this occurs with nested transactions (but I am not sure if this is always the case).
How many transactions have you created? There is a limit. Also, Debug.WriteLine() is your friend.

I'm with @Jeff, sounds like a recursion problem...again.