I can't complete running my program

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
357mag
Posts: 18
Joined: Sun Apr 24, 2016 9:48 pm

I can't complete running my program

Post by 357mag » Thu Dec 14, 2017 6:34 pm

When I run my C# program inside Zeus only the beginning part of the program runs fine. But when I press the Enter key to run the rest of the code Zeus freezes and does not respond.

Let me explain:

Here is my program:

using System;

class GetInteger
{
static void Main()
{
int x;

Console.Write("Enter a value for x: ");
x = Convert.ToInt32(Console.ReadLine());

Console.Write("Okay you entered " + x)
}
}

The problem is after I enter a value for x and then hit Enter, the program stops running. It freezes. I see an hourglass that just sits there.

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: I can't complete running my program

Post by jussij » Thu Dec 14, 2017 9:41 pm

This definitely looks like a new bug of some sorts :(

This feature was most definitely working not very long ago and I really don't quite understand what has changed to now have it break, which it definitely is :?

What appears to be happening is the spawned executable is not ending and this is causing the issue.

For example if we take your code, save it to a test.cs file, compile and run that code and then start Task Manager you will see the test.exe is still running.

Killing test.exe in the Task Manager then returns everything to normal.

In the mean time could you open this file:

Code: Select all

$zud\zScript\run_exec.lua
and make this code change:

Code: Select all

-- run the executable
--utils.run_executable(executable, arguments)
utils.run_executable_tee(executable, arguments)
That is a work around till the issue is fixed, but it should stop the hang.

Cheers Jussi

PS: One thing you should try to ensure is that you always trap any exceptions because if you don't then the OS will and it does that by putting up an exception dialog box.

So for example you should wrap your code in a try block like this:

Code: Select all

using System;

class GetInteger
{
    static void Main()
    {
        try
        {
            int x;

            Console.Write("Enter a value for x: ");
            x = Convert.ToInt32(Console.ReadLine());
            Console.Write("Okay you entered " + x);
        }
        catch (Exception ex)
        {
            Console.Write(ex.Message);
        }
    }
}

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: I can't complete running my program

Post by jussij » Fri Dec 15, 2017 2:47 am

The version of Zeus found here should fix this issue: http://www.zeusedit.com/z300/z-beta.zip

Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 1 guest