AutoCAD 2017 - (*pop-error-mode*) underflow

dpalmerVQ54W
Enthusiast
Enthusiast

AutoCAD 2017 - (*pop-error-mode*) underflow

dpalmerVQ54W
Enthusiast
Enthusiast

When selecting the command _mstretch I get the following error

 

Command: _mstretch
(*pop-error-mode*) underflow.
Cannot invoke (command) from *error* without prior call to (*push-error-using-command*).
Converting (command) calls to (command-s) is recommended.

 

I've tried restarting ACAD but the error comes back.

 

I'm using AutoCAD 2017 which is a recent install. I have not seen this issue before when we were using AutoCAD 2014.

 

I'm aware there are other "solutions" to similar issues, but they were for previous versions.

 

Can anyone offer any ideas/solutions.

 

Cheers.

 

David P

 

[ The subject line of this post has been edited to include the product name by @handjonathan ]

David P
AutoCAD 2021
Reply
Accepted solutions (1)
27,491 Views
54 Replies
Replies (54)

randyspear6624
Collaborator
Collaborator

I too, have had this in C3D 2015 and 2017.

I keep my drawings open probably longer than I should but it seems it only happens if I've been in a drawing for a long time. Also, it happens quite often when I start an express tool then cancel it then start it again.

 

I didn't know express tools wasn't supported anymore. That's crazy, people would pay good money for similar tools.

chase.gifford
Contributor
Contributor

@Anonymous Did you ever find a way around it or find out why it happens?

Thx

0 Likes

sjxyz
Enthusiast
Enthusiast

Afraid not! Just restart the program. Pretty dull!

0 Likes

dlanorh
Advisor
Advisor
0 Likes

Anonymous
Not applicable

I'm using 2018 and i got the error using mktype command to make a line type and now i'm behind on my work because i have to reset autocad

 

0 Likes

Anonymous
Not applicable

I am using 2018 and just received this error so it still isnt fixed in 2018.

0 Likes

chriscowgill7373
Advisor
Advisor

It isn't fixed in 2019, I can generate it almost at will by escaping out of the middle of the exoffset command.  I haven't started using 2020 in production, but I'm not holding my breath that it is fixed.


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2022 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

sjxyz
Enthusiast
Enthusiast

Hmmmmmmm ... not exactly surprised. I haven't broached 2020 either yet.

0 Likes

dvertz
Advocate
Advocate

I have the answer to the problem.

Express Tools has had issues for a long time. And since they are unsupported, they will never be fixed. Some have simple fixes while others may need a complete re-write. For example: the XLIST dialog is so narrow in width that it cuts off the layer name of xref'ed layers because a drawing name is long. The fix is a simple change of the dialog width in the DCL. And the BCOUNT doesn't count dynamic blocks if any dynamic property has been changed.

 

The POP problem is almost as easy and the clue was provided in post #5. It's the error handler. While most good programmers will tell you that you should always have a good error handler, the simple fix for this tool to work is to remove the error handler part of the LSP. In this case none is better than a bad error handler.

 

Find the Express Tool folder and then look for "vpsync.lsp". This is a text file. Open it in Windows Notepad. Scroll down to the MAIN PROGRAM section and find where it says "acet-error-init". Now put semicolons in front of the lines. The end result should look like this ...

 

; (acet-error-init
; (list (list "cmdecho" 0
; "regenmode" 1
; );list
; T
; );list
; );acet-error-init

 

Again, you should have good error control in a LSP, but if the error is what is causing the errors, then remove it. The tool will still work, it just won't have error control.

Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2


dlanorh
Advisor
Advisor

@dvertz wrote:

I have the answer to the problem.

Express Tools has had issues for a long time. And since they are unsupported, they will never be fixed. Some have simple fixes while others may need a complete re-write. For example: the XLIST dialog is so narrow in width that it cuts off the layer name of xref'ed layers because a drawing name is long. The fix is a simple change of the dialog width in the DCL. And the BCOUNT doesn't count dynamic blocks if any dynamic property has been changed.

 

The POP problem is almost as easy and the clue was provided in post #5. It's the error handler. While most good programmers will tell you that you should always have a good error handler, the simple fix for this tool to work is to remove the error handler part of the LSP. In this case none is better than a bad error handler.

 

