Forum > LCL

Where does "External Access Violation" come from mostly?

<< < (2/3) > >>

cdbc:
Hi
Come to think of it...
I once had a run-in with the memory-manager and managed types; If you have managed types(strings, arrays & interfaces) and suddenly cut off the connection to the memory-manager in charge, you'll hear that kind of screamin' from your machine, when the compiler tries to free memory  :D  >:(  :D
It's kinda fun, just you try and remove the memory-manager in a running application... 8-)
Regards Benny

egsuh:
Not easy to do anything...


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TCustomGrid.WndProc(var TheMessage: TLMessage);begin  {$ifdef GridTraceMsg}  TransMsg('GRID: ', TheMessage);  {$endif}  case TheMessage.Msg of    LM_HSCROLL, LM_VSCROLL:      if csDesigning in ComponentState then        exit;    {$IFDEF MSWINDOWS}    // Ignore LM_SIZE while another sizing is being processed.    // Windows sends WM_SIZE when showing/hiding scrollbars.    // Scrollbars can be shown/hidden when processing DoOnChangeBounds.    LM_SIZE:      if gfUpdatingSize in FGridFlags then        exit;    {$ENDIF}  end;  inherited WndProc(TheMessage);  if not (FGridState in [gsColMoving, gsRowMoving]) then //For sure if MouseUp event is lost    FreeAndNil(FScroller);        // <===================  the error comes from here. end; 

MarkMLl:
Expect a problem if fScroller is only one of several references (pointers) to the instance being freed.

MarkMLl

cdbc:
Hi

--- Quote ---  if not (FGridState in [gsColMoving, gsRowMoving]) then //For sure if MouseUp event is lost
    FreeAndNil(FScroller);        // <===================  the error comes from here.

--- End quote ---
Is this your doing or Lazarus' ?!?
Regards Benny

egsuh:

--- Quote from: cdbc on June 05, 2024, 09:59:40 am ---Hi

--- Quote ---  if not (FGridState in [gsColMoving, gsRowMoving]) then //For sure if MouseUp event is lost
    FreeAndNil(FScroller);        // <===================  the error comes from here.

--- End quote ---
Is this your doing or Lazarus' ?!?
Regards Benny

--- End quote ---

This is Lazarus. unit Grids.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version