Author Topic: Increase Slick-C stack size?  (Read 9043 times)

Kork

  • Community Member
  • Posts: 13
  • Hero Points: 0
Increase Slick-C stack size?
« on: October 24, 2018, 10:28:46 PM »
Hi, in Slick Edit (SlickEdit 2013 (v18.0.1.2 64-bit)), I am searching files in absolutely monster trees with many deep folders.

I often get a bug out with "Slick-C Error" expression stack overflow, file=stdcmds.ex offset=4217 in a popup and another popup that looks like a stack dump.  The stack dump has lines from 0 to 1020, so it looks suspiciously like a 1024 limit.

How can I bump this up to 2048, or 9 billion, so I can complete the search?


Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Increase Slick-C stack size?
« Reply #1 on: October 25, 2018, 01:37:13 AM »
What operating system are you using?

Just a quick suggestion - if you can't find a solution maybe you could run sgrep externally from the build window.
dos("-e sgrep DEBUG *.c");

or trial the latest release of slickedit.

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: Increase Slick-C stack size?
« Reply #2 on: October 25, 2018, 02:06:31 PM »
Alternatively, write a directory traversal algorithm that doesn't use recursion. A simple array as a push/pop stack should do the trick.

Kork

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Increase Slick-C stack size?
« Reply #3 on: October 29, 2018, 03:43:11 PM »
dos("-e sgrep DEBUG *.c");

"Unknown command"

I am assuming it is starting sgrep, which I probably don't have.


(Also, I cannot tell if the previous poster is being sarcastic to SlickEdit or not, but I am using SlickEdit's find in files function, apparently itself written in Slick C.)
« Last Edit: October 29, 2018, 05:17:59 PM by Kork »

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Increase Slick-C stack size?
« Reply #4 on: October 30, 2018, 11:03:04 AM »
Sorry I was rushing.  sgrep.exe is in the slickedit installation "win" folder.  Type sgrep in the build window and you'll see how to use it.

You might be able to use FindIn-xgrep.e from here - see the runsg command.  It probably needs some changes to be useful.
https://community.slickedit.com/index.php/topic,9599.msg41046.html#msg41046

If you want you could try opening stdcmds.e from the slick installation macros folder.  Then on the slick command line type
st -f 4217
and it will take you to the line of slick c code that caused the error.  Could you then post the function that had the error and identify which line had the error?  I'm curious to know what an expression stack is.

By the way, I think Marcel was making a serious suggestion but I would have expected that the slick search was handled entirely in the core of slickedit and not in slick C.  There is a slick c "file_match" function that does directory searching though.

Dennis

  • Senior Community Member
  • Posts: 3960
  • Hero Points: 517
Re: Increase Slick-C stack size?
« Reply #5 on: October 31, 2018, 03:03:28 PM »
@Kork:  You might want to verify that your monster directory tree is actually over 1000 levels deep, and that your code is not traversing the same directory recursively, due to a bug or a symbollic link (if the directory is remote mounted from Linux or macOS).

Generally, if you get a Slick-C stack, it is helpful to attach the contents of the Stack when reporting the problem, as well as your user-written code.  We really have very little idea what API's you are using.

Kork

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Increase Slick-C stack size?
« Reply #6 on: November 08, 2018, 09:22:36 PM »
Quote
Generally, if you get a Slick-C stack, it is helpful to attach the contents of the Stack when reporting the problem, as well as your user-written code.  We really have very little idea what API's you are using.

Again, I am not using any APIs or Slick-C.  I am using SlickEdit's built-in Find in Files function, Search menu -> Find in Files...



Dennis

  • Senior Community Member
  • Posts: 3960
  • Hero Points: 517
Re: Increase Slick-C stack size?
« Reply #7 on: November 08, 2018, 09:26:52 PM »
Open <config>/logs/stack.log, and attach that here.  However, before doing that, you should verify that you still get the problem with the current version of SlickEdit.