[SOLVED] Marked memory invalid - wrong signature (using Heaptrc) lazarus / 61-Beginners ---------------------------------------------------------------------- tudi_x · 2017-11-29 14:56 hi All, first time i am seeing the memory in the attached: Marked memory at $xxxx invalid. Wrong signature at $AAAA instead of yyyy. would you know what would be the next step for troubleshooting? thank you Lazarus 1.8RC5 64b on Win 7 ---------------------------------------------------------------------- balazsszekely · 2017-11-29 15:01 It seems like you're tying to free an already freed object. You should check for nil before freeing. 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 if Assigned(TheObject) then  FreeAndNil(TheObject) ---------------------------------------------------------------------- tudi_x · 2017-11-29 15:39 thank you for the hint! i was dealing with an object that was based on TThread. assign was still seeing the object somewhere so the destroy was called but i deleted the destroy call.