Lister+Imagine causes TC to crash

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Lister+Imagine causes TC to crash

Post by *MVV »

This image allows to reproduce crash. Open it by F3 using Imagine (tested with stable version 1.0.9 Nov 12 2012) and then open Metadata subwindow from Information window (shortcut I).
---------------------------
Application Error
---------------------------
Exception EInvalidOp in module TOTALCMD.EXE at 4FC2D88F.
Invalid floating point operation.
---------------------------
Is it possible to prevent crash or plugin causes some serious error?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

No problem hre with the same version of Imagine.
Tested with TC 8.01 x86 and x64 under Windows 7 Ultimate x64.
Metadata shown as:

Make - Canon
Model - Canon EOS 600D
Orientation - Top left
X Resolution - 72
Y Resolution - 72
Resolution unit - Inch
Date/Time - 2013:05:25 09:49:48
Y and C positioning - Co-sited
Exif offset - 348
Exposure time - 1/400 seconds
F-number - 4.5
Exposure program - Portrait mode
ISO speed ratings - 100
<unknown> (34864) - 2
<unknown> (34866) - 100
Exif version - 2.3
Date/Time original - 2013:05:25 09:49:48
Date/Time digitized - 2013:05:25 09:49:48
Components configuration - YCbCr
Shutter speed - 1/394 seconds
Aperture - F4.555
Exposure bias - 0
Metering mode - Pattern
Flash - Not fired
Lens focal length - 35 mm
Date/Time subseconds - 41
Date/Time original subseconds - 41
Date/Time digitized subseconds - 41
Supported FlashPix version - 1.0
Color space information - sRGB
Valid image width - 5184
Valid image height - 3456
Interoperability tag - 8598
<unknown> (1) - R98
Focal plane X resolution - 5728
Focal plane Y resolution - 5808
Focal plane resolution unit - Inch
Custom image processing - Normal process
Exposure mode - Auto exposure
White balance - Auto white balance
Scene capture type - Standard
<unknown> (42033) - 193066140703
<unknown> (42034) - 18 55 0/0 0/0
<unknown> (42036) - EF-S18-55mm f/3.5-5.6 IS II
<unknown> (42037) - 00000f9243
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I'm using TC 8.01 x32, Win7x64. When file is opened using standalone Imagine.exe, all works OK. But if it is opened via Lister it causes TC to crash.

64-bit version of plugin works fine.


BTW in my TC configuration I see Windows crash message while with clean INI I get following TC report:

Code: Select all

---------------------------
Total Commander 8.01
---------------------------
Invalid floating point operation.
Invalid floating point operation
Windows 7 SP1 6.1 (Build 7601)

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Windows exception: C0000090
Stack trace:
76607F4A
45F60D  45F8A2  45FE46  460D9F  448B42  444AD1
44465B  444ECB  446BC9  446A22  >423F38  445FE3
423F38  429604  42969C  6D9F34  
Raw:
445F51  423F38  45F60D  64006A  446D9B  447AA1
444AD1  446C59  4460A5  446A22  446A45  423F38
4033D0  4021C8  45F8A2  45FE46  460D9F  448B42
444AD1  444A1B  447015  444714  44465B  460E9F
444ECB  444AD1  444A1B  446BC9  446C9D  4460A5
446A22  423F38  445FE3  423F38  429604  42969C
429856  6D9F34  
Press Ctrl+C to copy this report!
User avatar
Dalai
Power Member
Power Member
Posts: 9383
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I can confirm the crash using Imagine 1.0.9 (Nov 20 2012), TC 8.01 and TC 7.56a on XP 32 bit. The memory address is almost the same: 4FC2D88B (TC 8.x) and 4FC2D89F (TC 7.x). It even happens with fresh INI files (Imagine.ini and wincmd.ini).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3860
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Crash confirmed too with TC 8.01 x32 @ Lister, Win7x64
#5767 Personal license
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I open it using TC lister and it works with the x86 and the x64 plugins.
May be you are using some of Imagines own plugins ?
User avatar
Dalai
Power Member
Power Member
Posts: 9383
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Horst.Epp wrote:May be you are using some of Imagines own plugins ?
I'm using only some archive plugins: 7z, rar and jpeg2000. TC crashes even if I rename the Imagine plugin directory so that it doesn't use them (checked using Help > Installed Plugins) while using fresh INI files (Imagine.ini and wincmd.ini).

Note: I didn't get a stack trace in any case, yet. TC always crashes as soon as Imagine's metadata function is called (via the toolbar, the status bar or Shift+I).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I don't use any Imagine subplugins, only pure Imagine.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48070
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The error comes from the difference between the Delphi compiler (used by TC) and Microsoft's Visual C++: Delphi turns on floating point exceptions, but handles them when they occur. VC++ turns off floating point exceptions, therefore floating point can occur, but are ignored. Now when a VC++ DLL is called by a Delphi program, and the DLL doesn't turn off exceptions when it's called, the exceptions will be on. Now when there is a floating point error, the dll will crash.

To the plugin author: You need to handle floating point exceptions, e.g. via try .. catch blocks.

Total Commander already turns off exceptions when calling plugins directly. However, Lister plugins are created once and then not called by TC, but by Windows (via Window messages). Therefore TC cannot turn off floating point exceptions once the lister plugin is running.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

ghisler(Author) wrote:Lister plugins are created once and then not called by TC, but by Windows (via Window messages). Therefore TC cannot turn off floating point exceptions once the lister plugin is running.
If Total Commander sends these messages to Lister (by using SendMessage function or similar), there is a workaround: clearing floating point exceptions after the call to the SendMessage function.
Post Reply