Errors by using ActiveX (COM) functions in Lisp ?

By calling the following functions on 2 solids, an error is very often (not always) produced:
To get rid of the error, Bricscad has to be restarted (no crash ).

Case 1 :
vla-boolean
(vla-boolean (vlax-ename->vla-object (car(entsel))) acUnion (vlax-ename->vla-object (car(entsel))) )
Error:
Select entity:
Select entity:
; error : Automation Error 80020009; [IDispatch] Error accessing [BOOLEAN] method. ErrIndex=0;

Getting the handle of an entity

Case 2 :
vla-get-handle
(vla-get-handle (vlax-ename->vla-object (car(entsel))) )
Error:
Select entity:
; error : Automation Error 80020009; [IDispatch] Error accessing [HANDLE] property. ErrIndex=0;
Case 3:
vlax-get-property
(vlax-get-property (vlax-ename->vla-object (car(entsel))) 'handle)
Select entity:
; error : Automation Error 80020009; [IDispatch] Error accessing [HANDLE] property. ErrIndex=0;
Case 4:
**vlax-dump-object **
(vlax-dump-object (vlax-ename->vla-object (car(entsel))) T)
Select entity:
error accessing 'TypeInfoCount' of IDispatch interface !
nil

I have never had these errors in V20 and so frequently !
Feels like a COM bug in V21 ???
Any ideas or the same experience ???

Comments

  • Dear Konstantin,

    indeed, there was a terrible bug with Lisp COM objects introduced with V21.2 :-(
    Using (vlax-release-object), or the automatic GarbageCollection, could delete the COM object (which is correct, depending on context/circumstances) - but next access by (vlax-ename->vla-object) then caused the memory access problem ...
    was a problem with incomplete internal caching ...
    very sorry for.

    Good news is, that this defect has been fixed with actual V21.2.04 version ... so best to update to that version.
    many greetings !

  • Dear Torsten,
    Many thanks for your quick response .
    I have V21.2.04 version installed and no errors are produced !
    many greetings from me too!

  • Dear Konstantin,

    glad to hear about :-)
    As a little bonus (after the fix), accessing the Lisp COM objects is now usually a bit faster (when accessing larger amount of objects, due to the cache).
    many greetings !

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!