[gdbm] - Access Violation masquerading as another Exception, needs resport? lazarus / 63-Database ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2022-05-17 11:17 Hey Y'all, I've been playing around with the GNU DBM key/value pair database. You can find some examples on how to do it under the FPC source on the packages/gdbm/examples folder. As a disclaimer I haven't compiled nor ran those examples. Nonetheless, I did copy the code, almost verbatim to my TestGNUDBM playground project. The issue is that on the line that retrieves the last of the keys with gdbm_nextkey() it throws and Access Violation exception. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i try  key:= gdbm_nextkey(FDB, key);except  on E: Exception do  begin    memLog.Append(Format('ERROR: %s', [E.Message]));    memLog.Append('Need to report this error triggered on the last entry');    key:= '';  end;end; In debug, if you continue running the program it then issues another exception with the following text -ish: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ### Not supported on GDB < 5.3 ### Can the experts please tell me if this is a known issue so I don't duplicate an issue posting? At the moment I'm gobbling up the exception so my code doesn't completely break, as you can see on the GitHub repo source code. I would like not to have to do it. Even if traversing the whole database is not the most common way to use a key/value pair store. Cheers, Gus ---------------------------------------------------------------------- marcov · 2022-06-17 09:11 Sounds to me as the gdbm header is outdated. There is not much use of gdbm, so that wouldn't surprise me. Most people opt for postgres, firebird, mysql or sqlite ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2022-06-17 11:32 Hey Marco, Quote from: marcov on June 17, 2022, 11:11:06 amSounds to me as the gdbm header is outdated. Thanks! So what should I do next? Quote from: marcov on June 17, 2022, 11:11:06 amThere is not much use of gdbm, so that wouldn't surprise me. Most people opt for postgres, firebird, mysql or sqlite I completely agree with you, but when you're messing about with pure key/value pair databases, Free Pascal is rather lacking support on the new kid on the block: LevelDB. To be honest, GDBM was the only thing supported out of the box Cheers, Gus