TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Marc'Antonio Alessi on May 20, 2019, 04:25:54 PM

Title: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 20, 2019, 04:25:54 PM
Another very strange fatal error, symptoms:
AutoCAD2020> fatal error on copy/paste one block
BricsCAD V19> fatal error on move by grips
older versions OK  :gum:
see DWG.
Title: Re: Fatal error on very simple DWG
Post by: ronjonp on May 21, 2019, 10:35:10 AM
No crashing here...
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 11:13:53 AM
No crashing here...
V19... only click on grip
Title: Re: Fatal error on very simple DWG
Post by: ronjonp on May 21, 2019, 12:04:05 PM
I have AutoCAD 2020 and no crashing on copy paste. First thing I'd do would be open the DWG with recover and see if that fixes the issue.
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 01:01:23 PM
I have AutoCAD 2020 and no crashing on copy paste. First thing I'd do would be open the DWG with recover and see if that fixes the issue.
Thanks for test, maybe I send the wrong file… try before recover.
Grazie.  :-)
Title: Re: Fatal error on very simple DWG
Post by: ronjonp on May 21, 2019, 01:51:55 PM
Still no errors here.
Title: Re: Fatal error on very simple DWG
Post by: Master_Shake on May 21, 2019, 02:31:45 PM
Unload all of your routines, it might be a reactor failing out.
Title: Re: Fatal error on very simple DWG
Post by: MP on May 21, 2019, 03:08:02 PM
What happens with the attached Marc?
Title: Re: Fatal error on very simple DWG
Post by: Matthew H on May 21, 2019, 03:53:30 PM
Marc'Antonio Alessi's & MP's CAD file both Crash BricsCAD when touching the grip.
BricsCAD Ultimate Beta V19.201 (x64) Revison 60248 Beta
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 03:56:18 PM
What happens with the attached Marc?
Thanks Michael for test: BricsCAD V19 / AutoCAD 2020 same error  :-(
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:01:01 PM
Unload all of your routines, it might be a reactor failing out.
I'm using a "Vanilla" profile in V19/A2020 ...I think that these are dynamic blocks created with AutoCAD and then imported into BricsCAD V14 (unfortunately I have a client that still uses this version)...
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:08:34 PM
Marc'Antonio Alessi's & MP's CAD file both Crash BricsCAD when touching the grip.
BricsCAD Ultimate Beta V19.201 (x64) Revison 60248 Beta
Thanks Matthew, I have V19.2.07 rev.61634
Title: Re: Fatal error on very simple DWG
Post by: MP on May 21, 2019, 04:10:32 PM
Thanks for testing.

Started with lite abuse.

Next level abuse attached.

Please try; thanks.
Title: Re: Fatal error on very simple DWG
Post by: ronjonp on May 21, 2019, 04:13:34 PM
Could this be part of it?
Quote
Non Autodesk DWG.  This DWG file was saved by a software application that was not developed or licensed by Autodesk.  Autodesk cannot guarantee the application compatibility or integrity of this file.
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:16:24 PM
Thanks for testing.

Started with lite abuse.

Next level abuse attached.

Please try; thanks.
:-) V19/A2020 all ok now!  :yes:
Title: Re: Fatal error on very simple DWG
Post by: Matthew H on May 21, 2019, 04:16:46 PM
Thanks for testing.

Started with lite abuse.

Next level abuse attached.

Please try; thanks.

MP, Works as expected. No fatal errors.
Title: Re: Fatal error on very simple DWG
Post by: MP on May 21, 2019, 04:18:43 PM
I tried a couple things, let's start with the easiest.

In AutoCAD Use -EXPORTTOAUTOCAD to a new file. Does it crash? If so I'll share more.
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:19:21 PM
Could this be part of it?
Quote
Non Autodesk DWG.  This DWG file was saved by a software application that was not developed or licensed by Autodesk.  Autodesk cannot guarantee the application compatibility or integrity of this file.
To clean that try -EXPORTTOAUTOCAD (in AutoCAD)...
Title: Re: Fatal error on very simple DWG
Post by: ronjonp on May 21, 2019, 04:23:01 PM
Does this attached drawing crash?
Title: Re: Fatal error on very simple DWG
Post by: Matthew H on May 21, 2019, 04:30:07 PM
Does this attached drawing crash?

ronjonp, It does crash BricsCAD.
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:33:11 PM
I tried a couple things, let's start with the easiest.

In AutoCAD Use -EXPORTTOAUTOCAD to a new file. Does it crash? If so I'll share more.
EXPORTTOAUTOCAD > Fatal error
Recover (not audit)   > Fix it for AutoCAD but not for BricsCAD...
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:37:56 PM
Does this attached drawing crash?

ronjonp, It does crash.
Fix it for AutoCAD but not for BricsCAD...
Title: Re: Fatal error on very simple DWG
Post by: ronjonp on May 21, 2019, 04:39:10 PM
Does this attached drawing crash?

ronjonp, It does crash.
DOH! .. I still wonder why my CAD does not crash?
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 04:44:16 PM
Does this attached drawing crash?

ronjonp, It does crash.
DOH! .. I still wonder why my CAD does not crash?
Right now I'm using 2020 Mechanical (Vanilla)… maybe the only solution is a WBlock "*"
Title: Re: Fatal error on very simple DWG
Post by: MP on May 21, 2019, 04:49:56 PM
level 1

