SVNDetails - TortoiseSVN content plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Stefan2, white, sheep, Hacker

Post Reply
tufftaeh
Junior Member
Junior Member
Posts: 12
Joined: 2009-03-24, 17:04 UTC
Location: Karlsruhe, Germany

Post by *tufftaeh » 2013-02-04, 14:45 UTC

In the meantime, Christian Ghisler has found that the SVNDetails3 plugin crashes when calling a non-existent function in libapr_svn.dll.
FileInfo 2.21 shows apr_pool_destroy as "not succesfully loaded".
SVNDetails crashes inside the function ContentSetDefaultParams.

On his computer, he can start TC on a different tab page and then change to a tab page using SVNDetails columns. On my computer, this causes TC to crash (if the plugin had been installed before TC was closed the last time).

(Dependency Walker shows that gssapi64.dll cannot be loaded when the crash happens after changing the tab page.)

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37630
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2013-02-04, 14:52 UTC

Indeed both the 32-bit and 64-bit plugin crash here in function ContentSetDefaultParams.
Author of Total Commander
http://www.ghisler.com

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-02-04, 16:53 UTC

I was able to reproduce this issue using a Windows 8 VM. It seems that it is caused by a timing issue and/or race condition in ContentSetDefaultParams(). When moving the first-time initialization of the corresponding SVN-structures to ContentGetValueW() SVNDetails works as expected :-)

Can anybody else confirm that this solves the crash before I update the install package on SourceForge.net?

User avatar
tbeu
Power Member
Power Member
Posts: 1266
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu » 2013-02-05, 12:49 UTC

Thomas, did you also try to recompile using latest TortoiseSVN 1.7 sources and lib dependencies (from http://tortoisesvn.googlecode.com/svn/branches/1.7.x/src)? I cannot check as I do not have Win8 and am still with TortoiseSVN 1.6.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-02-05, 15:19 UTC

No, I'm still using the sources and libs from 1.7.1 tag. These work fine for TortoiseSVN 1.7.11 as well...

User avatar
tbeu
Power Member
Power Member
Posts: 1266
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu » 2013-02-05, 15:28 UTC

You should try an update.

I am not sure if moving the initialization from ContentSetDefaultParams to ContentGetValueW is the best solution. There should be another way of guaranteeing that initialization has finished.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-02-05, 15:33 UTC

It may not be the best but the easiest solution ;-)

On the other hand what's wrong with

Code: Select all

if (!g_remoteCacheLink) {
  g_remoteCacheLink = new CRemoteCacheLink();
}

if (!g_cachedStatus) {
  g_cachedStatus = new SVNFolderStatus();
}
in ContentGetValueW() ?

User avatar
tbeu
Power Member
Power Member
Posts: 1266
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu » 2013-02-05, 15:36 UTC

Sorry, I do not know what processes in both constructors are started. If you say it is a timing issue then I guess the initialization is not yet ready but ContentGetValueW already accesses the data structures.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-02-05, 15:51 UTC

The constructor of SVNFolderStatus calls "svn_pool_create(NULL)" which crashes when called from within ContentSetDefaultParams() but works fine in ContentGetValueW().

Showing a MessageBox prior to the constructor call works fine as well but a simple sleep does not have any effect. Therefore I guess the issue has something to do with window initialization and/or message handling in Windows 8.

As I still do not develop on a Windows 8 system, all I can do is trial and error ;-)

Maybe Christian Ghisler has another idea...

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-02-06, 10:48 UTC

New version available here: http://sourceforge.net/projects/svndetails/

Version 3.01 (20130205)
BUGFIX: Crash on Windows 8

@tufftaeh: Please test ;-)

tufftaeh
Junior Member
Junior Member
Posts: 12
Joined: 2009-03-24, 17:04 UTC
Location: Karlsruhe, Germany

Version 3.01

Post by *tufftaeh » 2013-06-04, 13:16 UTC

Sorry, I hadn't noticed that a new version was available.
Unfortunately, this doesn't fix the crash on my Windows 8 machine.
Now, after the first crash, I cannot even get the SVN status column displayed anymore if I deinstall SVNDetails, close TC, open TC, install SVNDetails and then switch to the tab page that has the SVN status column - crash again.

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-06-05, 08:05 UTC

Meanwhile we have some development maschines running Windows 8 but on none of these SVNDetails crashes. So this issue seems to be related to your special environment.

Are you using other TC-plugins as well? If yes, please try disabling them and check again...

BTW: Which version of TortoiseSVN are you using?

tufftaeh
Junior Member
Junior Member
Posts: 12
Joined: 2009-03-24, 17:04 UTC
Location: Karlsruhe, Germany

Post by *tufftaeh » 2013-06-05, 11:56 UTC

I'm using fileinfo.wlx, dirsizecalc.wdx and 7zip.wcx as well.
But even if I disable all of them, TC 8.01 crashes as soon as I switch to the tab page with SVN columns.
I'm using TortoiseSVN 1.7.11 64 Bit ( SVN 1.7.8 ) on Win 8 Pro x64.
TC 8.01 x64.

Is it possible that there is some bad configuration somewhere in a TC or plugin *.ini file? Would it help if I sent any *.ini files to you?

Thanks!

thein
Junior Member
Junior Member
Posts: 41
Joined: 2008-01-07, 15:04 UTC
Location: Aachen, Germany
Contact:

Post by *thein » 2013-06-06, 12:04 UTC

Please try creating a new TC-profile by using the "/i=name.ini" command line parameter (see http://www.ghisler.ch/wikide/index.php/Kommandozeilenparameter for more information). In this profile only install SVNDetails and then check again...

tufftaeh
Junior Member
Junior Member
Posts: 12
Joined: 2009-03-24, 17:04 UTC
Location: Karlsruhe, Germany

Post by *tufftaeh » 2013-06-07, 11:10 UTC

As soon as I want to show the column [SVN Text Status], TC 8.01 crashes.

This is what I did:
1) Start totalcmd64 /i=d:/tmp/test.ini from a command window
2) Install SVNDetails 3.01 by pressing <Enter> on wdx_SVNDetails_v3.01.zip in TC
3) Define a new custom column set "SVN" with one added column [=svndetails.SVN Text Status] (while in a SVN directory)
=> Crash.

After a restart of this TC profile, the custom column definition is still availabe, but as soon as I activate it (in any directory), TC crashes.

Interestingly, when I did the whole thing again with another new identity but *not* in a SVN directory, TC didn't crash immediately after defining the custom column set. It showed an (empty) SVN Status column. As soon as I tried to use this column layout for a SVN directory, however, TC crashed. And after this, always immediately upon activation of the custom column set in any directory.

Post Reply