NiftyLink addon - Links using internal associations and more

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Juergen wrote:New version 1.10 beta 2
Thanks for the new build. I haven't had time to fully test it, but the first impression is good. Right-clicking a zip file (with internal associations) displays a dialog where I can choose the internal association, good. However, why does option Page replace options NewTabInTc and OtherPanelInTc when radio button OpenAutomatically is selected? I think that Page should only apply to radio button WithThisProgram.

Trying to create a link for a movie-thumb search (as defined per one of my three test cases a few posts ago) crashes Nifty before it can display the link creation dialog

Code: Select all

NiftyLink.exe - Application Error

The instruction at 0x771b2ca9 referenced memory at 0x2073691f. The memory could not be read.

Click on OK to terminate the program
Trying to create a link for an image search (per my test cases) where search field SearchFor= includes spaces and ISN'T quoted yields a creation dialog with just one internal association (open). This is OK, it's consistent with your requirement "quote SearchFor= if it includes spaces".
However, after quoting SearchFor="..." and restarting TC, trying to create the link crashes Nifty again with exactly the same error dialog as above.
Win7 SP1 32-bit English here.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Hello sgp,

thanks again for testing!
sgp wrote:Right-clicking a zip file (with internal associations) displays a dialog where I can choose the internal association, good. However, why does option Page replace options NewTabInTc and OtherPanelInTc when radio button OpenAutomatically is selected? I think that Page should only apply to radio button WithThisProgram.
When the target is a directory or an archive, and radio button "OpenAutomatically" is selected, then the dialog offers the options "NewTabInTc" and "OtherPanelInTc". The same happens, when the target is a normal file (no archive), and radio button "OpenAsArchive" is selected. (BTW: This radio button is inactive if the target is a directory or an archive, because it wouldn't make sense in these cases.)

Choosing any of the lower 3 radio buttons ("WithThisInternalTCCommand", "WithSystemCommand", "WithThisProgram") means, that during execution of the resulting NiftyLink, control is handed over to an external "third party program". When during execution of the link my program doesn't have control anymore, it won't be able to open the target in a new tab or in the other panel of TC. If you want a program that e.g. is associated internally in TC to open the target in a new tab in TC, then you'd have to tell the program to do so, e.g. by using the appropriate command-line parameters for that program.
NiftyLink.exe cannot provide any options for external programs, since on principle, any external program could be associated internally in TC, associated in the OS, or explicitely choosen by using the last radio button.

That said, I agree that it probably doesn't make much sense to offer the "page" option, when the target is a directory or archive. Maybe I should do without the "page" option in those cases?

sgp wrote:Trying to create a link for a movie-thumb search (as defined per one of my three test cases a few posts ago) crashes Nifty before it can display the link creation dialog

Code: Select all

NiftyLink.exe - Application Error

The instruction at 0x771b2ca9 referenced memory at 0x2073691f. The memory could not be read.

Click on OK to terminate the program
I was not able to reproduce a crash on Windows XP 32 bit or on Windows 7 32 bit. Now I have uploaded a special debug build, which is able to catch some exceptions, and then display more helpful information: http://luethje.eu/prog/niftylink110_beta2a.zip Can you please test again with this version?

Thanks, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Juergen wrote:Now I have uploaded a special debug build, which is able to catch some exceptions, and then display more helpful information: http://luethje.eu/prog/niftylink110_beta2a.zip
This archive doesn't include a new build, it's the same build you posted before
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

sgp wrote:
Juergen wrote:Now I have uploaded a special debug build, which is able to catch some exceptions, and then display more helpful information: http://luethje.eu/prog/niftylink110_beta2a.zip
This archive doesn't include a new build, it's the same build you posted before
Sorry, I can't confirm that.

I'm currently at my office. I don't have any files available here which I use for development of NiftyLink, so there can't be any confusion of files. I just downloaded both archives http://luethje.eu/prog/niftylink110_beta2.zip and http://luethje.eu/prog/niftylink110_beta2a.zip as everyone else would do.

As intended, both archives contain different EXE files.
  • niftylink110_beta2.zip:
    NiftyLink.exe, 222 208 bytes
    Title of the creation dialog: NiftyLink 1.10 beta 2
  • niftylink110_beta2a.zip:
    NiftyLink.exe, 228 352 bytes
    Title of the creation dialog: NiftyLink 1.10 beta 2a
Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

I don't know what was wrong with the beta 2a exe before, but now I have the right one. So I tested the memory error condition again, and still got that error dialog without any additional information. Somehow, the instrumentation you added isn't doing anything here.
Maybe this can help; I started dbgview and caught these messages, is NiftyLink printing them? (I know the part starting at RtlWerpReportException isn't coming from NiftyLink)
Field: 13. Get value
CanYouHandleThisFile enter
CanYouHandleThisFile enter
CanYouHandleThisFile enter
CanYouHandleThisFile enter
CanYouHandleThisFile enter
CanYouHandleThisFile enter
CanYouHandleThisFile enter
Error -
RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly

Error -
Failed to create the process C:\Windows\system32\WerFault.exe

Error -
StartCrashVertial failed
I noticed a new issue, when I clicked an existing niftylink which was working before the beta 2 cycle
[FlexLink]
Target=..\..\sysinternals\dbgview.exe
Now clicking the link opens dbgview.exe in the current tab as an archive - instead of starting dbgview.exe.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Hello, thanks again for testing.
sgp wrote:So I tested the memory error condition again, and still got that error dialog without any additional information. Somehow, the instrumentation you added isn't doing anything here.
I had assumed that the problem was caused by a part of the program that was newly introduced in the beta 2 version, so I only added checks for those parts. The new beta 3 version has more checks for catching exceptions.
sgp wrote:Maybe this can help; I started dbgview and caught these messages, is NiftyLink printing them?
No, NiftyLink is not printing them.
But when creating or automatically executing a link to a file, NiftyLink checks whether that file could/should be considered an archive. Besides other things, NiftyLink reads the list of installed PackerPlugins in "wincmd.ini" (or in the respective redirected file). For each listed plugin, NiftyLink checks whether it contains a function named "CanYouHandleThisFile". If this function is implemented in a plugin, then NiftyLink calls this function, and if a plugin replies "Yes, I can.", then this file is considered an archive by NiftyLink.
sgp wrote:I noticed a new issue, when I clicked an existing niftylink which was working before the beta 2 cycle
[FlexLink]
Target=..\..\sysinternals\dbgview.exe
Now clicking the link opens dbgview.exe in the current tab as an archive - instead of starting dbgview.exe.
:)
This happens because of the mechanism which I described above. It's not a new feature (it exists for instance also in the official version 1.04). There must be a packer plugin installed on your system, that can treat dbgview.exe as an archive. Did you recently install new packer plugins? However, for EXE files this behaviour is not desired, and I changed the program now, so that EXE files are never treated automatically as an archive.

Based on your report, my suspicion currently is that NiftyLink does not interact correctly with a particular TC plugin on your system. Well, hopefully we'll get more information from the error checks of the beta 3 build.

I just rleased the new version 1.10 beta 3 (only for testing): http://luethje.eu/prog/niftylink110_beta3.zip

fixed
  • A bug in the dialog for creating new links.
  • EXE files for whom there are corresponding packer plugins in TC are not automatically treated as archives anymore.
changed
  • In the dialog for creating new links, the "page" option was removed for directories, archives, and normal files with certain extensions.
  • For some file types the option "Open as archive" was removed.
  • The first line of the dialog now contains bold text, and has a tooltip that shows the complete path name of the link target.
  • Button "Browse for program" now with tooltip.
  • Icreased the width of the dialog for creating new links.
  • Syntax check of Regular Expressions.
  • Additional checks for catching exceptions.
Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

---------------------------
Exception in TC_Packer_CanHandleFile()
---------------------------
packer$ = 'C:\totalcmd\plugins\wcx\Total7zip\Total7zip.wcx'
file$ = 'C:\test\xx.gif'
pluginID = 20630504
CanHandleFile = 21706672
ret = 0
Can you reproduce?
xx.txt is actually a renamed text file, do from command line: echo.>xx.gif
TC8, Total7z version 0.8.5.2 with 7zip 9.22 beta 2011-04-18
Win XP SP3 English 32-bit
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Yes, after downloading and installing "Total7zip.wcx" and creating such a file "xx.gif", I could reproduce the error.

However, further analysis showed that the error message pointed into the right direction, but was not quite correct. On my system, there was/is an issue with a packer plugin, albeit not with "Total7zip.wcx", but with the plugin "InstallExplorer 0.9.2". And there is no error in my code, but a bug in that plugin. The bug in the plugin can be shown by putting the cursor in TC on the file "xx.gif", and then pressing [Ctrl]+[PgDown]. ( NiftyLink obviously is not involved in this case. ) After pressing [Ctrl]+[PgDown], TC 8.0 shows the following error message:
---------------------------
Error
---------------------------
Error in packer plugin "msi" calling CanYouHandleThisFile for
"C:\Dokumente und Einstellungen\Juergen\Desktop\xx.gif" !
Please report this error to the plugin author!

The reported error is:
Access violation at address 029E29A3. Read of address 03663114
---------------------------
OK
---------------------------
( "msi" is the extension with which this plugin is associated by default. )

sgp, what does your TC say when you press [Ctrl]+[PgDown] on the file "xx.gif"?

I changed again the exception handler of NiftyLink.exe, so that now (at least on my system) the correct name of the buggy plugin is shown. And NiftyLink's error message now is pretty similar to the one by TC shown above, pointing out that the bug is in the plugin, not in NiftyLink. :-)


I've released the version 1.10 beta 4 (only for testing): http://luethje.eu/prog/niftylink110_beta4.zip

fixed
  • Two bugs in the dialog for creating new links.
changed
  • In the file "NiftyLink.ini", in the section [Shortcuts] instead of "%1" now "%s" is used as placeholder, in order to avoid possible conflicts with encoded characters in URLs. For the sake of consistency, this was also changed in the section [Go to page].
  • Tooltip timeout increased from 5 sec. to about 33 sec. (maximum).
  • Archives that are not associated in TC with a packer plugin, and thus in TC can be only opened by using [Ctrl]+[PgDown], are not anymore treated by NiftyLink *automatically* as an archive. This is consistent with the way they are treated by TC.
  • Improved catching of crashes that are caused by buggy packer plugins.
  • Some internal details.
new
  • Identification of ZIP archives with different file name extension (ODP, ODS, ODT, JAR etc.), so that these files can be treated more reliably, regardless whether or not they are associated with a packer plugin.
  • Optonal section [General] in the INI file, which allows to set the program language, and the help file.
  • Checkbox "Use name of target drive" now shows the name (if existing) in a tooltip.
Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Version 1.10 beta 4 does not crash anymore when I create a link to xx.gif !
However it does crash (your handler nicely catches the exception) when I execute the link. The error message points to the culprit plugin: wcx\CHMDir\CHMDir.wcx (invalid memory access).
What the next move now? Do I need to uninstall CHMDir.wcx?
Juergen wrote: New:
Checkbox "Use name of target drive" now shows the name (if existing) in a tooltip.
I checked the box and now I can see the volume label in the link file, but I see no tooltip when I hover my mouse over the link file. Do I need to enable/do something else to display tooltips?

At some point in this thread you wrote that file searches that consist of blank separated wildcards need to be quoted in section [Searches] of wincmd.ini (or redirect). I had one quoted search and NiftyLink couldn't find any associated program. I removed the quotes and NiftyLink found all associated programs. So, is quoting necessary? BTW, I prefer not to have to add quotes, if possible. TC doesn't need them, although it seems not to mind if they're there.

OTOH I have a very simple search *.pdf with 12 internally associated programs, but NiftyLink can't find any. And I have a search with four space-separated wildcards; NiftyLink can (is able to) find all associated programs. So finding internally associated programs works on and off. Is there any chance that you could create a debug build that writes a trace to the debug monitor (Windows OutputDebugString API)? What I'd like to see is the steps (and parameters) involved in matching [searches] entries and listing internally associated programs.

edit: The same issue that happens with *.pdf happens with *.7z. So I changed *.7z into "*.7z *.xx" (without quotes) and NiftLink was able to find the internal associations. I tried the same trick with pdf, changing *.pfd into "*.pdf *.abc" (without quotes) but this time it didn't help.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

sgp wrote:Version 1.10 beta 4 does not crash anymore when I create a link to xx.gif !
Yes, the crash happens when NiftyLink (or TC itself) calls the function CanYouHandleThisFile of a packer plugin, which has a bug in this function. NiftyLink now does not call this function during creation of a link anymore.
sgp wrote:However it does crash (your handler nicely catches the exception) when I execute the link. The error message points to the culprit plugin: wcx\CHMDir\CHMDir.wcx (invalid memory access).
What the next move now? Do I need to uninstall CHMDir.wcx?
I think it depends. I for one keep using the buggy plugin "InstallExplorer", because it works fine with files for which it was built (EXE and MSI setup programs), and I never encountered a crash in "real life use". The only crash that I encountered was with the test file "xx.gif", which consists of a line break. The best would be asking the plugin author to fix the bug.
sgp wrote:
Juergen wrote: New:
Checkbox "Use name of target drive" now shows the name (if existing) in a tooltip.
I checked the box and now I can see the volume label in the link file, but I see no tooltip when I hover my mouse over the link file. Do I need to enable/do something else to display tooltips?
Tooltips for the NiftyLink files can be displayed by the "Text Line" plugin. What I added was a tooltip for a checkbox in the dialog for creation of new links. On Windows 7 the tooltip appears upon mouse-over and disappears after clicking the checkbox. If you move the cursor away from the checkbox and back again, the tooltip re-appears. That's normal Windows 7 behaviour. However, I'll change that in the next version.
sgp wrote:At some point in this thread you wrote that file searches that consist of blank separated wildcards need to be quoted
No, this seems to be a misunderstanding. Only if a single pattern contains a blank, then this pattern must be enclosed in double quotes (so that NiftyLink knows that this particular blank is part of the pattern, and is not considered a delimiter between different patterns). I think that TC does not even require this, but doing it this way is straightforward, and I currently don't want to make dozens of tests and to spend much, much time, in order to find out how TC knows the difference between a blank that is a separator and a blank that is part of a pattern, without using quotes.

If you still have mismatching patterns, then I'll have to do a detailed investigation. For that I need exact copies of the respective entries in your INI file.

Regards, Juergen

//last edit: 2012-06-18
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

I've released version 1.10 Release Candidate 1: http://luethje.eu/prog/niftylink110_rc1.zip

changed
  • Changed displaying of tooltips in the creation dialog (so that for instance the previously mentioned issue is fixed)
  • Documentation for version 1.10 completed.
  • In the [General] section of the file "NiftyLink.ini", the user now can write

    Code: Select all

    Debug = True
    Then a file named "NiftyLink.log" will be created in the %temp% directory. Note: This file does not contain complete information about what is going on internally in NiftyLink.exe. Its focus is to show how NiftyLink.exe searches for a matching internal association while executing a link.
I hope that no severe bugs will be found in this version, so that I can release the final version 1.10 in one or two weeks.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

I've released version 1.10 final.
The download link is in the first post of this thread.


changed
  • In the [General] section of the file NiftyLink.ini, instead of "Debug = True", it must now read "Log = True". The log file is not created in the %temp% directory anymore, but in the directory where the currently used INI file is. The log file now contains slightly improved information.
  • Some minor things.
  • Improved documentation.
new
  • The program defines the environment variables %nifty_drive% and %nifty_path% (they come in handy when using NiftyLink without Total Commander).
Enjoy!
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
Bluestar
Senior Member
Senior Member
Posts: 377
Joined: 2007-06-10, 15:26 UTC
Location: Hungary
Contact:

Post by *Bluestar »

Thanks for the improvements, Juergen!

I've created a Hungarian translation for the latest version, which you can download from the following link:
http://bluesoft.hu/software/others/niftylink110_hungarian.zip

Keep up the good work.

Regards,
Bluestar
» Developer of Total Updater & extDir utility.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Hello Bluestar,

you are welcome.
Many thanks for the Hungarian translation, much appreciated! May I put a copy of the ZIP file on my website, and offer it there for downloading?

Best regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
Bluestar
Senior Member
Senior Member
Posts: 377
Joined: 2007-06-10, 15:26 UTC
Location: Hungary
Contact:

Post by *Bluestar »

Hi Juergen,

Of course, or you are free to include it in the "lang" folder of the main NiftyLink package - its easier this way for the users imho, but it's your decision. =)

Best regards,
Bluestar
» Developer of Total Updater & extDir utility.
Post Reply