[SOLVED] User script with arguments crashes Ozone

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] User script with arguments crashes Ozone

    I am trying to write a user script that accepts arguments. From the manual, I see:


    Segger wrote:

    7.9.9.1 Script.Exec
    Executes a project file script function. The command currently only supports script functions
    with void parameter or with up to seven arguments of integer type.
    Prototype
    int Script.Exec(const char* sFuncName, __int64 Para1, __int64 Para2,..);
    I defined a dumb function as:

    C Source Code

    1. void command_with_arg(__int64 a1) {
    2. Util.Log("Logit");
    3. Util.LogHex("Argument = ", a1);
    4. }

    When I attempt to run this script in the Console window with Script.Exec("command_with_arg", 123), it crashes and shows me a window saying "An unexpected exception occurred and Ozone needs to close." If I run the script with no arguments, it doesn't seem to execute the LogHex command, but it doesn't crash.

    I'm running version 3.26f on Windows 10.

    I've tried to change the command varying the argument types and have even specified seven arguments to no avail. Does anyone out there have an example of how to specify a user script with arguments?
  • Hi,
    thank you for pointing out this issue to us. This is a bug which will be resolved in one of the next releases.
    In general it would be appreciated if you would report crashes in future to us via the support ticket system. The link to the support system can be found below.
    Best regards
    -- AlexD
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.