Debugging a Chilkat Crash

To capture diagnostic information if a crash occurs during a Chilkat method call, follow these steps:

  1. Configure the Ftp2.DebugLogFilePath property to log up until the crash.
  2. Enable VerboseLogging to obtain a detailed log.
  3. Before invoking the Chilkat method (referred to here as MethodX), set DebugLogFilePath to your desired log file path.
  4. After executing MethodX, include code to delete the log file. The file will be deleted automatically if no crash occurs. In the event of a crash, the log file will remain, containing partial LastErrorText for troubleshooting.

Please send the log file for analysis if a crash occurs.


try
{
    // Configure logging
    chilkatObject.VerboseLogging = true;
    chilkatObject.DebugLogFilePath = "path/to/your/logfile.txt";
    
    // Call the Chilkat method
    chilkatObject.MethodX();
    
    // If successful, delete the log file
    File.Delete(chilkatObject.DebugLogFilePath);
    
    // Restore logging -- we only want verbose + file logging for the method suspected of crashing.
    chilkatObject.VerboseLogging = false;
    chilkatObject.DebugLogFilePath = "";
    
}
catch
{
    // In case of a crash, the log file will remain for diagnostic purposes
    // Please send the log file for analysis
}

This setup ensures that diagnostic information is captured for review if a crash occurs during the execution of MethodX.