Skip to content

Perl Converter crashes unable to create the dialog box asking for the name of a new Converter #48

Description

@WesPeacock

The Perl converter tries to build the name of a new converter from the Perl code that the converter uses.

Under some circumstances (too long?, has strange characters in the code?) the Converter crashes without displaying the dialog box for the new name.

A work-around is to create a new entry with some simple Perl code, e.g.,
$strOut=$strIn; It will ask you for the name:
image
and you can enter the name that reflects the proper function.

Once the converter has been created with a proper name, you can modify it with the code that would otherwise cause a crash.

Here is some sample Perl code that causes it to crash when it is used to create the new converter:

$strInOut = u2txt($strInOut);
sub u2txt{
my ($txtstring) = @_;

return $txtstring if $txtstring !~ m/U\+/;
my $vstring = "";
my @num =  split (/U\+/, $txtstring);
for my $n (@num) {
   next if !$n; #skip first null
   $vstring = $vstring . chr(hex($n));
   }
return $vstring;
}

Here is the crash dialog box followed by the text in the Details box.

image

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.GetFileName(String path)
   at System.IO.Path.GetFileNameWithoutExtension(String path)
   at SilEncConverters40.PerlExpressionAutoConfigDialog.get_DefaultFriendlyName()
   at SilEncConverters40.AutoConfigDialog.buttonSaveInRepositoryEx()
   at SilEncConverters40.AutoConfigDialog.buttonSaveInRepository_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9282.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ClipboardEC
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.1.1
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/ClipboardEC.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9251.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9282.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ECInterfaces
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.2.0
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/ECInterfaces.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9277.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
SilEncConverters40
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.2.0
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/SilEncConverters40.DLL
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9214.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
AIGuesserEC
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.4.0
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/AIGuesserEC.DLL
----------------------------------------
CcEC
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.1.0
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/CcEC.DLL
----------------------------------------
IcuEC
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.0.2
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/IcuEC.DLL
----------------------------------------
PerlExpressionEC
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/SIL/SILConverters/PerlExpressionEC.DLL
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions