Hi Karell,

I converted the code fragment that you gave into C#; please see end of e-mail. And I've run it on a fairly recent code base; I did an update last week and rebuilt. Unfortunately, I have been unable to reproduce the NullReferenceException thrown on oApplication.Start() (or your app.Start()).

Please could you send the stack trace with the NullReferenceException.

Please could you describe the alchemi setup that you have; version number, etc.

<everyone>Has anyone else ever run Alchemi using VB.NET? I see absolutely no problem with this but just in case :)</everyone>

Thanks,

Michael.

C# CODE...

using System;
using System.Collections.Generic;
using System.Text;

using Alchemi.Core;
using Alchemi.Core.Owner;

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            Program oProgram = new Program();
            oProgram.Start();
        }

        public Program()
        {
        }

        public void Start()
        {
            GApplication oApplication = new GApplication();
            GConnection oConnection = new GConnection("localhost", 9000, "user", "user");
            oApplication.Connection = oConnection;

            //oApplication.ThreadFinish += new GThreadFinish(oApplication_ThreadFinish);
            //oApplication.ThreadFailed += new GThreadFailed(oApplication_ThreadFailed);

            oApplication.Manifest.Add(new ModuleDependency(typeof(Worker).Module));

            oApplication.Threads.Add(new Worker());

            oApplication.Start();

            Console.ReadLine();
        }

        void oApplication_ThreadFailed(GThread thread, Exception e)
        {
            Console.Out.WriteLine("ThreadFailed");
        }

        void oApplication_ThreadFinish(GThread thread)
        {
            Console.Out.WriteLine("ThreadFinish");
        }
    }

    [Serializable]
    public class Worker : GThread
    {
        public Worker()
        {
        }

        public override void Start()
        {
        }
    }
}


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alchemi-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alchemi-developers

Reply via email to