Menu

#36 C# application has C++ Rutime error dialogbox

open
nobody
None
5
2010-06-07
2010-06-07
chris xiao
No

This is an existing problem for version 1.12.4 and 1.13.3 when our C# application use the quicfix_net.dll. We occassionally had C++ Rutime error Dialogbox and had a difficult time to find out the causes. Several FIX engine application have Quickfix configured to use ODBC Store for FIX messages using a common instance of MS SQL 2008.

When we shutdown database server for other test purpose, all FIX engines had the 'C++ runtime error" dialobox pops up. This accidence lead to the finding of one possible causes of C++ runtime error: When Quickfix does its own chores asuch as persisting messages, for example, Heatbeat to message store, and eventually calls ODBCQuery.execute(), a ConfigError() exception will be thrown. However, it seems that this excpetion is thrown outside all threading contexts of QuickFix-based application, the OS caught the error and displays Runtime C++ dialog box.

I was thinking of a wrapper class of ODBCStore, that will capture such exceptions, and send it to our application, which can then opt to exit gracefully. One possible mechanism would be using the observer design pattern.

reconnect() in the following will throw an exception.

bool execute( OdbcQuery& pQuery )
{
Locker locker( m_mutex );
if( !pQuery.execute( m_connection ) )
{
reconnect();
return pQuery.execute( m_connection );
}
return true;
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.