web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

What are call stacks and how does GP use them?

(1) ShareShare
ReportReport
Posted on by 75,852 Moderator

One of our clients was running a customization we had written that reads a text file and converts it to an Excel spreadsheet. Suddenly when she goes to run the code she is getting the message "All call stacks are in use.Cannot start script" . Does any one know how can track down how to correct this error?

Categories:
I have the same question (0)
  • Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    Either in your code you are using many run/call script or you are using Pathname table.

    From Dexterity Manuals.

    The Pathnames table must be assigned to the Pathname series when you

    create its table definition in Dexterity. If the Pathnames table is assigned to

    any other series, the Pathname procedure will run each time the Pathnames

    table is accessed, resulting in an “All call stacks are in use. Cannot start

    script.” error

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    This customization ran fine until PaperSave was installed. This customization is written using C#. What could I change in our code to not conflict with PaperSave?

  • Roberts1254 Profile Picture
    5 on at

    Thank you for updating us with the outcome.

    FirstCallOnline

  • Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    Can not say anything without seeing the code.

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    I have turned this over to the developers. Their code is proprietary.

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,137 Most Valuable Professional on at

    Hi Richard

    A call stack in a programming language is used to track where the point of execution is. When you call another script from the currently executing script it places the location of the following instruction onto a call stack. When the newly called script completes, the location is pulled from the call stack and the code continues from where it left off.

    In Dexterity you can call functions and procedures to almost any depth (you will eventually run out of memory and crash). However, when you use the run script command to execute the change script of a field, you can only go seven levels deep after which you will get the error "All call stacks are in use. Cannot start script" and the script will fail to execute.

    A script log could probably show the calls and identify how you are getting down to the eighth level.

    Depending on what your code is doing, one way for Dexterity developers to avoid this error (other than using functions and/or procedures) is to use run script delayed command rather than just run script command.  The delayed keyword then will queue up the called script to run when all existing code as completed, thus starting back at the top of the call stack.

    I hope that explains things a little.

    Regards

    David

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    Thanks, I will pass this along to the developers and have them review their code.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 613

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 455 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 292 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans