This project is read-only.

Failure (code=4)

Jul 7, 2009 at 9:07 PM

My application is throwing the above error (or at least the event logger thinks it is) and I cannot figure where the issue is. It doesn't seem to be affecting any of the threads of work items, but it is filling up my event log. It seems to be happening after all the work items get queued and processed but before I shutdown the thead pool.

Any help/guidance would be much appreciated.

Cheers,

Jon

Jul 8, 2009 at 4:22 AM

Hi,

Can you send me a code snippet that generates the error?

Ami

Jul 10, 2009 at 1:20 PM

Did you get my previous email?

From: amibar [mailto:notifications@codeplex.com]
Sent: Tuesday, July 07, 2009 11:22 PM
To: jonathon_walsh@hotmail.com
Subject: Re: Failure (code=4) [smartthreadpool:61763]

From: amibar

Hi,

Can you send me a code snippet that generates the error?

Ami

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jul 10, 2009 at 4:46 PM

I got it, and asked for a code snippet that generates the error.

Ami

Jul 10, 2009 at 4:48 PM

I sent you the code snippet – I am assuming you did not get that? Just in case, here is another snippet:

                    BridgeProviderParams myBridgeProviderParams = DataRepository.BridgeProviderParamsProvider.GetByParamKeyProviderTypeId("XactwareThreads", 1);

                    int intXactwareThreads = 1;

                    if (myBridgeProviderParams != null)

                        if (myBridgeProviderParams.ParamValue != "")

                            int.TryParse(myBridgeProviderParams.ParamValue, out intXactwareThreads);

                    SmartThreadPool smartThreadPool = new SmartThreadPool(30000, intXactwareThreads);

                    IWorkItemsGroup wig = smartThreadPool.CreateWorkItemsGroup(1);

                    wig.OnIdle += new WorkItemsGroupIdleHandler(wig_OnIdle);

                    foreach (FileInfo myFile in myFiles)

                    {

                        wig.QueueWorkItem(new WorkItemCallback(this.RunDataBridgeThread), myFile);

                    }

                    smartThreadPool.WaitForIdle();

                    smartThreadPool.Shutdown();

From: amibar [mailto:notifications@codeplex.com]
Sent: Friday, July 10, 2009 11:47 AM
To: jonathon_walsh@hotmail.com
Subject: Re: Failure (code=4) [smartthreadpool:61763]

From: amibar

I got it, and asked for a code snippet that generates the error.

Ami

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jul 10, 2009 at 4:54 PM
Win32 error code 4 means: "The system cannot open the file.", does it make any sense to you ?

On Fri, Jul 10, 2009 at 5:49 PM, jonathon_walsh <notifications@codeplex.com> wrote:

From: jonathon_walsh

I sent you the code snippet – I am assuming you did not get that? Just in case, here is another snippet:

                    BridgeProviderParams myBridgeProviderParams = DataRepository.BridgeProviderParamsProvider.GetByParamKeyProviderTypeId("XactwareThreads", 1);

                    int intXactwareThreads = 1;

                    if (myBridgeProviderParams != null)

                        if (myBridgeProviderParams.ParamValue != "")

                            int.TryParse(myBridgeProviderParams.ParamValue, out intXactwareThreads);

                    SmartThreadPool smartThreadPool = new SmartThreadPool(30000, intXactwareThreads);

                    IWorkItemsGroup wig = smartThreadPool.CreateWorkItemsGroup(1);

                    wig.OnIdle += new WorkItemsGroupIdleHandler(wig_OnIdle);

                    foreach (FileInfo myFile in myFiles)

                    {

                        wig.QueueWorkItem(new WorkItemCallback(this.RunDataBridgeThread), myFile);

                    }

                    smartThreadPool.WaitForIdle();

                    smartThreadPool.Shutdown();

From: amibar [mailto:[email removed]]
Sent: Friday, July 10, 2009 11:47 AM


To: [email removed]
Subject: Re: Failure (code=4) [smartthreadpool:61763]

From: amibar

I got it, and asked for a code snippet that generates the error.

Ami

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Ami
Jul 10, 2009 at 4:55 PM

That helps out a lot. I think I might be able to track that down now.

Thanks,

Jon

From: amibar [mailto:notifications@codeplex.com]
Sent: Friday, July 10, 2009 11:54 AM
To: jonathon_walsh@hotmail.com
Subject: Re: Failure (code=4) [smartthreadpool:61763]

From: amibar

Win32 error code 4 means: "The system cannot open the file.", does it make any sense to you ?

On Fri, Jul 10, 2009 at 5:49 PM, jonathon_walsh <notifications@codeplex.com> wrote:

From: jonathon_walsh

I sent you the code snippet – I am assuming you did not get that? Just in case, here is another snippet:

BridgeProviderParams myBridgeProviderParams = DataRepository.BridgeProviderParamsProvider.GetByParamKeyProviderTypeId("XactwareThreads", 1);

int intXactwareThreads = 1;

if (myBridgeProviderParams != null)

if (myBridgeProviderParams.ParamValue != "")

int.TryParse(myBridgeProviderParams.ParamValue, out intXactwareThreads);

SmartThreadPool smartThreadPool = new SmartThreadPool(30000, intXactwareThreads);

IWorkItemsGroup wig = smartThreadPool.CreateWorkItemsGroup(1);

wig.OnIdle += new WorkItemsGroupIdleHandler(wig_OnIdle);

foreach (FileInfo myFile in myFiles)

{

wig.QueueWorkItem(new WorkItemCallback(this.RunDataBridgeThread), myFile);

}

smartThreadPool.WaitForIdle();

smartThreadPool.Shutdown();

From: amibar [mailto:[email removed]]
Sent: Friday, July 10, 2009 11:47 AM


To: [email removed]
Subject: Re: Failure (code=4) [smartthreadpool:61763]

From: amibar

I got it, and asked for a code snippet that generates the error.

Ami

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Ami

Read the full discussion online.

To add a post to this discussion, reply to this email (smartthreadpool@discussions.codeplex.com)

To start a new discussion for this project, email smartthreadpool@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com