GeometricExtents unstable work causes exception
vildar82 opened this issue · comments
Hi Ewen,
I tried this utility. Super very much! :)
Sometimes buggy at get bounds (Entity.GeometricExtents).
I do not understand what's the matter.
In normal debugging all right.
You do not come across this?
AcCoreConsole 2016. NUnit 3.
Got some code I can try out?
btw - well done getting it running, I assume you've removed my breakages. I haven't had a chance to play with this yet, I'm still laying the groundwork for www.tvCAD.tv
I did the test project. But it is not working (: netload - not to load assembly. I something wrong done?
CADtest is working, see the green and white text at the bottom - 6 tests, 5 passed and one failed. Why the GeometricExtents does not work? I don't know.
bugs accoreconsole :(
Not the first time those two words have been used together in a sentence. https://forums.autodesk.com/t5/net/accoreconsole-exe-in-2015-doesn-t-do-system-console-writeline/td-p/5539352
fwiw I think the error message tells you what is broken - looks like line 45 ?? I have no idea what that code is so I can't help beyond that, although check out my Accees Violation Exception comment I made at 2015-03-25 01:56 (no link because the f*** forums are down for maintenance now).
I have an unfounded theory that perhaps that code is running entangled with NUnit in a way that AutoCAD doesn't like, out of process even. I tried a few different ways but I couldn't get past https://github.com/CADbloke/CADtest/blob/master/CADtest-CS/SampleTests.cs#L58
How did you get it to use the right formatting in the core console? I gave up on that.
Here's my stack trace for anyone who is interested ...
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Autodesk.AutoCAD.DatabaseServices.Transaction.Abort()
at NUnitAutoCADTestRunner.TestClass1.Test_method_name() in C:\Codez\CADbloke\Github\CADtest\CADtest-CS\SampleTests.cs:line 58
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at NUnit.Framework.Internal.Reflect.InvokeMethod(MethodInfo method, Object fixture, Object[] args)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestActionCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.SetUpTearDownCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork()
at NUnit.Framework.Internal.Execution.WorkItem.RunTest()
at NUnit.Framework.Internal.Execution.ParallelWorkItemDispatcher.Dispatch(WorkItem work)
at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
at NUnit.Framework.Internal.Execution.WorkItem.RunTest()
at NUnit.Framework.Internal.Execution.TestWorker.TestWorkerThreadProc()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()