New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JVM Access Violation when using Firebird Embedded [CORE3671] #4021
Comments
Commented by: Walter Marsi (walter) The zip contains all the files I used to deploy my app and a sample java program that should trigger the creation of the hs_err file |
Modified by: Walter Marsi (walter)Attachment: hs_err_pid4120.log [ 12055 ] Attachment: Reproduce.zip [ 12056 ] |
Commented by: @mrotteveel It took a while before I was able to look at this. The problem is that the connection to the database wasn't closed. If you explicitly close the connection the error does not occur. With JDBC you need to make sure you always close the connection yourself after use. I do think that this should not trigger a JVM Access violation in the way it does here, but I don't think it is trivial to change. |
Commented by: @mrotteveel Attached modified file which does not trigger the JVM access violation. |
Modified by: @mrotteveelAttachment: testfb.java [ 12065 ] |
Commented by: @mrotteveel Second workaround is to add Runtime.runFinalizersOnExit(true) to the program. However this API is deprecated and should therefor not be used. |
Commented by: @hvlad Patch for v2.5.2 is committed, please check it using next snapshot build. |
Commented by: @mrotteveel Snapshot builds don't include embedded build, sent mail to devel-list to ask if someone can build one for me. |
Commented by: @mrotteveel Had forgotten about this issue for a while, now tested it with Firebird snapshot 2.5.2.26426 (32 bit) and Java 6 Update 31; the Access Violation does not occur with this Firebird version. After a few seconds the following is logged in firebird.log: In conclusion: this indeed seems to fix the problem. |
Modified by: @dyemanovassignee: Vlad Khorsun [ hvlad ] |
Commented by: @dyemanov Vlad, does it require front porting into the trunk? |
Commented by: @hvlad IIRC, no, trunk is not affected. |
Submitted by: Walter Marsi (walter)
Attachments:
hs_err_pid4120.log
Reproduce.zip
testfb.java
a file named "hs_err_pidXXX.log" appears every time I close my application (the XXX is a number that's different for each file). It seems to happen when I use a select query that contains a stored procedure (something like "SELECT * FROM MY_PROCEDURE...") and read the value of a field (any field). The procedure had worked fine with previous versions of Firebird, and the "hs_err" file is not created when I use the same database with a Firebird server instead of using the embedded version.
Commits: 72dc924 c7d5265
The text was updated successfully, but these errors were encountered: