[SOLVED] Access violation lazarus / 21-General ---------------------------------------------------------------------- petevick · 2022-11-09 10:45 I know this is probably an unanswerable question, but, one of my programmes is creating an Access violation on a mates PC running Windows 10 and OneDrive (may or may not be pertinent), when on my PC running Windows 10 and OneDrive I don't get an Access violation. And how the hell would one go about trying to find what's causing it if you can't create the error ?? ---------------------------------------------------------------------- Zvoni · 2022-11-09 10:48 Quote from: petevick on November 09, 2022, 11:45:52 amI know this is probably an unanswerable question, but, one of my programmes is creating an Access violation on a mates PC running Windows 10 and OneDrive (may or may not be pertinent), when on my PC running Windows 10 and OneDrive I don't get an Access violation. And how the hell would one go about trying to find what's causing it if you can't create the error ?? Create a Logging-Feature in your program, and let it run on your mates computer. When the AV appears (Crash!) it should basically be the last entry in the log-file ---------------------------------------------------------------------- petevick · 2022-11-09 11:57 Quote from: Zvoni on November 09, 2022, 11:48:47 amCreate a Logging- Feature in your program, and let it run on your mates computer. When the AV appears (Crash!) it should basically be the last entry in the log-file Thanks for the reply Zvoni, didn't even know this was possible  I'm looking at using TEventLog, any idea what I should I set the DefaultEventType to for an Access violation, etCustom, etDebug, etError, etInfo or etWarning ?? ---------------------------------------------------------------------- Zvoni · 2022-11-09 12:58 No idea. Never worked with it. Usually, i just use my own loggin (writing to a simple txt-file). Kind of like (Aircode) 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 {$IFDEF MyDebug} //MyDebug is a global variable/constantWriteToLog('MyProcedureName', 'VarValue1='+Value1); //Add other information....{$IFEND} The moment your program crashes, basically the last line in the txt is your primary indicator/suspect for the crash. Maybe someone else with experience with TEventLog can chip in, though as i read it, TEventLog writes to the System-Log (!!) Maybe LazLogger is the better Option? https://wiki.freepascal.org/LazLogger ---------------------------------------------------------------------- petevick · 2022-11-10 07:01 So my 'mate' was using the wrong version of my app.....'apparently', and surprisingly, the right version works without error ---------------------------------------------------------------------- Zvoni · 2022-11-10 08:24 Quote from: petevick on November 10, 2022, 08:01:56 amSo my 'mate' was using the wrong version of my app.....'apparently', and surprisingly, the right version works without error  Muhaha, the "classic" OTOH, it does seem to indicate, that you might have been "lucky". Unhandled errors and all that rot. ---------------------------------------------------------------------- petevick · 2022-11-10 08:43 Quote from: Zvoni on November 10, 2022, 09:24:34 amOTOH, it does seem to indicate, that you might have been "lucky". Unhandled errors and all that rot. The newer version was to fix the Access violation error that was happening in Windows using OneDrive, duplicate folders and all that rubbish.