Author Topic: Bug report - setting viewport while gripped ents  (Read 4818 times)

0 Members and 1 Guest are viewing this topic.

SMadsen

  • Guest
Bug report - setting viewport while gripped ents
« on: December 10, 2003, 08:51:34 AM »
Messing with the dimension search program in another thread, I stumbled on a bug that doesn't seem to be described in the knowledge base. Just thought I'd share it here.

When restoring the active viewport in Modelspace with VLA-PUT-ACTIVEVIEWPORT, make sure that no entities are gripped.

(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq vp (vla-get-activeviewport doc))
(vla-put-activeviewport doc vp)

^this works fine if no entities are gripped (that is, SSGETFIRST returns nil's). Having entities gripped, it will look something like this:

(vla-put-activeviewport doc vp)
; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on unknown exception

.. and issue a FATAL ERROR, for example: UAV Reading 0x0004 Exception at 33ed2f86h

To work around it, call (SSSETFIRST nil nil) before restoring the viewport.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Bug report - setting viewport while gripped ents
« Reply #1 on: December 10, 2003, 09:07:31 AM »
Thanks SMadsen.
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Bug report - setting viewport while gripped ents
« Reply #2 on: December 10, 2003, 09:12:33 AM »
Now that really sucks now don't it...
I will make note of it.

Oh, and I KNOW that you reported it to Autodork
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Bug report - setting viewport while gripped ents
« Reply #3 on: December 10, 2003, 09:51:40 AM »
vl-catch-all-apply doesn't help either.
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Bug report - setting viewport while gripped ents
« Reply #4 on: December 10, 2003, 04:58:04 PM »
Would this work too?

 (COMMAND)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

daron

  • Guest
Bug report - setting viewport while gripped ents
« Reply #5 on: December 10, 2003, 06:06:56 PM »
It might, but you wouldn't want to do that in an ActiveX environment.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Bug report - setting viewport while gripped ents
« Reply #6 on: December 10, 2003, 07:05:24 PM »
Oh, forgot you shouldn't mix the two.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.