Code: [Select]
(   (lambda ( nop blocks killitwithfire )
        (vlax-for b blocks
            (and
                (eq :vlax-false (vla-get-islayout b))
                (eq :vlax-false (vla-get-isxref b))
                (eq :vlax-true (vla-get-hasextensiondictionary b))
                (killitwithfire (vla-getextensiondictionary b))
            )       
        )
        (princ)
    )
    (vl-load-com)
    (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
    (lambda ( x / e )
        (foreach p (entget (vlax-vla-object->ename x))
            (and
                (eq 360 (car p))
                (eq 'ename (type (setq e (cdr p))))
                (wcmatch (cdr (assoc 0 (entget e))) "*PURGEPREVENTER*")
                (vl-catch-all-apply 'entdel (list e))
            )
        )
    )
)

Then -exporttoautocad.

Crash, no crash?
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 05:00:22 PM
level 1

Code: [Select]
(   (lambda ( nop blocks killitwithfire )
        (vlax-for b blocks
            (and
                (eq :vlax-false (vla-get-islayout b))
                (eq :vlax-false (vla-get-isxref b))
                (eq :vlax-true (vla-get-hasextensiondictionary b))
                (killitwithfire (vla-getextensiondictionary b))
            )       
        )
        (princ)
    )
    (vl-load-com)
    (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
    (lambda ( x / e )
        (foreach p (entget (vlax-vla-object->ename x))
            (and
                (eq 360 (car p))
                (eq 'ename (type (setq e (cdr p))))
                (wcmatch (cdr (assoc 0 (entget e))) "*PURGEPREVENTER*")
                (vl-catch-all-apply 'entdel (list e))
            )
        )
    )
)

Then -exporttoautocad.

Crash, no crash?
crash  :-(
Title: Re: Fatal error on very simple DWG
Post by: MP on May 21, 2019, 05:05:05 PM
level 2

Code: [Select]
(   (lambda ( nop blocks killitwithfire )
        (vlax-for b blocks
            (and
                (eq :vlax-false (vla-get-islayout b))
                (eq :vlax-false (vla-get-isxref b))
                (eq :vlax-true (vla-get-hasextensiondictionary b))
                (killitwithfire (vla-getextensiondictionary b))
            )       
        )
        (princ)
    )
    (vl-load-com)
    (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
    (lambda ( x / e )
        (foreach p (entget (vlax-vla-object->ename x))
            (and
                (eq 360 (car p))
                (eq 'ename (type (setq e (cdr p))))
                (vl-catch-all-apply 'entdel (list e))
            )
        )
        (vl-catch-all-apply 'vla-delete (list x))
    )
)
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 21, 2019, 05:18:05 PM
GRANDE!  :-) all is ok in B/A no need ExportToAutocad… now I have to run, it's late here in my little state ...my wife pulled me by the hair I don't have anymore. (sorry for google transl.) see you about 8 hours.
Thanks MP  :smitten:
Code: [Select]
(   (lambda ( nop blocks killitwithfire )
        (vlax-for b blocks
            (and
                (eq :vlax-false (vla-get-islayout b))
                (eq :vlax-false (vla-get-isxref b))
                (eq :vlax-true (vla-get-hasextensiondictionary b))
                (killitwithfire (vla-getextensiondictionary b))
            )       
        )
        (princ)
    )
    (vl-load-com)
    (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
    (lambda ( x / e )
        (foreach p (entget (vlax-vla-object->ename x))
            (print p) (princ " p ")
            (and
                (eq 360 (car p))
                (eq 'ename (type (setq e (cdr p))))
                (vl-catch-all-apply 'entdel (list e))
            )
        )
        (print x) (princ " x ")
        (vl-catch-all-apply 'vla-delete (list x))
    )
)


(-1 . <Entity name: 3cc7e870>)  p
(0 . "DICTIONARY")  p
(5 . "9438")  p
(330 . <Entity name: 3cc7f770>)  p
(100 . "AcDbDictionary")  p
(280 . 1)  p
(281 . 1)  p
(3 . "ACAD_ASSOCNETWORK")  p
(360 . <Entity name: 3cc7e970>)  p
(3 . "ACAD_SORTENTS")  p
(360 . <Entity name: 3cc7f670>)  p
#<VLA-OBJECT IAcadDictionary 000000003CE58A70>  x
(-1 . <Entity name: 3cc7f2b0>)  p
(0 . "DICTIONARY")  p
(5 . "9444")  p
(330 . <Entity name: 3cc7ea70>)  p
(100 . "AcDbDictionary")  p
(280 . 1)  p
(281 . 1)  p
(3 . "ACAD_SORTENTS")  p
(360 . <Entity name: 3cc7ee70>)  p
#<VLA-OBJECT IAcadDictionary 000000003CE585F0>  x
Title: Re: Fatal error on very simple DWG
Post by: MP on May 21, 2019, 05:21:30 PM
You’re most welcome my friend; cheers.
Title: Re: Fatal error on very simple DWG
Post by: Marc'Antonio Alessi on May 22, 2019, 07:48:04 AM
Thanks again to Michael Puckett (my friend from Canada  :-) ) for solving the problem.

If anyone wants to play with another puzzle see: http://www.theswamp.org/index.php?topic=54337.msg589061#msg589061

Tested with Open/Recover/Inser + DxfOut/DxfIn:

AutoCAD 2017/18/19/20 + ODBX AutoCAD > Fatal error

AutoCAD 2013 open OK > if copy or move the hatch > Fatal error

> FATAL ERROR:  Unhandled Access Violation Reading 0xffffffd0 Exception at F3DE3C27h

Bricscad (all) > OK

P.S.: lately I'm having a lot of strange problems with DWG going through conversions from/to Microstation / AutoCAD / BricsCAD