TurboPack / MustangpeakVirtualshellTools

Delphi and CBuilder Components to create Explorer type programs
Other
49 stars 24 forks source link

TreeView and stack overflow #15

Closed wmeyer48 closed 3 years ago

wmeyer48 commented 3 years ago

In Delphi 10.3 CE, installed VirtualTrees, and then the MustangPeak components, all from GetIt.

Built a small, simple project, with VirtualExplorerComboBox and VirtualExplorerTreeView. I set the Path in the combobox to C:\ and set active. I see it respond in design mode. Then I set the VirtualExplorerTreeView to active, and after some delay, it crashes, having exhausted the stack. If I instead set the treeview active at runtime, it also crashes.

Captured a call stack, which is attached. TreeView-crash-CallStack.txt

Project: DF-20201022a.zip

pyscripter commented 3 years ago

I cannot reproduce this issue with Delphi 10.4.1.

I have tested your project and works fine at design time and run time in both 32 and 64 bits. I am using the latest version of VirtualTrees. Could you please test with the latest version of VirtualTrees. If it works I will ask Embarcadero to update the GetIt version of VirtualTrees. Otherwise I will have a look at Delphi Rio compatibility.

wmeyer48 commented 3 years ago

I uninstalled VirtualTrees and pulled from GitHub for that, as well. Uninstalled them all, and reinstalled VirtualTrees, then MustangpeakCommonLib, EasyListView, and VirtualShellTools. As far as I could tell, that is the desired order.

You mentioned changing a reference in Mustangpeak to refer to the TurboPack VirtualTrees. But you also said it expected the TurrboPack version. So I am confused. Having uninstalled and started over, and placed in the Library Path each of the source folder locations, what else is needed?

pyscripter commented 3 years ago

TurboPack VirtualTrees and the main VirtualTrees have different naming of the packages (probably on purpose). VirtualShellToos by default uses the Turbo VirtualTrees. You need to change the dependency in the VirtualShellTools package to refer to the installed VirtualTrees package.

Here is what you need to do:

  1. Unistall VirtualTrees
  2. Place the attached packages (inside the zip file) in the appropriate VirtualTree package folder (RAD Studio 10.3 for Rio)
  3. Edit the two packages and change the LIBSUFFIX to match the Delphi version (260 for RIO)
  4. Compile and install these two packages

Now that VirtualTrees is installed install VirtualShellTools.

RAD Studio 10.4.zip

wmeyer48 commented 3 years ago

Did as you said. Was able to install all without incident. Moreover, in my own little test app, I am able to set active the VirtualExplorerCombobox, VirtualExplorerTreeview and VirtualExplorerEasyListview and see what they should present. No more IDE crash. The app will not build, but reports 13 errors. I then tried one of the demo programs, CheckBoxes.dpr, which also reported 13 errors:

E:\Delphi\Comps\MustangPeak\EasyListView\Source;E:\Delphi\Comps\MustangPeak\VirtualShellTools\Source;E:\Delphi\Comps\VirtualTreeView\Source -K00400000 -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 CheckBoxes.dpr
[dcc32 Error] VirtualExplorerTree.pas(721): E2037 Declaration of 'LoadFromFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(723): E2037 Declaration of 'SaveToFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(778): E2037 Declaration of 'LoadFromFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(780): E2037 Declaration of 'SaveToFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(845): E2037 Declaration of 'LoadFromFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(851): E2037 Declaration of 'SaveToFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(886): E2037 Declaration of 'LoadFromFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(889): E2037 Declaration of 'SaveToFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(911): E2037 Declaration of 'LoadFromFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(916): E2037 Declaration of 'SaveToFile' differs from previous declaration [dcc32 Error] VirtualExplorerTree.pas(1293): E2003 Undeclared identifier: 'TCommonVirtualImageList' [dcc32 Error] VirtualExplorerTree.pas(1294): E2007 Constant or type identifier expected [dcc32 Fatal Error] VirtualExplorerTree.pas(2972): F2063 Could not compile used unit 'ColumnForm.pas' Failed

Again, to be clear, the VirtualTrees source is what I downloaded from GitHub two days ago. VirtualTrees.zip

pyscripter commented 3 years ago

It appears you are using an old and incompatible version of MustangpeakCommonLibrary (C:\Users\wmeyer\Documents\Embarcadero\Studio\20.0\CatalogRepository\MustangpeakCommonLibrary-2.5-Rio\source)

My guess is that your version uses WideStrings (for the FileName in LoadFromFile and elsewhere) which have been now replaced by standard strings.

You need to use the version in the Github repository.

So please use everything from Github:

The first three have been updated in GetIt but for Delphi 10.4

wmeyer48 commented 3 years ago

As I said in my comment of three days ago, after you suggested that the packages in GetIt might be a problem, I uninstalled everything, and pulled from GitHub, then installed anew. I just verified (with BeyondCompare) a fresh pull from GitHub of the CommonLibrary that it matches what I already have.

Removed all. Reinstalled from the GitHub code -- but with the modified DPK files you attached above. End result is the same; my project looks good at design time, but on build, I get 13 errors. The same as in the list above.

I don't have time to keep chasing this. I appreciate your help, but the MustangPeak stuff seems to have issues, and as this is on my own time, secondary to my primary goal which is to produce some demos for a book, I think I must abandon this for now.

pyscripter commented 3 years ago

I am sorry about your troubles. My guess is that you have installed an earlier version of the CommonLibrary at C:\Users\wmeyer\Documents\Embarcadero\Studio\20.0\CatalogRepository\MustangpeakCommonLibrary-2.5-Rio\source) and the Library path uses that despite having installed the latest version.

Anyway your time and my time are limited. I am closing this since:

whitehairedgeezer commented 3 years ago

Can I confirm that either of the treeviews will crash immediately they are set to active within the RAD 3 (Rio) Delphi design desktop. Similarly if you set them to active within the program the program immediately crashes. I cannot even load the demo forms which contain (I assume) the treeviews already set to active since RAD crashes before they load. I've loaded the components from the GetIt manager and by downloading direct from Github.