Message 1 of 3
Problems with ResultBuffer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have had some interesting problems sending data from Lisp to .NET applications with ResultBuffers, so I decided to be a simple test:
I created the following powerfull and complex application:
[LispFunction("Bounce")] public static ResultBuffer Bounce(ResultBuffer args) { return args; }
When I send it certain lists of integers from AutoCAD's Lisp Console, funny things happen:
_$ (Bounce '(2001 0 0)) ((2001.0 0.0 0.0)) _$ (Bounce '(2002 0 0)) ((2002.0 0.0 0.0)) _$ (Bounce '(2003 0 0)) ((2003.0 0.0 0.0)) ... _$ (Bounce '(2009 0 0)) ((2009.0 0.0 0.0))
So far so good...well, kinda, except it is turning a list of three integers into a 3D Point, but this is a known issue. It get's better:
_$ (Bounce '(2010 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2011 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2012 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2013 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2014 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2015 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2016 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2017 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2018 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(2019 0 0)) ; error: LsAdsInvoke Internal Error
It get's funnier still:
_$ (Bounce '(3010 0 0)) (nil) _$ (Bounce '(3011 0 0)) (nil) _$ (Bounce '(3012 0 0)) (nil) _$ (Bounce '(3013 0 0)) (nil) _$ (Bounce '(3014 0 0)) (nil) _$ (Bounce '(3015 0 0)) (nil) _$ (Bounce '(3016 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(3017 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(3018 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(3019 0 0)) ; error: LsAdsInvoke Internal Error _$ (Bounce '(3020 0 0)) ((3020.0 0.0 0.0))
And finally:
_$ (Bounce '(3010 1 0)) ; error: Exception occurred: 0xC0000005 (Access Violation) ; warning: unwind skipped on exception ; error: Exception occurred: 0xC0000005 (Access Violation) ; error: Exception occurred: 0xC0000005 (Access Violation) ; error: Exception occurred: 0xC0000005 (Access Violation) _$ (Bounce '(3011 1 0)) ; error: Exception occurred: 0xC0000005 (Access Violation) ; warning: unwind skipped on exception ; error: Exception occurred: 0xC0000005 (Access Violation) ; error: Exception occurred: 0xC0000005 (Access Violation) ; error: Exception occurred: 0xC0000005 (Access Violation) _$ (Bounce '(3012 1 0)) ; error: Exception occurred: 0xC0000005 (Access Violation) ; warning: unwind skipped on exception ; error: Exception occurred: 0xC0000005 (Access Violation) ; error: Exception occurred: 0xC0000005 (Access Violation) ; error: Exception occurred: 0xC0000005 (Access Violation)
Does anyone know what is causing this and how to get around it?