Reputation: 1730
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web Services for data gathering/publishing.
On to the error: Our application mysteriously crashes on one of our clients computers, it works fine on the other computers in their office, but not on the big whigs' computer, which now makes it my problem. It appears to be a software conflict of some sort as they have replaced the computer (with the same software configuration I assume) but the error still persists. I'm currently waiting to hear back from their IT staff on whether there are any known differences between this user's setup and the others in that office.
What's even more annoying is the app just disappears. We can't easily debug it as no error messages are shown, even though we have specific code in there to catch unhandled exceptions and display a message, it just closes.
However, our exception handling code is being called (at least partially) because it successfully logs this following error (just does not show it to the user like other normal errors):
Error Message: Queue grow factor must be between 1 and 10.
Stack Trace: at
System.Collections.Queue..ctor(Int32 capacity, Single growFactor) at
System.Collections.Queue..ctor() at
System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at
System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args) at
System.Windows.Forms.Form.OnLoad(EventArgs e) at
System.Windows.Forms.Form.OnCreateControl() at
System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at
System.Windows.Forms.Control.CreateControl() at
System.Windows.Forms.Control.WmShowWindow(Message& m) at
System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.ScrollableControl.WndProc(Message& m) at
System.Windows.Forms.ContainerControl.WndProc(Message& m) at
System.Windows.Forms.Form.WmShowWindow(Message& m) at
System.Windows.Forms.Form.WndProc(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at
System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Now the really curious part is that we're not using Queues at all in the code that should be running at this point. (User opens app, tries to login, bam, error happens) The only Queues referenced anywhere in code is in a very specific function that is only ever run in a testing mode in-house. And it has no problems there whatsoever.
I'm kind of at a loss as to where to proceed with this problem, so any input would be appreciated.
Edit: Ok I've finally been in contact with their IT department, he was running .NET 2.0 as I suspected. I had the IT guy repair the .NET install from Add/Remove Programs and after that the problem no longer existed. So it was in fact a .NET issue
Upvotes: 0
Views: 1074
Reputation: 345
I had a similar problem - I found this question posted looking for answers. In my case, I'd been working along fine, then updated to latest from my source code control, and after a build all of a sudden I'm seeing this problem at program startup time. Whaaa...?? How could System.Collections.Queue..ctor() suddenly be calling System.Collections.Queue..ctor(Int32, Single) where the 2nd arg wasn't between 1 and 10?
System.ArgumentOutOfRangeException was unhandled Message="Queue grow factor must be between 1 and 10.\r\nParameter name: growFactor" Source="mscorlib" ParamName="growFactor" StackTrace: at System.Collections.Queue..ctor(Int32 capacity, Single growFactor) at System.Collections.Queue..ctor() at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args) at System.Windows.Forms.Control.BeginInvoke(Delegate method) ... my code below here ...
Reflector clearly shows this code:
public Queue() : this(0x20, 2f)
{
}
Turns out that prior to this code executing, I was P/Invoking to native code through a P/Invoke signature that did not match the native code (which had changed in SCM). (My build process did not properly copy the updated native DLL into the correct location.) So somehow the stack was corrupted at that point, leading to this unexplained badness.
Upvotes: 2
Reputation: 1730
That's one of the things I'm waiting to hear back from their IT staff about. Our app requires at least .NET 2.0, but I haven't personally done any testing with 3.5, I might have a chance to look into it later today..
Upvotes: 0
Reputation: 5107
Is it possible that this user doesn't have the appropriate .net framework? I'm guessing your application requires 2.0, but maybe he/she has 3.5? Is he running a different version of windows than the other users?
The problem is not happening with your code but the lower level .net BCL.
Upvotes: 2