Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"I have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
"I had always used ******* but for the past 2 weeks have been trying DTN IQFeed. Customer support has been extraordinary. They call just to make sure your problem hasn't recurred." - Comment from Public Forum
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"My broker in Davenport suggested I give you a try as he uses your service and says its the best." - Comment from Bill via RT Chat
"I am very happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"I just wanted to tell you what a fine job you have been doing. While *******, from what I hear, has been down and out, off and on, IQ feed has held like a champ this week." - Comment from Shirin
"You are either overstaffed or people just don't have problems with your feed because customer support always answers the phone quickly." - Comment from Jay via Email
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Unhandled win32 exception in .NET 2.0 application
Author Topic: Unhandled win32 exception in .NET 2.0 application (4 messages, Page 1 of 1)

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: Jun 22, 2007 08:12 AM          Msg. 1 of 4
Hello guys,

While testing my application on different use cases and situations, I have found a reproducible issue where a crush of my .NET 2.0 application occurs.

It can be reproduced when I'm logging into IQFeed twice from different computers with the same account. On the first PC I see the following message: "IQConnect has been disconnected from the server. Please make sure you are logging in only once". At that time my application was performing the batch update of historical data for many symbols. It deals with IQFeed using COM interface (DTNHistoryLookup.dll). After the disconnect, my application crushed with unhandled win32 exception "access violation..."

Here is my unmanaged stack trace (from last):

ntdll.dll!7c918fea()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!7c919aeb()
ntdll.dll!7c919ba0()
ole32.dll!774ffaba()
DTNHistoryLookup.dll!08e3ebb4()
DTNHistoryLookup.dll!08e40214()
ntdll.dll!7c90104b()
DTNHistoryLookup.dll!08e3fa31()
DTNHistoryLookup.dll!08e40214()
DTNHistoryLookup.dll!08e3ea4c()
DTNHistoryLookup.dll!08e3ea72()
> mfc80.dll!ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::AllocSysString() Line 2185 + 0x40 bytes C++
DTNHistoryLookup.dll!08e3dd57()
MSCTF.dll!74730e71()
user32.dll!7e41f84a()
user32.dll!7e41f7f6()
user32.dll!7e41f805()
user32.dll!7e41f805()
user32.dll!7e41f94b()
user32.dll!7e41f95b()
ntdll.dll!7c90eae3()
user32.dll!7e42e051()
mfc80.dll!AfxInternalPumpMessage() Line 153 + 0xf bytes C++
mfc80.dll!CWinThread::Run() Line 625 + 0x7 bytes C++
mfc80.dll!_AfxThreadEntry(void * pParam=0x0c84f61c) Line 126 C++
msvcr80.dll!_callthreadstartex() Line 348 + 0x6 bytes C
msvcr80.dll!_threadstartex(void * ptd=0x0b4aca30) Line 326 + 0x5 bytes C
kernel32.dll!7c80b683()

And here are the error details:

Unhandled exception at 0x7c918fea in <myapp>.exe: 0xC0000005: Access violation writing location 0x61746174.

EventLog item:
Faulting application <myapp>.exe, version 1.0.0.0, stamp 467a9608, faulting module ntdll.dll, version 5.1.2600.2180, stamp 411096b4, debug? 0, fault address 0x00018fea.

As you know, .NET Framework 2.0 provides exception wrapping. It means that they guarantee that all non .NET exception (as the native win32 exception) would be wrapped to .NET compatible exceptions and users will be able to catch and process them. However, framework bypasses this one. I think it's probably a bug in the framework.

I do not assume that you, on your side, are doing something wrong. I'm just asking to check (once again) what's happening on the forced connection closure.

It's very important for me as the same crush has been reproduced with other situation. Say, if my application is working for a few hours (requesting historical data and adding a watch list for about 700 symbols). Thus I cannot handle this exception and the crush doesn't give me the chance to save my data, workspace and so forth. I have to avoid it somehow.

Thanks for your help and support.

Have a nice day.

Dis



File Attached: vs2005 - Exception.jpg (downloaded 1732 times)

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Jun 22, 2007 10:57 AM          Msg. 2 of 4
The disconnect is going to happen becuase you are logging in from 2 separate computers on the same account.

Your IQFeed account only allows a single login. If you need to run 2 separate instances of IQFeed, you will need a second account.

However, I am not certain why the DLL might be causing an application crash. In this situation, I would expect the DLL to finish the current request and return an error message for all requests thereafter. I will look into this further.

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: Jun 27, 2007 07:59 AM          Msg. 3 of 4
Some comments from MSDN forum:

Quote: I'd guess the COM server is starting up an unmanaged thread. The CLR is not going to trap unhandled SEH exceptions in unmanaged threads. They'll bomb your app, nothing you can do about it.


The thread is here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1784273&SiteID=1

It would be great if there wouldn't be any unhandled exceptions

Sincerely,
DIS

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Jun 27, 2007 09:59 AM          Msg. 4 of 4
I did some brief testing with this using the COM example apps (both C++ and the VB examples) and I was unable to duplicate this.

These applications performed as I expected they would. The current request completes and any remaining requests return errors.

The VB examples are written using the .NET 2.0 framework as well so I am wondering if it could be something specific to C#...

Is it possible for you to email developer support with a copy of your app that I can test with or a small example app that duplicates the issue?
 

 

Time: Wed May 8, 2024 4:24 PM CFBB v1.2.0 12 ms.
© AderSoftware 2002-2003