Issue Details (XML | Word | Printable)

Key: DNET-749
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Donald Jansen
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
.NET Data provider

StackOverflowException when FbDataReader is disposed from FbCommand and has CommandBehavior.CloseConnection

Created: 30/Mar/17 10:58 AM   Updated: 05/Apr/17 12:52 PM
Component/s: ADO.NET Provider
Affects Version/s:,
Fix Version/s:

File Attachments: 1. File App.config (0.9 kB)
2. Text File FirebirdConnector.cs (5 kB)

Image Attachments:

1. Untitled.png
(166 kB)
Environment: Windows 10 and Windows 7

 Description  « Hide
The following exception is being thrown, and is not handled by a try...catch...finaly

System.StackOverflowException was unhandled
Message: An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

There is no stacktrace available with this exception

The exception seems to come from the DataReader.Read()
If the DataReader is empty it is thrown directly,
if the DataReader has rows then it is thrown after the last row was handled

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Donald Jansen added a comment - 30/Mar/17 10:59 AM
This is the source code, the error seems to come from while (result.Read()).

Donald Jansen added a comment - 30/Mar/17 11:01 AM
The screenshot add did not work, but here is one

Donald Jansen added a comment - 30/Mar/17 11:14 AM
a change from
                        var result = command.ExecuteReader(CommandBehavior.CloseConnection);
                        var result = command.ExecuteReader();

Seems to be a work around, I am guessing the issue comes from 'CommandBehavior.CloseConnection'