I’ve started getting these crashes (intermittently) when accessing MSSQL via the ODBC plugin.
i don’t get a chance to handle the exception, it just crashes.
the debugger in .net shows the following, but I’m not sure how to proceed from here, any advice is welcome!
Unhandled exception at 0x60E235A3 (ODBCPlugin.dll) in hcsOrders.exe: 0xC0000005: Access violation reading location 0x00200228.
Before each SQLSelect or SQLExecute, write something to a log file and flush the file. Perhaps write the current method name and SQL statement. See if it’s crashing in the same place consistently. If it is, you’ve probably found some combination of column types and/or values returned by the server on which the plugin is choking. Isolate it, file a bug report.
Then Brad’s suggestion is the best. At this point you don’t know a lot so you’re going to have to start logging or profiling your code to see where this is happening. I am assuming you are checking the DB.error after every operation to see if the database is flagging an error?
hmmm. i added some logging that just writes where i am to a text area. when i put the logging in it runs perfectly.
i THINK i have identified the area that makes the crash happen.
but its not actually accessing the recordset.
the logic is
display(rs as recordset)
removecontrols()
add controls based on the recordset passed in
End sub
if i take the code in the remove controls() sub and paste it at the top of the display sub, it doesn’t crash
if i run that code in a sub then it crashes.
if i have the code in the sub and add a line to log to my text area after the call to remove controls. it doesn’t crash.
The reason to write to a file and flush/close is to ensure that you log closest to the crash. From your description though, it sounds like an issue triggered by the data in the results. There’s also an ODBC layer in all this. Any chance that middleware needs an update?
well, I’m not sure its the data because i am retrieving exactly the same data when it crashes as when it works.
regardless though, i think a hard crash that i cannot handle even with app.unhandledexception must be a bug in the dojo framework
so I’ve added a feedback bug report.
although until its fixed, i can’t go much further so I’m stumped!