TacShellListView 6.30

Viewing 11 posts - 21 through 31 (of 31 total)
  • Author
    Posts
  • #39143
    emailaya
    Participant

    i will give it a try and let u know

    should i just replace it or rebuild AC?

    #39147
    Support
    Keymaster

    You must rebuild AC if problem occurs in design-time..

    #39158
    emailaya
    Participant

    done but the 2 problems are still there

    does anyone get the runtime problem? im simply getting into my computer (desktop is the root) and when closing the form i get the error about terminating external thread

    #39159
    emailaya
    Participant

    here is the call stack for the runtime problem which is the important one for me, please give me a hint on what to check

    operating system : Windows XP Service Pack 3 build 2600
    system up time : 6 days 1 hour
    program up time : 21 seconds
    processors : 2x IntelĀ® Core™2 Duo CPU E6750 @ 2.66GHz
    physical memory : 822/2047 MB (free/total)
    free disk space : (C:) 20.79 GB
    display mode : 1280×1024, 32 bit
    process id : $d8c
    allocated memory : 68.51 MB
    exec. date/time : 2009-05-12 20:23
    compiled with : Delphi 2009
    madExcept version : 3.0i beta 2
    callstack crc : $3711964c, $42dd294a, $917fd14b
    exception number : 1
    exception class : EThread
    exception message : Cannot terminate an externally created thread.

    main thread ($e1c):
    00484c40 +0018 app.exe Classes 11419 +1 TThread.Terminate
    005f8ccb +0027 app.exe acShellCtrls 1453 +5 TacCustomShellChangeNotifier.Destroy
    00404ad8 +0008 app.exe System 9806 +1 TObject.Free
    005fbe46 +0022 app.exe acShellCtrls 2802 +1 TacCustomShellListView.Destroy
    0050b5f1 +008d app.exe Controls 7737 +16 TWinControl.Destroy
    00513041 +001d app.exe Controls 12703 +2 TCustomControl.Destroy
    00618dde +002e app.exe sPanel 155 +2 TsPanel.Destroy
    0050b5f1 +008d app.exe Controls 7737 +16 TWinControl.Destroy
    004eca20 +0028 app.exe Forms 2644 +3 TScrollingWinControl.Destroy
    004ed959 +00f9 app.exe Forms 3246 +33 TCustomForm.Destroy
    00404ad8 +0008 app.exe System 9806 +1 TObject.Free
    004f2bdc +0000 app.exe Forms 6232 +0 TCustomForm.CMRelease
    00509b96 +02d2 app.exe Controls 6642 +91 TControl.WndProc
    00639eab +0383 app.exe sSpeedButton 870 +83 TsSpeedButton.WndProc
    005097bc +0024 app.exe Controls 6420 +10 TControl.Perform
    00637162 +0032 app.exe sFade 249 +2 TsAnimTimer.Repaint
    0065c8b0 +4b20 app.exe sSkinProvider 2907 +1265 TsSkinProvider.NewWndProc
    7c90e470 +0010 ntdll.dll KiUserCallbackDispatcher
    0050d7b4 +002c app.exe Controls 9065 +3 TWinControl.MainWndProc
    00485dcc +0014 app.exe Classes 12723 +8 StdWndProc
    7e418a0b +000a USER32.dll DispatchMessageW
    004f71c3 +00f3 app.exe Forms 9613 +23 TApplication.ProcessMessage
    004f7206 +000a app.exe Forms 9643 +1 TApplication.HandleMessage
    004f7531 +00c9 app.exe Forms 9780 +26 TApplication.Run
    00a34d86 +017a app.exe app 74 +21 initialization

    #39160
    emailaya
    Participant

    conclusion for now about the runtime error:
    1) the fix causes a major memory leak!
    procedure TacCustomShellListView.ClearItems;
    var
    I: Integer;
    begin
    if not HandleAllocated or (Items.Count = 0) then Exit; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    if not (csDestroying in ComponentState) then Items.Clear; // Count := 0; v5.05
    for I := 0 to FFolders.Count-1 do <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    if Assigned(Folders) then
    TacShellFolder(Folders
    ).Free;
    FFolders.Clear;
    end;

    if this procedure does not execute because of the first marked line (added as suggested by the fix), the second marked line is not executed and alot of TacShellFolder are not freed!

    2) the runtime problem is coming from here:
    destructor TacCustomShellChangeNotifier.Destroy;
    var
    Temp : TacShellChangeThread;
    begin
    if Assigned(FThread) then begin
    OnChange := nil;
    Temp := FThread;
    FThread := nil;
    Temp.Terminate; <<<<<<<<<<<<<<<<<<<<<<<<<<<
    ReleaseMutex(Temp.FMutex);
    end;
    inherited;
    end;

    for some reason, there are certain scenarios when the form is freed and the marked line throws the mentioned error. now get this! even with this line, there is a memory leak caused by this thread! in other words, this .Terminate doesnt seem to have any effect. commenting this line solves the error. because with or without it i didnt notice any change (surely not mem leak point of view) i'll keep this as a solution unless someone here will enlighten me.

    #39162
    Hunni
    Participant

    QUOTE (emailaya @ May 12 2009, 09:45 PM)
    conclusion for now about the runtime error:
    1) the fix causes a major memory leak!
    procedure TacCustomShellListView.ClearItems;
    var
    I: Integer;
    begin
    if not HandleAllocated or (Items.Count = 0) then Exit; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    if not (csDestroying in ComponentState) then Items.Clear; // Count := 0; v5.05
    for I := 0 to FFolders.Count-1 do <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    if Assigned(Folders) then
    TacShellFolder(Folders
    ).Free;
    FFolders.Clear;
    end;

    if this procedure does not execute because of the first marked line (added as suggested by the fix), the second marked line is not executed and alot of TacShellFolder are not freed!

    2) the runtime problem is coming from here:
    destructor TacCustomShellChangeNotifier.Destroy;
    var
    Temp : TacShellChangeThread;
    begin
    if Assigned(FThread) then begin
    OnChange := nil;
    Temp := FThread;
    FThread := nil;
    Temp.Terminate; <<<<<<<<<<<<<<<<<<<<<<<<<<<
    ReleaseMutex(Temp.FMutex);
    end;
    inherited;
    end;

    for some reason, there are certain scenarios when the form is freed and the marked line throws the mentioned error. now get this! even with this line, there is a memory leak caused by this thread! in other words, this .Terminate doesnt seem to have any effect. commenting this line solves the error. because with or without it i didnt notice any change (surely not mem leak point of view) i'll keep this as a solution unless someone here will enlighten me.

    Hi,

    when I use the Standard (modified) ShellCtrls.pas from Delphi + SkinManager and SkinProvider, then I don't get your Errors. (ListIndex… , Problem with BackButton…)
    Only If I use the ACShellCtrls I can see the same Errors.

    Include I send my modified ShellCtrls.pas from Delphi 2009

    I think, Serge include the Fix on to many places, which causing no problems.

    Torsten

    #39163
    emailaya
    Participant

    QUOTE (Hunni @ May 12 2009, 11:10 PM)
    Hi,

    when I use the Standard (modified) ShellCtrls.pas from Delphi + SkinManager and SkinProvider, then I don't get your Errors. (ListIndex… , Problem with BackButton…)
    Only If I use the ACShellCtrls I can see the same Errors.

    Include I send my modified ShellCtrls.pas from Delphi 2009

    I think, Serge include the Fix on to many places, which causing no problems.

    Torsten

    there seems to be no relation between the designtime and runtime errors and to be honest, i prefer the runtime problem to be fixed rather than the design time.
    not sure what u meant by your last sentence but i hope your attachment will help serge solve the designtime problem. i suggest you to check for memory leaks because there might be memory leaks even with the original shellctrls unit.

    what did u mean by “Problem with BackButton…” ?

    #39164
    Hunni
    Participant

    QUOTE (emailaya @ May 12 2009, 10:52 PM)
    what did u mean by “Problem with BackButton…” ?

    –> lsflShell.Back This is working well for me with the Standard ShellCtrls

    You are right, also in the Original Version are still some memory leaks

    That's also why I use a different ShellCtrl (http://www.jam-software.com/shellbrowser_delphi/) for my projects

    #39165
    emailaya
    Participant

    i didnt know there was a problem with the back button though i guess the whole component is not so stable…

    the component you suggested looks promising but they are too expensive for me, do u know of a good replacements (with AC support) that are free/cheap relatively?

    i dont need too many features out of it, that' why delphi's components are perfect from this point of view.

    #39222
    emailaya
    Participant

    Serge (and Torsten), i think u should read this
    http://www.kutinsoft.com/Hints/DelphiHints.php

    #39292
    emailaya
    Participant

    hi
    attached changes i have made according to the site i posted earlier. the changes are based on 6.23 version because the previous changes (made in 6.32) led to memory leaks while 6.23 seems to be as similar as possible to the original for which the changes in the above site addressed.

    initial tests show no problems with it, im still testing it but i think this unit should be used instead
    thanks

Viewing 11 posts - 21 through 31 (of 31 total)
  • You must be logged in to reply to this topic.