Find the Express Tool folder and then look for "vpsync.lsp". This is a text file. Open it in Windows Notepad. Scroll down to the MAIN PROGRAM section and find where it says "acet-error-init". Now put semicolons in front of the lines. The end result should look like this ...

 

; (acet-error-init
; (list (list "cmdecho" 0
; "regenmode" 1
; );list
; T
; );list
; );acet-error-init

 

Again, you should have good error control in a LSP, but if the error is what is causing the errors, then remove it. The tool will still work, it just won't have error control.


This will only fix the vpsync command. Most of the lisps in the expresstools directory have their own " (acet-error-init)" , so this will have to be applied to each of these, and won't address the problem with tools inside fas/dll/arx.

 

The underlying problem is that there are "command" calls inside the express tools error sub routine. As of  2015, these should be converted to command-s calls. The error sub routine however is inside a fas/dll/arx, and as auto/visual lisp has been depreciated in favour of .NET the problem will probably never be fixed. The problem is only pertinant to "error" routines not lisp as a whole, and one would assume is a security measure.

 

Know your express tools commands, as this only affects some commands, and depends on how the (acet-error-init) is initially configured. Pressing ESC within an Express tools command is a sure fired way of invoking the error handler and the problems that ensue.

I am not one of the robots you're looking for

Craig.Zeman
Explorer
Explorer

I want to send a very hearty 'Thank-you' to you for this fix!

Kudos to you across the board, for the great explanation as well, I think you've got this solved.

 

In my experience - I was seeing these symptoms every 2 months - but never saw a specific error message, just a hang. About 2% of the time, a dialog box would be open in the background, and I could alt-tab to it to close it and that would avert the crash. But more often than not, it would completely lock up, turn into a Solitaire Win Screen, and I would lose everything I had done since the last save. 

 

It's funny because I recently extended my command line from 5 lines to 6 -  lo and behold, the (*pop-error-mode*) message was exactly 6 lines up today. I'm sure it was there on previous crashes but it had scrolled too far upscreen.  

 

I am so grateful because, as you probably know, a user can make 1000 decisions per hour within AutoCad, and when you lose all your creative work due to a hang/crash like this, there is nothing more frustrating that realizing you have to make those 1000 decisions all over again. 

 

Therefore I again THANK-YOU again very much. Heroic work!

 

 

Anonymous
Not applicable

Escaping out (canceling) an express tool command seems, from my experience with this issue over the last 3 years to be the culprit. I use ALIGNSPACE rather frequently and sometimes I don't hit the connection points quite on the mark. The next express tool used will typically issue the underflow message. It is unfortunate that this isn't being addressed. Many of the express tools are quite valuable, and anyone who's been using the program for a while has likely come to rely on several of them.

dlanorh
Advisor
Advisor

Alignspace is *.lsp. Attached is a version that substitutes a local error for the express tools error routine. You would need to rename the old routine to *.old and replace with this.

 

The lisp can be found in c:\program files\autodesk\Autocad .......\express\

I am not one of the robots you're looking for

0 Likes

arcqiufeng
Explorer
Explorer

I have solved the problem by re-write the lisp function (acet-error-init) and (acet-error-restore).

 

I'd like to post the lsp file as attachment.

 

Enjoy!

;;; ============================================
;;; EXPRESSTOOLS (*POP-ERROR-MODE*) ERROR FIXING
;;; ET-ERROR-FIX.LSP
;;; --------------------------------------------
;;; Qiu Feng<arcqiufeng@hotmail.com>, 2020-03-06
;;; ============================================

;; Express工具在高版本的AutoCAD中,经常在一次ESC后,出现"(*pop-error-mode*)"下溢错误,然后所有et的命令都不起作用了。
;; 猜测可能是高版本中不允许在*error*函数中进行command函数调用。
;; 这个程序因此根据et的部分源代码,猜测错误处理函数的功能,重写了这两个函数
;; 使用方法:把此程序放在autocad的搜索路径中,并且放在appload的启动组中。这个路径加入autocad的信任列表。
;; 由于此程序需要在acetutil.fas之后加载,所以如果仍然出现错误,再次加载这个程序。
;; 重载命令: FixET

;; The expresstools commands occasionally failed by display a message "(*pop-error-mode*)" since AutoCAD 2015
;; We guess that is caused by using the function "command" in "*error*" routine.
;; This lisp file try to fix the bug.

;; ---------------
;; HOW TO USE
;; ---------------
;; Put this file in autocad search-path, and put it in the startup suite of appload command dialog.
;; Also put the path into the list of trusted paths of AutoCAD.
;; This file should be loaded **AFTER** acetutil.fas. Try to reload this file if error back.
;; reload command: FixET

;; We don't have source code of acetutil.fas......
;; So I have to try to implement these two functions myself, all by guessing.

 

 

ubul3
Participant
Participant

Yep, this was the problem.

I used the MKLTYPE command for the first time and didn't know how to use it properly, so after giving it a name in the save window, I thought that it's done. Sure it wasn't the command asks for more parameters, but it is command based, not GUI based, so just make the command line bigger and watch what the program tells you.

0 Likes

lamensterms
Advocate
Advocate

This appears to be a good solution - thank you very much for sharing arcqiufeng!

0 Likes

hlammerts
Advocate
Advocate

Hello Autodesk,

Is this problem being addressed?

I'm getting the same with Block count routines from Lee Mac

Only solution is to close AutoCAD and reopen.

 

BTW BricsCAD seems not to have this problem.

Always nice to have some competition.

pendean
Community Legend
Community Legend
No one here is Autodesk, we are all end users just like you.

chriscowgill7373
Advisor
Advisor

@arcqiufeng wrote:

I have solved the problem by re-write the lisp function (acet-error-init) and (acet-error-restore).

 

I'd like to post the lsp file as attachment.

 

Enjoy!

;;; ============================================
;;; EXPRESSTOOLS (*POP-ERROR-MODE*) ERROR FIXING
;;; ET-ERROR-FIX.LSP
;;; --------------------------------------------
;;; Qiu Feng<arcqiufeng@hotmail.com>, 2020-03-06
;;; ============================================

;; Express工具在高版本的AutoCAD中,经常在一次ESC后,出现"(*pop-error-mode*)"下溢错误,然后所有et的命令都不起作用了。
;; 猜测可能是高版本中不允许在*error*函数中进行command函数调用。
;; 这个程序因此根据et的部分源代码,猜测错误处理函数的功能,重写了这两个函数
;; 使用方法:把此程序放在autocad的搜索路径中,并且放在appload的启动组中。这个路径加入autocad的信任列表。
;; 由于此程序需要在acetutil.fas之后加载,所以如果仍然出现错误,再次加载这个程序。
;; 重载命令: FixET

;; The expresstools commands occasionally failed by display a message "(*pop-error-mode*)" since AutoCAD 2015
;; We guess that is caused by using the function "command" in "*error*" routine.
;; This lisp file try to fix the bug.

;; ---------------
;; HOW TO USE
;; ---------------
;; Put this file in autocad search-path, and put it in the startup suite of appload command dialog.
;; Also put the path into the list of trusted paths of AutoCAD.
;; This file should be loaded **AFTER** acetutil.fas. Try to reload this file if error back.
;; reload command: FixET

;; We don't have source code of acetutil.fas......
;; So I have to try to implement these two functions myself, all by guessing.

 

 


I ran into a snafu when utilizing your code.  Superhatch, seems to call for some values for some of the variables taht are stored that are not allowed, and will error out.

Within the Superhatch lisp file, it sets CECOLOR, CELTYPE, and LUPREC to nil values, which will cause the program to error.  Any chance you can address this in your coding?  The alternative I'm currently using is to replace those values within SuperHatch to use allowed values.


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2022 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

0 Likes

kzalec
Contributor
Contributor

I'm getting the same error message when I try to use the BTRIM command (Expresstools command).  Most of the other Expresstool commands are working, but not BTRIM which I greatly need.  I've reset AutoCAD to defaults and even reinstalled AutoCAD 2018 two days ago.  I've loaded, unloaded and reloaded the Expresstools and I still get the same error message with this command.  I don't know why the BTRIM command isn't working.  Does anyone have an AutoLISP routine that I can use to trim to blocks?

0 Likes