← Back to team overview

kicad-developers team mailing list archive

[PATCH] Crash Reporter

 

Dear all,

The attached patchset introduces a builtin crash reporter for Kicad -
that is a window that pops up in case of a segmentation fault/other
serious error, kindly apologizes to the user and lets him/her submit
(anonymously) a bug report to us. It's loosely based on wxDebugReport,
with a lot of new code (i.e. stack walker for windows or more meaningful
report format...).

This is particularly targeted at Windows/OSX users, since getting a
useful stack trace on these systems is considerably more difficult (at
least for non-programmers) than on (L)Unixes.

I invite you to test it, in case recent KiCad nightlies have become too
stable, you can always simulate a crash through 'Help->Simulate Kicad
Crash'.

Cheers,
Tom



>From 3b47efd264825fcd1d333fc214ef5ecc20d4842d Mon Sep 17 00:00:00 2001
From: Thomas Pointhuber <thomas.pointhuber@xxxxxx>
Date: Wed, 19 Sep 2018 17:45:27 +0200
Subject: [PATCH 01/11] Add initial debug reporter to handle crashes

Based on wxDebugReportCompress, but with some adjustments to have
an actual useful stacktrace in case of wx <= 3.1.1

Fix was merged upstream for upcomming wx release:
* https://github.com/wxWidgets/wxWidgets/pull/940

To convert the offset to actual lines "addr2line" can be used
---
 CMakeLists.txt          |  18 +--
 common/CMakeLists.txt   |   1 +
 common/debug_report.cpp | 257 ++++++++++++++++++++++++++++++++++++++++
 common/single_top.cpp   |  15 ++-
 include/debug_report.h  |  60 ++++++++++
 kicad/kicad.cpp         |  26 ++--
 6 files changed, 352 insertions(+), 25 deletions(-)
 create mode 100644 common/debug_report.cpp
 create mode 100644 include/debug_report.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c00baaf4..f962fdb07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -589,8 +589,8 @@ include( MinGWResourceCompiler )
 # if wxGraphicsContext not used, because the cairo printing system uses this library
 if( WIN32 )
     if( USE_WX_GRAPHICS_CONTEXT )
-        find_package( GdiPlus )
-        check_find_package_result( GDI_PLUS_FOUND "GDI+" )
+    find_package( GdiPlus )
+    check_find_package_result( GDI_PLUS_FOUND "GDI+" )
     else()
         # if WX_GRAPHICS_CONTEXT is not used we just need the gdiplus library for cairo printing
         set( GDI_PLUS_LIBRARIES gdiplus )
@@ -655,9 +655,9 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
         set( PythonInterp_FIND_VERSION 3.3 )
         set( PythonLibs_FIND_VERSION 3.3 )
     else()
-        # force a python version < 3.0
-        set( PythonInterp_FIND_VERSION 2.6 )
-        set( PythonLibs_FIND_VERSION 2.6 )
+    # force a python version < 3.0
+    set( PythonInterp_FIND_VERSION 2.6 )
+    set( PythonLibs_FIND_VERSION 2.6 )
     endif()
 
     find_package( PythonInterp )
@@ -713,7 +713,7 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
     # although is used for all components, should be a harmless hit for something like eeschema
     # so long as unused search paths are at the end like this.
     set( INC_AFTER ${INC_AFTER} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/scripting )
-endif()
+        endif()
 
 #
 # Find wxWidgets library, required
@@ -735,19 +735,19 @@ if( KICAD_SCRIPTING_WXPYTHON )
     else()
         # Use the same toolkit as wxPython otherwise there will be a symbol conflict
         set( wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} "--toolkit=${WXPYTHON_TOOLKIT}" )
-    endif()
+        endif()
 
     # Require the same wxWidgets version as is used by wxPython
     set( wxWidgets_REQ_VERSION ${WXPYTHON_WXVERSION} )
 else()
     # Require wxWidgets 3.0.0 as the minimum when wxPython is disabled
     set( wxWidgets_REQ_VERSION 3.0.0 )
-endif()
+        endif()
 
 # See line 49 of CMakeModules/FindwxWidgets.cmake
 set( wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --static=no )
 
-find_package( wxWidgets ${wxWidgets_REQ_VERSION} COMPONENTS gl aui adv html core net base xml stc REQUIRED )
+find_package( wxWidgets ${wxWidgets_REQ_VERSION} COMPONENTS gl aui adv html core net base xml stc qa REQUIRED )
 
 # Include wxWidgets macros.
 include( ${wxWidgets_USE_FILE} )
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 1dbed1be7..1a4d6fd28 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -294,6 +294,7 @@ set( COMMON_SRCS
     confirm.cpp
     convert_basic_shapes_to_polygon.cpp
     cursor_store.cpp
+    debug_report.cpp
     dialog_shim.cpp
     displlst.cpp
     dpi_scaling.cpp
diff --git a/common/debug_report.cpp b/common/debug_report.cpp
new file mode 100644
index 000000000..b398529e6
--- /dev/null
+++ b/common/debug_report.cpp
@@ -0,0 +1,257 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2017 KiCad Developers, see CHANGELOG.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+
+#include <debug_report.h>
+
+#include "wx/xml/xml.h"
+#include <wx/debugrpt.h>
+
+#if wxUSE_STACKWALKER
+#include "wx/stackwalk.h"
+#endif
+
+#include <wx/datetime.h>
+#include <wx/ffile.h>
+#include <wx/filename.h>
+
+
+void DEBUG_REPORT::GenerateReport( Context ctx )
+{
+    DEBUG_REPORT report;
+
+    // Add all wx default reports
+    report.AddAll( ctx );
+
+    // Add our own reports
+    report.AddTimestamp();
+
+    // Show confirmation dialog and save report
+    if( wxDebugReportPreviewStd().Show( report ) )
+    {
+        report.Process();
+    }
+}
+
+bool DEBUG_REPORT::AddTimestamp()
+{
+    wxFileName fn( GetDirectory(), wxT( "timestamp.my" ) );
+    wxFFile    file( fn.GetFullPath(), wxT( "w" ) );
+    if( !file.IsOpened() )
+        return false;
+
+    wxDateTime dt = wxDateTime::Now();
+    bool       ret = file.Write( dt.FormatISODate() + wxT( ' ' ) + dt.FormatISOTime() );
+    ret &= file.Close();
+
+    AddFile( fn.GetFullName(), wxT( "timestamp of this report" ) );
+
+    return ret;
+}
+
+#if !wxCHECK_VERSION( 3, 1, 2 ) && wxUSE_STACKWALKER
+class XmlStackWalker : public wxStackWalker
+{
+public:
+    XmlStackWalker( wxXmlNode* nodeStack )
+    {
+        m_isOk = false;
+        m_nodeStack = nodeStack;
+    }
+
+    bool IsOk() const
+    {
+        return m_isOk;
+    }
+
+protected:
+    virtual void OnStackFrame( const wxStackFrame& frame ) override;
+
+    wxXmlNode* m_nodeStack;
+    bool       m_isOk;
+};
+
+// ----------------------------------------------------------------------------
+// local functions
+// ----------------------------------------------------------------------------
+
+static inline void HexProperty( wxXmlNode* node, const wxChar* name, wxUIntPtr value )
+{
+    node->AddAttribute( name, wxString::Format( wxT( "%#zx" ), value ) );
+}
+
+static inline void NumProperty( wxXmlNode* node, const wxChar* name, unsigned long value )
+{
+    node->AddAttribute( name, wxString::Format( wxT( "%lu" ), value ) );
+}
+
+static inline void TextElement( wxXmlNode* node, const wxChar* name, const wxString& value )
+{
+    wxXmlNode* nodeChild = new wxXmlNode( wxXML_ELEMENT_NODE, name );
+    node->AddChild( nodeChild );
+    nodeChild->AddChild( new wxXmlNode( wxXML_TEXT_NODE, wxEmptyString, value ) );
+}
+
+#if wxUSE_CRASHREPORT && defined( __INTEL__ )
+
+static inline void HexElement( wxXmlNode* node, const wxChar* name, unsigned long value )
+{
+    TextElement( node, name, wxString::Format( wxT( "%08lx" ), value ) );
+}
+
+#endif // wxUSE_CRASHREPORT
+
+// ============================================================================
+// XmlStackWalker implementation based on wx, but with additional information
+// like offset, address and module of a stack item
+// ============================================================================
+
+void XmlStackWalker::OnStackFrame( const wxStackFrame& frame )
+{
+    m_isOk = true;
+
+    wxXmlNode* nodeFrame = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "frame" ) );
+    m_nodeStack->AddChild( nodeFrame );
+
+    NumProperty( nodeFrame, wxT( "level" ), frame.GetLevel() );
+    wxString func = frame.GetName();
+    if( !func.empty() )
+    {
+        nodeFrame->AddAttribute( wxT( "function" ), func );
+    }
+
+    HexProperty( nodeFrame, wxT( "offset" ), frame.GetOffset() );
+    HexProperty( nodeFrame, wxT( "address" ), wxPtrToUInt( frame.GetAddress() ) );
+
+    wxString module = frame.GetModule();
+    if( !module.empty() )
+        nodeFrame->AddAttribute( wxT( "module" ), module );
+
+    if( frame.HasSourceLocation() )
+    {
+        nodeFrame->AddAttribute( wxT( "file" ), frame.GetFileName() );
+        NumProperty( nodeFrame, wxT( "line" ), frame.GetLine() );
+    }
+
+    const size_t nParams = frame.GetParamCount();
+    if( nParams )
+    {
+        wxXmlNode* nodeParams = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "parameters" ) );
+        nodeFrame->AddChild( nodeParams );
+
+        for( size_t n = 0; n < nParams; n++ )
+        {
+            wxXmlNode* nodeParam = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "parameter" ) );
+            nodeParams->AddChild( nodeParam );
+
+            NumProperty( nodeParam, wxT( "number" ), n );
+
+            wxString type, name, value;
+            if( !frame.GetParam( n, &type, &name, &value ) )
+                continue;
+
+            if( !type.empty() )
+                TextElement( nodeParam, wxT( "type" ), type );
+
+            if( !name.empty() )
+                TextElement( nodeParam, wxT( "name" ), name );
+
+            if( !value.empty() )
+                TextElement( nodeParam, wxT( "value" ), value );
+        }
+    }
+}
+
+
+bool DEBUG_REPORT::AddContext( Context ctx )
+{
+    wxCHECK_MSG( IsOk(), false, wxT( "use IsOk() first" ) );
+
+    // create XML dump of current context
+    wxXmlDocument xmldoc;
+    wxXmlNode*    nodeRoot = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "report" ) );
+    xmldoc.SetRoot( nodeRoot );
+    nodeRoot->AddAttribute( wxT( "version" ), wxT( "1.0" ) );
+    nodeRoot->AddAttribute(
+            wxT( "kind" ), ctx == Context_Current ? wxT( "user" ) : wxT( "exception" ) );
+
+    // add system information
+    wxXmlNode* nodeSystemInfo = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "system" ) );
+    if( DoAddSystemInfo( nodeSystemInfo ) )
+        nodeRoot->AddChild( nodeSystemInfo );
+    else
+        delete nodeSystemInfo;
+
+    // add information about the loaded modules
+    wxXmlNode* nodeModules = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "modules" ) );
+    if( DoAddLoadedModules( nodeModules ) )
+        nodeRoot->AddChild( nodeModules );
+    else
+        delete nodeModules;
+
+    // add CPU context information: this only makes sense for exceptions as our
+    // current context is not very interesting otherwise
+    if( ctx == Context_Exception )
+    {
+        wxXmlNode* nodeContext = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "context" ) );
+        if( DoAddExceptionInfo( nodeContext ) )
+            nodeRoot->AddChild( nodeContext );
+        else
+            delete nodeContext;
+    }
+
+    // add stack traceback
+#if wxUSE_STACKWALKER
+    wxXmlNode*     nodeStack = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "stack" ) );
+    XmlStackWalker sw( nodeStack );
+#if wxUSE_ON_FATAL_EXCEPTION
+    if( ctx == Context_Exception )
+    {
+        sw.WalkFromException();
+    }
+    else // Context_Current
+#endif   // wxUSE_ON_FATAL_EXCEPTION
+    {
+        sw.Walk();
+    }
+
+    if( sw.IsOk() )
+        nodeRoot->AddChild( nodeStack );
+    else
+        delete nodeStack;
+#endif // wxUSE_STACKWALKER
+
+    // finally let the user add any extra information he needs
+    DoAddCustomContext( nodeRoot );
+
+
+    // save the entire context dump in a file
+    wxFileName fn( GetDirectory(), GetReportName(), wxT( "xml" ) );
+
+    if( !xmldoc.Save( fn.GetFullPath() ) )
+        return false;
+
+    AddFile( fn.GetFullName(), _( "process context description" ) );
+
+    return true;
+}
+#endif // !wxCHECK_VERSION(3, 1, 2) && wxUSE_STACKWALKER
\ No newline at end of file
diff --git a/common/single_top.cpp b/common/single_top.cpp
index b50ecf18a..acc0e0eb4 100644
--- a/common/single_top.cpp
+++ b/common/single_top.cpp
@@ -46,6 +46,7 @@
 #include <pgm_base.h>
 #include <kiway_player.h>
 #include <confirm.h>
+#include <debug_report.h>
 
 
 // Only a single KIWAY is supported in this single_top top level component,
@@ -123,13 +124,16 @@ wxIMPLEMENT_DYNAMIC_CLASS(HtmlModule, wxModule);
  */
 struct APP_SINGLE_TOP : public wxApp
 {
-#if defined (__LINUX__)
     APP_SINGLE_TOP(): wxApp()
     {
+#if wxUSE_ON_FATAL_EXCEPTION
+        wxHandleFatalExceptions();
+#endif
+
         // Disable proxy menu in Unity window manager. Only usual menubar works with wxWidgets (at least <= 3.1)
         // When the proxy menu menubar is enable, some important things for us do not work: menuitems UI events and shortcuts.
         wxString wm;
-
+#if defined (__LINUX__)
         if( wxGetEnv( wxT( "XDG_CURRENT_DESKTOP" ), &wm ) && wm.CmpNoCase( wxT( "Unity" ) ) == 0 )
         {
             wxSetEnv ( wxT("UBUNTU_MENUPROXY" ), wxT( "0" ) );
@@ -145,8 +149,8 @@ struct APP_SINGLE_TOP : public wxApp
         // Set GTK2-style input instead of xinput2.  This disables touchscreen and smooth scrolling
         // Needed to ensure that we are not getting multiple mouse scroll events
         wxSetEnv( wxT( "GDK_CORE_DEVICE_EVENTS" ), wxT( "1" ) );
-    }
 #endif
+    }
 
     bool OnInit() override
     {
@@ -252,6 +256,11 @@ struct APP_SINGLE_TOP : public wxApp
     }
 #endif
 
+    void OnFatalException() override
+    {
+        DEBUG_REPORT::GenerateReport(wxDebugReport::Context_Exception);
+    }
+
 #ifdef __WXMAC__
 
     /**
diff --git a/include/debug_report.h b/include/debug_report.h
new file mode 100644
index 000000000..0d0e29fb8
--- /dev/null
+++ b/include/debug_report.h
@@ -0,0 +1,60 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2017 KiCad Developers, see CHANGELOG.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+
+#ifndef DEBUG_REPORT_H_
+#define DEBUG_REPORT_H_
+
+#include <wx/debugrpt.h>
+
+/**
+ * Class DEBUG_REPORT
+ *
+ * Based on wxDebugReportCompress but with a improved context
+ * saver which gives us useful stack-traces. Furthermore it include
+ * additional information which are helpful for debugging a crash.
+ */
+class DEBUG_REPORT : public wxDebugReportCompress
+{
+public:
+    DEBUG_REPORT()
+    {
+    }
+
+    /**
+     * Function GenerateReport
+     *
+     * generate a KiCad debug report and displays it to the user
+     *
+     * @param ctx Context for which the report should be generated
+     */
+    static void GenerateReport( Context ctx );
+
+    bool AddTimestamp();
+
+#if !wxCHECK_VERSION( 3, 1, 2 ) && wxUSE_STACKWALKER
+    // in case of wx <= 3.1.1 important stack information were not saved
+    virtual bool AddContext( Context ctx ) override;
+#endif
+};
+
+#endif
\ No newline at end of file
diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp
index 2ca33d77e..2ecf0a630 100644
--- a/kicad/kicad.cpp
+++ b/kicad/kicad.cpp
@@ -39,6 +39,7 @@
 #include <richio.h>
 #include <wildcards_and_files_ext.h>
 #include <systemdirsappend.h>
+#include <debug_report.h>
 
 #include <stdexcept>
 
@@ -217,9 +218,14 @@ KIWAY  Kiway( &Pgm(), KFCTL_CPP_PROJECT_SUITE );
  */
 struct APP_KICAD : public wxApp
 {
-#if defined (__LINUX__)
     APP_KICAD(): wxApp()
     {
+#if defined (__LINUX__)
+
+#if wxUSE_ON_FATAL_EXCEPTION
+        wxHandleFatalExceptions();
+#endif
+
         // Disable proxy menu in Unity window manager. Only usual menubar works with
         // wxWidgets (at least <= 3.1).  When the proxy menu menubar is enable, some
         // important things for us do not work: menuitems UI events and shortcuts.
@@ -229,19 +235,8 @@ struct APP_KICAD : public wxApp
         {
             wxSetEnv ( wxT("UBUNTU_MENUPROXY" ), wxT( "0" ) );
         }
-
-        // Force the use of X11 backend (or wayland-x11 compatibilty layer).  This is required until wxWidgets
-        // supports the Wayland compositors
-        wxSetEnv( wxT( "GDK_BACKEND" ), wxT( "x11" ) );
-
-        // Disable overlay scrollbars as they mess up wxWidgets window sizing and cause excessive redraw requests
-        wxSetEnv( wxT( "GTK_OVERLAY_SCROLLING" ), wxT( "0" ) );
-
-        // Set GTK2-style input instead of xinput2.  This disables touchscreen and smooth scrolling
-        // Needed to ensure that we are not getting multiple mouse scroll events
-        wxSetEnv( wxT( "GDK_CORE_DEVICE_EVENTS" ), wxT( "1" ) );
-    }
 #endif
+    }
 
     bool OnInit()           override
     {
@@ -284,6 +279,11 @@ struct APP_KICAD : public wxApp
         return -1;
     }
 
+    void OnFatalException() override
+    {
+        DEBUG_REPORT::GenerateReport(wxDebugReport::Context_Exception);
+    }
+
     /**
      * Set MacOS file associations.
      *
-- 
2.17.1

>From b00972bd6cc905cf52b9ae6b63fb871f2948628e Mon Sep 17 00:00:00 2001
From: Thomas Pointhuber <thomas.pointhuber@xxxxxx>
Date: Tue, 25 Sep 2018 19:47:54 +0200
Subject: [PATCH 02/11] Add compile time switch for debug reporter

Some distros probably like to disable this feature and use their own
crash reporter instead.
---
 CMakeLists.txt                         | 8 ++++++++
 Documentation/development/compiling.md | 5 +++++
 common/dialog_about/dialog_about.cpp   | 7 +++++++
 common/single_top.cpp                  | 4 +++-
 kicad/kicad.cpp                        | 5 +++--
 5 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f962fdb07..62607e274 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,10 @@ option( USE_WX_GRAPHICS_CONTEXT
 option( USE_WX_OVERLAY
     "Use wxOverlay: Always ON for MAC and GTK3 (default OFF)." )
 
+option( KICAD_CRASH_REPORTER
+    "Enable integrated crash reporter (default ON)"
+    ON )
+
 option( KICAD_SCRIPTING
     "Build the Python scripting support inside KiCad binaries (default ON)."
     ON )
@@ -351,6 +355,10 @@ if( USE_WX_OVERLAY OR APPLE )
     add_definitions( -DUSE_WX_OVERLAY )
 endif()
 
+if( KICAD_CRASH_REPORTER )
+    add_definitions( -DKICAD_CRASH_REPORTER )
+endif()
+
 if( KICAD_SCRIPTING )
     add_definitions( -DKICAD_SCRIPTING )
 endif()
diff --git a/Documentation/development/compiling.md b/Documentation/development/compiling.md
index d106a970e..76cb7c9ff 100644
--- a/Documentation/development/compiling.md
+++ b/Documentation/development/compiling.md
@@ -146,6 +146,11 @@ so use at your own risk.
 The USE_WX_OVERLAY option is used to enable the optional wxOverlay class for graphics rendering
 on macOS.  This is enabled on macOS and GTK3 by default and disabled on all other platforms.
 
+## Crash Reporter ## {#crash_reporter}
+
+The KICAD_CRASH_REPORTER option is used to enable a custom crash reporter to catch segfaults.
+This option is enabled by default.
+
 ## Scripting Support ## {#scripting_opt}
 
 The KICAD_SCRIPTING option is used to enable building the Python scripting support into Pcbnew.
diff --git a/common/dialog_about/dialog_about.cpp b/common/dialog_about/dialog_about.cpp
index 9fc8233ef..734e7e9b7 100644
--- a/common/dialog_about/dialog_about.cpp
+++ b/common/dialog_about/dialog_about.cpp
@@ -526,6 +526,13 @@ void DIALOG_ABOUT::buildVersionInfoData( wxString& aMsg, bool aFormatHtml )
     aMsg << OFF;
 #endif
 
+    aMsg << indent4 << "KICAD_CRASH_REPORTER=";
+#ifdef KICAD_CRASH_REPORTER
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
     aMsg << indent4 << "KICAD_SCRIPTING=";
 #ifdef KICAD_SCRIPTING
     aMsg << ON;
diff --git a/common/single_top.cpp b/common/single_top.cpp
index acc0e0eb4..8e2549fab 100644
--- a/common/single_top.cpp
+++ b/common/single_top.cpp
@@ -126,7 +126,7 @@ struct APP_SINGLE_TOP : public wxApp
 {
     APP_SINGLE_TOP(): wxApp()
     {
-#if wxUSE_ON_FATAL_EXCEPTION
+#if wxUSE_ON_FATAL_EXCEPTION && defined( KICAD_CRASH_REPORTER )
         wxHandleFatalExceptions();
 #endif
 
@@ -256,10 +256,12 @@ struct APP_SINGLE_TOP : public wxApp
     }
 #endif
 
+#if wxUSE_ON_FATAL_EXCEPTION && defined( KICAD_CRASH_REPORTER )
     void OnFatalException() override
     {
         DEBUG_REPORT::GenerateReport(wxDebugReport::Context_Exception);
     }
+#endif
 
 #ifdef __WXMAC__
 
diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp
index 2ecf0a630..2932b167c 100644
--- a/kicad/kicad.cpp
+++ b/kicad/kicad.cpp
@@ -220,12 +220,11 @@ struct APP_KICAD : public wxApp
 {
     APP_KICAD(): wxApp()
     {
-#if defined (__LINUX__)
-
 #if wxUSE_ON_FATAL_EXCEPTION
         wxHandleFatalExceptions();
 #endif
 
+#if defined (__LINUX__)
         // Disable proxy menu in Unity window manager. Only usual menubar works with
         // wxWidgets (at least <= 3.1).  When the proxy menu menubar is enable, some
         // important things for us do not work: menuitems UI events and shortcuts.
@@ -279,10 +278,12 @@ struct APP_KICAD : public wxApp
         return -1;
     }
 
+#if wxUSE_ON_FATAL_EXCEPTION && defined( KICAD_CRASH_REPORTER )
     void OnFatalException() override
     {
         DEBUG_REPORT::GenerateReport(wxDebugReport::Context_Exception);
     }
+#endif
 
     /**
      * Set MacOS file associations.
-- 
2.17.1

>From 5733cd8e926ae5eb39e968e8cf3ba9154051b118 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 1 Nov 2018 11:22:58 +0100
Subject: [PATCH 03/11] Decoupled APP_INFO from the about dialog

---
 common/dialog_about/AboutDialog_main.cpp | 245 ++++++++++++-----------
 common/dialog_about/aboutinfo.h          |  73 +++----
 2 files changed, 163 insertions(+), 155 deletions(-)

diff --git a/common/dialog_about/AboutDialog_main.cpp b/common/dialog_about/AboutDialog_main.cpp
index 2e04bf389..b12e643d4 100644
--- a/common/dialog_about/AboutDialog_main.cpp
+++ b/common/dialog_about/AboutDialog_main.cpp
@@ -55,16 +55,18 @@ static wxString HtmlNewline( const unsigned int amount = 1 );
  * Initializes the <code>ABOUT_APP_INFO</code> object with application specific information.
  * This is the object which holds all information about the application
  */
-static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInfo )
+void ABOUT_APP_INFO::Build( EDA_BASE_FRAME* aParent )
 {
     // Set application specific icon
-    aInfo.SetAppIcon( aParent->GetIcon() );
+
+    if ( aParent )
+        SetAppIcon( aParent->GetIcon() );
 
     /* Set title */
-    aInfo.SetAppName( Pgm().App().GetAppName() );
+    SetAppName( Pgm().App().GetAppName() );
 
     /* Copyright information */
-    aInfo.SetCopyright( "(C) 1992-2019 KiCad Developers Team" );
+    SetCopyright( "(C) 1992-2018 KiCad Developers Team" );
 
     /* KiCad build version */
     wxString version;
@@ -76,7 +78,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
 #endif
             << " build";
 
-    aInfo.SetBuildVersion( version );
+    SetBuildVersion( version );
 
     /* wxWidgets version */
     wxString libVersion;
@@ -101,7 +103,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
 
     libVersion << "Platform: " << wxGetOsDescription() << ", " << platformInfo.GetArchName();
 
-    aInfo.SetLibVersion( libVersion );
+    SetLibVersion( libVersion );
 
 
     /* info/description part HTML formatted */
@@ -174,7 +176,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
 
     description << "</ul></p>";
 
-    aInfo.SetDescription( description );
+    SetDescription( description );
 
 
     // License information also HTML formatted:
@@ -187,7 +189,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
                           _( "GNU Affero General Public License (AGPL) version 3 or any later version" ) )
         << "</div>";
 
-    aInfo.SetLicense( license );
+    SetLicense( license );
+
+    if( !aParent )
+        return;
 
 
     /* A contributor consists of the following information:
@@ -203,168 +208,168 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
      */
 
     // The core developers
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Dick Hollenbeck" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Wayne Stambaugh" ) );
+    AddDeveloper( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
+    AddDeveloper( new CONTRIBUTOR( "Dick Hollenbeck" ) );
+    AddDeveloper( new CONTRIBUTOR( "Wayne Stambaugh" ) );
 
     // alphabetically by last name after main 3 above:
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Frank Bennett" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Cirilo Bernardo" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Kevin Cozens" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Jonas Diemer" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Jon Evans" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Seth Hillbrand" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Torsten Hüter" ) ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Jerry Jacobs" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Mario Luzeiro" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Daniel Majewski" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Lorenzo Marcantonio" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Marco Mattila" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Russell Oliver" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Alexis Lockwood" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Miguel Angel Ajo Pelayo" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Jacobo Aragunde Perez" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Simon Richter" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Mark Roszko" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Marco Serantoni" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Brian Sidebotham" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ) ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Rafael Sokolowski" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Vesa Solonen" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Orson (Maciej Sumiński)" ) ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Oliver Walters" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Tomasz Wlostowski" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Adam Wolf" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Jeff Young" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Alexander Zakamaldin" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Henner Zeller" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( "Andrew Zonenberg" ) );
-    aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
+    AddDeveloper( new CONTRIBUTOR( "Frank Bennett" ) );
+    AddDeveloper( new CONTRIBUTOR( "Cirilo Bernardo" ) );
+    AddDeveloper( new CONTRIBUTOR( "Kevin Cozens" ) );
+    AddDeveloper( new CONTRIBUTOR( "Jonas Diemer" ) );
+    AddDeveloper( new CONTRIBUTOR( "Jon Evans" ) );
+    AddDeveloper( new CONTRIBUTOR( "Seth Hillbrand" ) );
+    AddDeveloper( new CONTRIBUTOR( wxT( "Torsten Hüter" ) ) );
+    AddDeveloper( new CONTRIBUTOR( "Jerry Jacobs" ) );
+    AddDeveloper( new CONTRIBUTOR( "Mario Luzeiro" ) );
+    AddDeveloper( new CONTRIBUTOR( "Daniel Majewski" ) );
+    AddDeveloper( new CONTRIBUTOR( "Lorenzo Marcantonio" ) );
+    AddDeveloper( new CONTRIBUTOR( "Marco Mattila" ) );
+    AddDeveloper( new CONTRIBUTOR( "Russell Oliver" ) );
+    AddDeveloper( new CONTRIBUTOR( "Alexis Lockwood" ) );
+    AddDeveloper( new CONTRIBUTOR( "Miguel Angel Ajo Pelayo" ) );
+    AddDeveloper( new CONTRIBUTOR( "Jacobo Aragunde Perez" ) );
+    AddDeveloper( new CONTRIBUTOR( "Simon Richter" ) );
+    AddDeveloper( new CONTRIBUTOR( "Mark Roszko" ) );
+    AddDeveloper( new CONTRIBUTOR( "Marco Serantoni" ) );
+    AddDeveloper( new CONTRIBUTOR( "Brian Sidebotham" ) );
+    AddDeveloper( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ) ) );
+    AddDeveloper( new CONTRIBUTOR( "Rafael Sokolowski" ) );
+    AddDeveloper( new CONTRIBUTOR( "Vesa Solonen" ) );
+    AddDeveloper( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
+    AddDeveloper( new CONTRIBUTOR( wxT( "Orson (Maciej Sumiński)" ) ) );
+    AddDeveloper( new CONTRIBUTOR( "Oliver Walters" ) );
+    AddDeveloper( new CONTRIBUTOR( "Tomasz Wlostowski" ) );
+    AddDeveloper( new CONTRIBUTOR( "Adam Wolf" ) );
+    AddDeveloper( new CONTRIBUTOR( "Jeff Young" ) );
+    AddDeveloper( new CONTRIBUTOR( "Alexander Zakamaldin" ) );
+    AddDeveloper( new CONTRIBUTOR( "Henner Zeller" ) );
+    AddDeveloper( new CONTRIBUTOR( "Andrew Zonenberg" ) );
+    AddDeveloper( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
 
     // The document writers
-    aInfo.AddDocWriter( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
-    aInfo.AddDocWriter( new CONTRIBUTOR( "Marco Ciampa" ) );
-    aInfo.AddDocWriter( new CONTRIBUTOR( "Dick Hollenbeck" ) );
-    aInfo.AddDocWriter( new CONTRIBUTOR( "Igor Plyatov" ) );
-    aInfo.AddDocWriter( new CONTRIBUTOR( "Wayne Stambaugh" ) );
-    aInfo.AddDocWriter( new CONTRIBUTOR( "Fabrizio Tappero" ) );
+    AddDocWriter( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
+    AddDocWriter( new CONTRIBUTOR( "Marco Ciampa" ) );
+    AddDocWriter( new CONTRIBUTOR( "Dick Hollenbeck" ) );
+    AddDocWriter( new CONTRIBUTOR( "Igor Plyatov" ) );
+    AddDocWriter( new CONTRIBUTOR( "Wayne Stambaugh" ) );
+    AddDocWriter( new CONTRIBUTOR( "Fabrizio Tappero" ) );
 
     /* The translators
      * As category the language to which the translation was done is used
      * and as icon the national flag of the corresponding country.
      */
-    aInfo.AddTranslator( new CONTRIBUTOR( "Robert Buj",
+    AddTranslator( new CONTRIBUTOR( "Robert Buj",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Catalan (CA)",
-                                          aInfo.CreateKiBitmap( lang_ca_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Martin Kratoška" ),
+                                          CreateKiBitmap( lang_ca_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( wxT( "Martin Kratoška" ),
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Czech (CZ)",
-                                          aInfo.CreateKiBitmap( lang_cs_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Jerry Jacobs",
+                                          CreateKiBitmap( lang_cs_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Jerry Jacobs",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Dutch (NL)",
-                                          aInfo.CreateKiBitmap( lang_nl_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Vesa Solonen",
+                                          CreateKiBitmap( lang_nl_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Vesa Solonen",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Finnish (FI)",
-                                          aInfo.CreateKiBitmap( lang_fi_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Jean-Pierre Charras",
+                                          CreateKiBitmap( lang_fi_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Jean-Pierre Charras",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "French (FR)",
-                                          aInfo.CreateKiBitmap( lang_fr_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ),
+                                          CreateKiBitmap( lang_fr_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ),
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Polish (PL)",
-                                          aInfo.CreateKiBitmap( lang_pl_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Kerusey Karyu",
+                                          CreateKiBitmap( lang_pl_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Kerusey Karyu",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Polish (PL)",
-                                          aInfo.CreateKiBitmap( lang_pl_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Renie Marquet",
+                                          CreateKiBitmap( lang_pl_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Renie Marquet",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Portuguese (PT)",
-                                          aInfo.CreateKiBitmap( lang_pt_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Igor Plyatov",
+                                          CreateKiBitmap( lang_pt_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Igor Plyatov",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Russian (RU)",
-                                          aInfo.CreateKiBitmap( lang_ru_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Andrey Fedorushkov",
+                                          CreateKiBitmap( lang_ru_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Andrey Fedorushkov",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Russian (RU)",
-                                          aInfo.CreateKiBitmap( lang_ru_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Eldar Khayrullin",
+                                          CreateKiBitmap( lang_ru_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Eldar Khayrullin",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Russian (RU)",
-                                         aInfo.CreateKiBitmap( lang_ru_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Pedro Martin del Valle",
+                                         CreateKiBitmap( lang_ru_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Pedro Martin del Valle",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Spanish (ES)",
-                                          aInfo.CreateKiBitmap( lang_es_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
+                                          CreateKiBitmap( lang_es_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Spanish (ES)",
-                                          aInfo.CreateKiBitmap( lang_es_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Figuero" ),
+                                          CreateKiBitmap( lang_es_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Figuero" ),
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Spanish (ES)",
-                                          aInfo.CreateKiBitmap( lang_es_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Rafael Sokolowski",
+                                          CreateKiBitmap( lang_es_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Rafael Sokolowski",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "German (DE)",
-                                          aInfo.CreateKiBitmap( lang_de_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Kenta Yonekura",
+                                          CreateKiBitmap( lang_de_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Kenta Yonekura",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Japanese (JA)",
-                                          aInfo.CreateKiBitmap( lang_jp_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Manolis Stefanis",
+                                          CreateKiBitmap( lang_jp_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Manolis Stefanis",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Greek (el_GR)",
-                                          aInfo.CreateKiBitmap( lang_gr_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Athanasios Vlastos",
+                                          CreateKiBitmap( lang_gr_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Athanasios Vlastos",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Greek (el_GR)",
-                                          aInfo.CreateKiBitmap( lang_gr_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Milonas Kostas",
+                                          CreateKiBitmap( lang_gr_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Milonas Kostas",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Greek (el_GR)",
-                                          aInfo.CreateKiBitmap( lang_gr_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Michail Misirlis",
+                                          CreateKiBitmap( lang_gr_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Michail Misirlis",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Greek (el_GR)",
-                                          aInfo.CreateKiBitmap( lang_gr_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Massimo Cioce",
+                                          CreateKiBitmap( lang_gr_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Massimo Cioce",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Italian (IT)",
-                                          aInfo.CreateKiBitmap( lang_it_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Marco Ciampa",
+                                          CreateKiBitmap( lang_it_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Marco Ciampa",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Italian (IT)",
-                                          aInfo.CreateKiBitmap( lang_it_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Evgeniy Ivanov",
+                                          CreateKiBitmap( lang_it_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Evgeniy Ivanov",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Bulgarian (BG)",
@@ -377,85 +382,85 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
 
     // Maintainer who helper in translations, but not in a specific translation
     #define OTHERS_IN_TRANSLATION _( "Others" )
-    aInfo.AddTranslator( new CONTRIBUTOR( "Remy Halvick",
+    AddTranslator( new CONTRIBUTOR( "Remy Halvick",
                                           wxEmptyString,
                                           wxEmptyString,
                                           OTHERS_IN_TRANSLATION ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "David Briscoe",
+    AddTranslator( new CONTRIBUTOR( "David Briscoe",
                                           wxEmptyString,
                                           wxEmptyString,
                                           OTHERS_IN_TRANSLATION ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Dominique Laigle",
+    AddTranslator( new CONTRIBUTOR( "Dominique Laigle",
                                           wxEmptyString,
                                           wxEmptyString,
                                           OTHERS_IN_TRANSLATION ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Paul Burke",
+    AddTranslator( new CONTRIBUTOR( "Paul Burke",
                                           wxEmptyString,
                                           wxEmptyString,
                                           OTHERS_IN_TRANSLATION ) );
 
     // Programm credits for icons
     #define ICON_CONTRIBUTION _( "Icons by" )
-    aInfo.AddArtist( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
+    AddArtist( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
                                       wxEmptyString,
                                       wxEmptyString,
                                       ICON_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( svg_file_xpm ) ) );
-    aInfo.AddArtist( new CONTRIBUTOR( "Konstantin Baranovskiy",
+                                      CreateKiBitmap( svg_file_xpm ) ) );
+    AddArtist( new CONTRIBUTOR( "Konstantin Baranovskiy",
                                       wxEmptyString,
                                       wxEmptyString,
                                       ICON_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( svg_file_xpm ) ) );
-    aInfo.AddArtist( new CONTRIBUTOR( "Fabrizio Tappero",
+                                      CreateKiBitmap( svg_file_xpm ) ) );
+    AddArtist( new CONTRIBUTOR( "Fabrizio Tappero",
                                       wxEmptyString,
                                       wxEmptyString,
                                       ICON_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( svg_file_xpm ) ) );
+                                      CreateKiBitmap( svg_file_xpm ) ) );
 
     // Program credits for 3d models
     #define MODELS_3D_CONTRIBUTION _( "3D models by" )
-    aInfo.AddArtist( new CONTRIBUTOR( "GitHub contributors",
+    AddArtist( new CONTRIBUTOR( "GitHub contributors",
                                       wxEmptyString,
                                       "https://github.com/KiCad/kicad-packages3D/graphs/contributors";,
                                       MODELS_3D_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( three_d_xpm ) ) );
-    aInfo.AddArtist( new CONTRIBUTOR( "Christophe Boschat",
+                                      CreateKiBitmap( three_d_xpm ) ) );
+    AddArtist( new CONTRIBUTOR( "Christophe Boschat",
                                       wxEmptyString,
                                       wxEmptyString,
                                       MODELS_3D_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( three_d_xpm ) ) );
-    aInfo.AddArtist( new CONTRIBUTOR( "Renie Marquet",
+                                      CreateKiBitmap( three_d_xpm ) ) );
+    AddArtist( new CONTRIBUTOR( "Renie Marquet",
                                       wxEmptyString,
                                       wxEmptyString,
                                       MODELS_3D_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( three_d_xpm ) ) );
+                                      CreateKiBitmap( three_d_xpm ) ) );
 
     #define SYMBOL_LIB_CONTRIBUTION _( "Symbols by" )
-    aInfo.AddArtist( new CONTRIBUTOR( "GitHub contributors",
+    AddArtist( new CONTRIBUTOR( "GitHub contributors",
                                       wxEmptyString,
                                       "https://github.com/KiCad/kicad-symbols/graphs/contributors";,
                                       SYMBOL_LIB_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( new_component_xpm ) ) );
+                                      CreateKiBitmap( new_component_xpm ) ) );
 
     #define FOOTPRINT_LIB_CONTRIBUTION _( "Footprints by" )
-    aInfo.AddArtist( new CONTRIBUTOR( "GitHub contributors",
+    AddArtist( new CONTRIBUTOR( "GitHub contributors",
                                       wxEmptyString,
                                       "https://github.com/KiCad/kicad-footprints/graphs/contributors";,
                                       FOOTPRINT_LIB_CONTRIBUTION,
-                                      aInfo.CreateKiBitmap( edit_module_xpm ) ) );
+                                      CreateKiBitmap( edit_module_xpm ) ) );
 
     // Program credits for package developers.
-    aInfo.AddPackager( new CONTRIBUTOR( "Jean-Samuel Reynaud" ) );
-    aInfo.AddPackager( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
-    aInfo.AddPackager( new CONTRIBUTOR( "Adam Wolf" ) );
-    aInfo.AddPackager( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
+    AddPackager( new CONTRIBUTOR( "Jean-Samuel Reynaud" ) );
+    AddPackager( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
+    AddPackager( new CONTRIBUTOR( "Adam Wolf" ) );
+    AddPackager( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
 }
 
 
 void ShowAboutDialog( EDA_BASE_FRAME* aParent )
 {
     ABOUT_APP_INFO info;
-    buildKicadAboutBanner( aParent, info );
+    info.Build( aParent );
 
     DIALOG_ABOUT dlg( aParent, info );
     dlg.ShowModal();
diff --git a/common/dialog_about/aboutinfo.h b/common/dialog_about/aboutinfo.h
index fee8117f0..a6c1129b5 100644
--- a/common/dialog_about/aboutinfo.h
+++ b/common/dialog_about/aboutinfo.h
@@ -32,6 +32,7 @@
 #include "bitmap_types.h"
 
 class CONTRIBUTOR;
+class EDA_BASE_FRAME;
 
 WX_DECLARE_OBJARRAY( CONTRIBUTOR, CONTRIBUTORS );
 
@@ -47,59 +48,61 @@ public:
     ABOUT_APP_INFO() {};
     virtual ~ABOUT_APP_INFO() {};
 
+    void Build( EDA_BASE_FRAME* aFrame );
+
     void AddDeveloper( const CONTRIBUTOR* developer )
     {
         if( developer != NULL )
-            developers.Add( developer );
+            m_developers.Add( developer );
     }
 
     void AddDocWriter( const CONTRIBUTOR* docwriter )
     {
         if( docwriter != NULL )
-            docwriters.Add( docwriter );
+            m_docwriters.Add( docwriter );
     }
 
     void AddArtist( const CONTRIBUTOR* artist )
     {
         if( artist != NULL )
-            artists.Add( artist );
+            m_artists.Add( artist );
     }
 
     void AddTranslator( const CONTRIBUTOR* translator )
     {
         if( translator != NULL )
-            translators.Add( translator );
+            m_translators.Add( translator );
     }
 
     void AddPackager( const CONTRIBUTOR* packager )
     {
         if( packager   != NULL )
-            packagers.Add( packager );
+            m_packagers.Add( packager );
     }
 
-    CONTRIBUTORS GetDevelopers()  { return developers; }
-    CONTRIBUTORS GetDocWriters()  { return docwriters; }
-    CONTRIBUTORS GetArtists()     { return artists; }
-    CONTRIBUTORS GetTranslators() { return translators; }
-    CONTRIBUTORS GetPackagers()   { return packagers; }
+    CONTRIBUTORS GetDevelopers()  { return m_developers; }
+    CONTRIBUTORS GetDocWriters()  { return m_docwriters; }
+    CONTRIBUTORS GetArtists()     { return m_artists; }
+    CONTRIBUTORS GetTranslators() { return m_translators; }
+    CONTRIBUTORS GetPackagers()   { return m_packagers; }
 
-    void SetDescription( const wxString& text ) { description = text; }
-    wxString& GetDescription() { return description; }
+    void SetDescription( const wxString& text ) { m_description = text; }
+    wxString& GetDescription() { return m_description; }
 
-    void SetLicense( const wxString& text ) { license = text; }
-    wxString& GetLicense() { return license; }
+    void SetLicense( const wxString& text ) { m_license = text; }
+    wxString& GetLicense() { return m_license; }
 
-    void SetCopyright( const wxString& text ) { copyright = text; }
-    wxString GetCopyright() { return copyright; }
+    void SetCopyright( const wxString& text ) { m_copyright = text; }
+    wxString GetCopyright() { return m_copyright; }
 
-    void SetAppName( const wxString& name ) { appName = name; }
-    wxString& GetAppName() { return appName; }
+    void SetAppName( const wxString& name ) { m_appName = name; }
+    wxString& GetAppName() { return m_appName; }
 
-    void SetBuildVersion( const wxString& version ) { buildVersion = version; }
-    wxString& GetBuildVersion() { return buildVersion; }
+    void SetBuildVersion( const wxString& version ) { m_buildVersion = version; }
+    wxString& GetBuildVersion() { return m_buildVersion; }
 
-    void SetLibVersion( const wxString& version ) { libVersion = version; }
-    wxString& GetLibVersion() { return libVersion; }
+    void SetLibVersion( const wxString& version ) { m_libVersion = version; }
+    wxString& GetLibVersion() { return m_libVersion; }
 
     void SetAppIcon( const wxIcon& aIcon ) { m_appIcon = aIcon; }
     wxIcon& GetAppIcon() { return m_appIcon; }
@@ -112,19 +115,19 @@ public:
     }
 
 private:
-    CONTRIBUTORS developers;
-    CONTRIBUTORS docwriters;
-    CONTRIBUTORS artists;
-    CONTRIBUTORS translators;
-    CONTRIBUTORS packagers;
-
-    wxString     description;
-    wxString     license;
-
-    wxString     copyright;
-    wxString     appName;
-    wxString     buildVersion;
-    wxString     libVersion;
+    CONTRIBUTORS m_developers;
+    CONTRIBUTORS m_docwriters;
+    CONTRIBUTORS m_artists;
+    CONTRIBUTORS m_translators;
+    CONTRIBUTORS m_packagers;
+
+    wxString     m_description;
+    wxString     m_license;
+
+    wxString     m_copyright;
+    wxString     m_appName;
+    wxString     m_buildVersion;
+    wxString     m_libVersion;
 
     wxIcon       m_appIcon;
 
-- 
2.17.1

>From f19537083284c73a83ecb7b1f4c09e0fa3485985 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 1 Nov 2018 11:23:39 +0100
Subject: [PATCH 04/11] Support for POST requests in KICAD_CURL_EASY

---
 common/kicad_curl/kicad_curl_easy.cpp | 11 +++++++++++
 include/kicad_curl/kicad_curl_easy.h  |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/common/kicad_curl/kicad_curl_easy.cpp b/common/kicad_curl/kicad_curl_easy.cpp
index 18c6f96e5..b4fd96b32 100644
--- a/common/kicad_curl/kicad_curl_easy.cpp
+++ b/common/kicad_curl/kicad_curl_easy.cpp
@@ -62,6 +62,7 @@ KICAD_CURL_EASY::KICAD_CURL_EASY() :
 
     curl_easy_setopt( m_CURL, CURLOPT_WRITEFUNCTION, write_callback );
     curl_easy_setopt( m_CURL, CURLOPT_WRITEDATA, (void*) &m_buffer );
+    curl_easy_setopt( m_CURL, CURLOPT_TIMEOUT, 20L);
 }
 
 
@@ -81,6 +82,11 @@ void KICAD_CURL_EASY::Perform()
         curl_easy_setopt( m_CURL, CURLOPT_HTTPHEADER, m_headers );
     }
 
+    if( m_postData.length() )
+    {
+        curl_easy_setopt( m_CURL, CURLOPT_POSTFIELDS, m_postData.c_str() );
+    }
+
     // bonus: retain worst case memory allocation, should re-use occur
     m_buffer.clear();
 
@@ -142,3 +148,8 @@ bool KICAD_CURL_EASY::SetFollowRedirects( bool aFollow )
     }
     return false;
 }
+
+void KICAD_CURL_EASY::SetPostData( const std::string& aData )
+{
+    m_postData = aData;
+}
\ No newline at end of file
diff --git a/include/kicad_curl/kicad_curl_easy.h b/include/kicad_curl/kicad_curl_easy.h
index 148e16c70..f75cc6c0c 100644
--- a/include/kicad_curl/kicad_curl_easy.h
+++ b/include/kicad_curl/kicad_curl_easy.h
@@ -126,6 +126,8 @@ public:
         return m_buffer;
     }
 
+    void SetPostData( const std::string& aData );
+
 private:
     /**
      * Function setOption
@@ -141,6 +143,7 @@ private:
     CURL*           m_CURL;
     curl_slist*     m_headers;
     std::string     m_buffer;
+    std::string     m_postData;
 };
 
 #endif // KICAD_CURL_EASY_H_
-- 
2.17.1

>From cfbe584c50c9941828b0f03566b8ea3cd634214b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 1 Nov 2018 11:24:28 +0100
Subject: [PATCH 05/11] Improved UX in the crash reporter

---
 common/CMakeLists.txt                         |    2 +
 common/debug_report.cpp                       |  535 +++++---
 common/dialogs/dialog_crash_report_base.cpp   |   90 ++
 common/dialogs/dialog_crash_report_base.fbp   | 1092 +++++++++++++++++
 common/dialogs/dialog_crash_report_base.h     |   65 +
 .../dialog_crash_report_preview_base.cpp      |   38 +
 .../dialog_crash_report_preview_base.fbp      |  237 ++++
 .../dialog_crash_report_preview_base.h        |   46 +
 include/debug_report.h                        |   11 +
 9 files changed, 1976 insertions(+), 140 deletions(-)
 create mode 100644 common/dialogs/dialog_crash_report_base.cpp
 create mode 100644 common/dialogs/dialog_crash_report_base.fbp
 create mode 100644 common/dialogs/dialog_crash_report_base.h
 create mode 100644 common/dialogs/dialog_crash_report_preview_base.cpp
 create mode 100644 common/dialogs/dialog_crash_report_preview_base.fbp
 create mode 100644 common/dialogs/dialog_crash_report_preview_base.h

diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 1a4d6fd28..9d86900ff 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -186,6 +186,8 @@ set( COMMON_DLG_SRCS
     dialogs/dialog_color_picker_base.cpp
     dialogs/dialog_configure_paths.cpp
     dialogs/dialog_configure_paths_base.cpp
+    dialogs/dialog_crash_report_base.cpp
+    dialogs/dialog_crash_report_preview_base.cpp
     dialogs/dialog_display_info_HTML_base.cpp
     dialogs/dialog_edit_library_tables.cpp
     dialogs/dialog_exit_base.cpp
diff --git a/common/debug_report.cpp b/common/debug_report.cpp
index b398529e6..f2d349fca 100644
--- a/common/debug_report.cpp
+++ b/common/debug_report.cpp
@@ -21,61 +21,157 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
+#include <thread>
+
 #include <debug_report.h>
 
-#include "wx/xml/xml.h"
 #include <wx/debugrpt.h>
+#include <wx/base64.h>
+#include <wx/progdlg.h>
+
+#include <dialogs/dialog_crash_report_base.h>
+#include <dialogs/dialog_crash_report_preview_base.h>
+#include <kicad_curl/kicad_curl_easy.h>
 
 #if wxUSE_STACKWALKER
 #include "wx/stackwalk.h"
 #endif
 
+#include <aboutinfo.h>
+
 #include <wx/datetime.h>
 #include <wx/ffile.h>
+#include <wx/dynlib.h>
 #include <wx/filename.h>
 
+extern std::string GetKicadCurlVersion();
+extern std::string GetCurlLibVersion();
 
-void DEBUG_REPORT::GenerateReport( Context ctx )
+class DIALOG_CRASH_REPORT_PREVIEW : public DIALOG_CRASH_REPORT_PREVIEW_BASE
 {
-    DEBUG_REPORT report;
+public:
+	DIALOG_CRASH_REPORT_PREVIEW( wxWindow* parent, const wxString& aText ) :
+        DIALOG_CRASH_REPORT_PREVIEW_BASE( parent )
+    {
+        m_text->ChangeValue( aText );
+    }
+};
 
-    // Add all wx default reports
-    report.AddAll( ctx );
 
-    // Add our own reports
-    report.AddTimestamp();
+class DIALOG_CRASH_REPORT : public DIALOG_CRASH_REPORT_BASE
+{
+public:
+    DIALOG_CRASH_REPORT( DEBUG_REPORT* aReport = nullptr ) :
+        DIALOG_CRASH_REPORT_BASE( nullptr )
+    {
+        m_report = aReport;
+    }
+
+	~DIALOG_CRASH_REPORT()
+    {
+
+    }
+
+    DEBUG_REPORT *GetReport() const{ return m_report ;}
 
-    // Show confirmation dialog and save report
-    if( wxDebugReportPreviewStd().Show( report ) )
+    virtual void OnViewReport( wxCommandEvent& event ) override
     {
-        report.Process();
+        DIALOG_CRASH_REPORT_PREVIEW preview( nullptr, m_report->GetReportText() );
+
+        preview.ShowModal();
     }
+
+    virtual void OnSendReport( wxCommandEvent& event ) override
+    {
+        auto rpt = m_report->GetReportText();
+        bool ok = true, done = false;
+
+        wxString encoded = wxBase64Encode( (const char*) rpt.c_str(), rpt.length() ); 
+
+        auto senderThreadFunc = [&]( ) {
+            KICAD_CURL_EASY curl;
+            curl.SetPostData( (const char *) encoded.c_str() );
+            curl.SetURL( "http://pcbe15262:8051"; );
+            
+            try
+            {
+                printf("Uploading...\n");
+                curl.Perform();
+                printf("Done\n");
+            }
+            catch ( ... )
+            {
+                ok = false;
+            }
+            done = true;
+        };
+
+        std::thread senderThread ( senderThreadFunc );
+
+        wxProgressDialog dlg( _("Sending report..." ), _("The crash report is being uploaded. Please wait..."),
+                            100,    // range
+                            this,   // parent 
+                            wxPD_APP_MODAL |
+                            wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small
+                            );
+
+        while( !done && senderThread.joinable() )
+        {
+            dlg.Pulse();
+            wxMilliSleep( 100 );
+        }
+
+        senderThread.join();
+
+        if( !ok )
+        {
+            wxMessageBox( wxT("Error sending cebug report.") );
+            return;
+        }
+        m_btnSendReport->SetLabel( _("Report sent") );
+        m_btnSendReport->Enable( false );
+    }
+
+	virtual void OnExitKicad( wxCommandEvent& event ) override
+    {
+        auto app = wxApp::GetInstance();
+        EndModal( false );
+        app->ExitMainLoop();
+    }
+
+
+private:
+    DEBUG_REPORT* m_report;
+};
+
+static const wxString formatHex( uint64_t addr )
+{
+    char tmp[1024];
+    snprintf(tmp, 1024, "%p", (size_t) addr);
+    return wxString( tmp );
 }
 
-bool DEBUG_REPORT::AddTimestamp()
+void DEBUG_REPORT::GenerateReport( Context ctx )
 {
-    wxFileName fn( GetDirectory(), wxT( "timestamp.my" ) );
-    wxFFile    file( fn.GetFullPath(), wxT( "w" ) );
-    if( !file.IsOpened() )
-        return false;
+    DEBUG_REPORT report;
 
-    wxDateTime dt = wxDateTime::Now();
-    bool       ret = file.Write( dt.FormatISODate() + wxT( ' ' ) + dt.FormatISOTime() );
-    ret &= file.Close();
+    // Add all wx default reports
+    report.AddAll( ctx );
 
-    AddFile( fn.GetFullName(), wxT( "timestamp of this report" ) );
+    DIALOG_CRASH_REPORT crashDialog( &report );
 
-    return ret;
+    //crashDialog.SetVisible( true );
+    crashDialog.ShowModal( );
 }
 
 #if !wxCHECK_VERSION( 3, 1, 2 ) && wxUSE_STACKWALKER
-class XmlStackWalker : public wxStackWalker
+class YAML_STACK_WALKER : public wxStackWalker
 {
 public:
-    XmlStackWalker( wxXmlNode* nodeStack )
+    YAML_STACK_WALKER( )
     {
         m_isOk = false;
-        m_nodeStack = nodeStack;
+        m_msg << "stack-trace:\n";
     }
 
     bool IsOk() const
@@ -83,146 +179,310 @@ public:
         return m_isOk;
     }
 
+    const wxString& GetMessage() const
+    {
+        return m_msg;
+    }
+
 protected:
     virtual void OnStackFrame( const wxStackFrame& frame ) override;
 
-    wxXmlNode* m_nodeStack;
     bool       m_isOk;
+    wxString   m_msg;
 };
 
-// ----------------------------------------------------------------------------
-// local functions
-// ----------------------------------------------------------------------------
+// ============================================================================
+// Stack walker implementation based on wx, but with additional information
+// like offset, address and module of a stack item
+// ============================================================================
 
-static inline void HexProperty( wxXmlNode* node, const wxChar* name, wxUIntPtr value )
+void YAML_STACK_WALKER::OnStackFrame( const wxStackFrame& frame )
 {
-    node->AddAttribute( name, wxString::Format( wxT( "%#zx" ), value ) );
-}
+    m_isOk = true;
 
-static inline void NumProperty( wxXmlNode* node, const wxChar* name, unsigned long value )
-{
-    node->AddAttribute( name, wxString::Format( wxT( "%lu" ), value ) );
+    wxString eol = "\n";
+    wxString indent4 = "    ";
+
+    auto func = frame.GetName();
+
+    m_msg << indent4 << "- frame " <<  frame.GetLevel() << ": " << eol;
+    if( !func.empty() )
+    {
+        m_msg << indent4 << indent4 << "function: " << func << eol;
+    }
+
+    m_msg << indent4 << indent4 << "offset:  " << formatHex(frame.GetOffset()) << eol;
+    m_msg << indent4 << indent4 << "address: " << formatHex(wxPtrToUInt( frame.GetAddress() )) << eol;
 }
+#endif
 
-static inline void TextElement( wxXmlNode* node, const wxChar* name, const wxString& value )
+void DEBUG_REPORT::buildVersionInfo(wxString& aMsg)
 {
-    wxXmlNode* nodeChild = new wxXmlNode( wxXML_ELEMENT_NODE, name );
-    node->AddChild( nodeChild );
-    nodeChild->AddChild( new wxXmlNode( wxXML_TEXT_NODE, wxEmptyString, value ) );
-}
+    ABOUT_APP_INFO info;
+    info.Build( nullptr );
 
-#if wxUSE_CRASHREPORT && defined( __INTEL__ )
+    // DO NOT translate information in the msg_version string
 
-static inline void HexElement( wxXmlNode* node, const wxChar* name, unsigned long value )
-{
-    TextElement( node, name, wxString::Format( wxT( "%08lx" ), value ) );
-}
+    wxString eol = "\n";
+    wxString indent4 = "    ";
 
-#endif // wxUSE_CRASHREPORT
+    #define ON "ON" << eol
+    #define OFF "OFF" << eol
 
-// ============================================================================
-// XmlStackWalker implementation based on wx, but with additional information
-// like offset, address and module of a stack item
-// ============================================================================
+    wxPlatformInfo platform;
+    aMsg << "application: " << info.GetAppName() << eol;
+    aMsg << "version:     " << info.GetBuildVersion() << eol;
+    aMsg << eol;
 
-void XmlStackWalker::OnStackFrame( const wxStackFrame& frame )
-{
-    m_isOk = true;
+    aMsg << "libraries:" << eol;
+    aMsg << indent4 << "- " << wxGetLibraryVersionInfo().GetVersionString() << eol;
 
-    wxXmlNode* nodeFrame = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "frame" ) );
-    m_nodeStack->AddChild( nodeFrame );
+#ifdef BUILD_GITHUB_PLUGIN
+    aMsg << indent4 << "- " << GetKicadCurlVersion() << eol;
+#endif
+    aMsg << eol;
 
-    NumProperty( nodeFrame, wxT( "level" ), frame.GetLevel() );
-    wxString func = frame.GetName();
-    if( !func.empty() )
-    {
-        nodeFrame->AddAttribute( wxT( "function" ), func );
-    }
+    aMsg << "platform: " << eol;
 
-    HexProperty( nodeFrame, wxT( "offset" ), frame.GetOffset() );
-    HexProperty( nodeFrame, wxT( "address" ), wxPtrToUInt( frame.GetAddress() ) );
+    aMsg << indent4 << "os: " << wxGetOsDescription() << eol;
+    aMsg << indent4 << "arch: " << platform.GetArchName() << eol;
+    aMsg << indent4 << "endian: " << platform.GetEndiannessName() << eol;
+    aMsg << indent4 << "wx-port: " << platform.GetPortIdName() << eol;
+    aMsg << eol;
 
-    wxString module = frame.GetModule();
-    if( !module.empty() )
-        nodeFrame->AddAttribute( wxT( "module" ), module );
+    aMsg << "build-info:" << eol;
+    aMsg << indent4 << "wx-widgets: " << wxVERSION_NUM_DOT_STRING << " (";
+    aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")";
 
-    if( frame.HasSourceLocation() )
-    {
-        nodeFrame->AddAttribute( wxT( "file" ), frame.GetFileName() );
-        NumProperty( nodeFrame, wxT( "line" ), frame.GetLine() );
-    }
+    // Get the GTK+ version where possible.
+#ifdef __WXGTK__
+    int major, minor;
 
-    const size_t nParams = frame.GetParamCount();
-    if( nParams )
-    {
-        wxXmlNode* nodeParams = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "parameters" ) );
-        nodeFrame->AddChild( nodeParams );
+    major = wxPlatformInfo().Get().GetToolkitMajorVersion();
+    minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
+    aMsg << " GTK+ " <<  major << "." << minor;
+#endif
 
-        for( size_t n = 0; n < nParams; n++ )
-        {
-            wxXmlNode* nodeParam = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "parameter" ) );
-            nodeParams->AddChild( nodeParam );
+    aMsg << eol;
+
+    aMsg << indent4 << "boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." )
+                      << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
+                      << ( BOOST_VERSION % 100 ) << eol;
+
+#ifdef KICAD_USE_OCC
+    aMsg << indent4 << "opencascade-technology: " << OCC_VERSION_COMPLETE << eol;
+#endif
+
+#ifdef KICAD_USE_OCE
+    aMsg << indent4 << "opencascade-community-edition: " << OCC_VERSION_COMPLETE << eol;
+#endif
+
+#ifdef BUILD_GITHUB_PLUGIN
+    aMsg << indent4 << "curl: " << GetCurlLibVersion() << eol;
+#endif
+
+    aMsg << indent4 << "compiler: ";
+#if defined(__clang__)
+    aMsg << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__;
+#elif defined(__GNUG__)
+    aMsg << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__;
+#elif defined(_MSC_VER)
+    aMsg << "Visual C++ " << _MSC_VER;
+#elif defined(__INTEL_COMPILER)
+    aMsg << "Intel C++ " << __INTEL_COMPILER;
+#else
+    aMsg << "Other Compiler ";
+#endif
+
+#if defined(__GXX_ABI_VERSION)
+    aMsg << " with C++ ABI " << __GXX_ABI_VERSION << eol;
+#else
+    aMsg << " without C++ ABI";
+#endif
+
+    aMsg << eol;
+
+    // Add build settings config (build options):
+    aMsg << "build-settings:" << eol;
+
+    aMsg << indent4 << "- USE_WX_GRAPHICS_CONTEXT=";
+#ifdef USE_WX_GRAPHICS_CONTEXT
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- USE_WX_OVERLAY=";
+#ifdef USE_WX_OVERLAY
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- KICAD_CRASH_REPORTER=";
+#ifdef KICAD_CRASH_REPORTER
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- KICAD_SCRIPTING=";
+#ifdef KICAD_SCRIPTING
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- KICAD_SCRIPTING_MODULES=";
+#ifdef KICAD_SCRIPTING_MODULES
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- KICAD_SCRIPTING_WXPYTHON=";
+#ifdef KICAD_SCRIPTING_WXPYTHON
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- KICAD_SCRIPTING_ACTION_MENU=";
+#ifdef KICAD_SCRIPTING_ACTION_MENU
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
 
-            NumProperty( nodeParam, wxT( "number" ), n );
+    aMsg << indent4 << "- BUILD_GITHUB_PLUGIN=";
+#ifdef BUILD_GITHUB_PLUGIN
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
 
-            wxString type, name, value;
-            if( !frame.GetParam( n, &type, &name, &value ) )
-                continue;
+    aMsg << indent4 << "- KICAD_USE_OCE=";
+#ifdef KICAD_USE_OCE
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
 
-            if( !type.empty() )
-                TextElement( nodeParam, wxT( "type" ), type );
+    aMsg << indent4 << "- KICAD_USE_OCC=";
+#ifdef KICAD_USE_OCC
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << indent4 << "- KICAD_SPICE=";
+#ifdef KICAD_SPICE
+    aMsg << ON;
+#else
+    aMsg << OFF;
+#endif
+
+    aMsg << eol;
+}
+
+void DEBUG_REPORT::buildModulesInfo( wxString& aMsg )
+{
+    wxDynamicLibraryDetailsArray modules(wxDynamicLibrary::ListLoaded());
+    const size_t count = modules.GetCount();
 
-            if( !name.empty() )
-                TextElement( nodeParam, wxT( "name" ), name );
+    if ( !count )
+        return;
+
+    wxString eol = "\n";
+    wxString indent4 = "    ";
+
+    aMsg << "modules:" << eol;
+
+    for ( size_t n = 0; n < count; n++ )
+    {
+        const wxDynamicLibraryDetails& info = modules[n];
+        void *addr = NULL;
+        size_t len = 0;
+
+        wxString path = info.GetPath();
+        if ( path.empty() )
+            path = info.GetName();
+
+        aMsg << indent4 << "- " << path << ": " << eol;
+        if ( info.GetAddress(&addr, &len) )
+        {
+            aMsg << indent4 << indent4 << "base:    " << formatHex( (uint64_t) addr ) << eol;
+            aMsg << indent4 << indent4 << "size:    " << formatHex( (uint64_t) len ) << eol;
+        }
 
-            if( !value.empty() )
-                TextElement( nodeParam, wxT( "value" ), value );
+        wxString ver = info.GetVersion();
+        if ( !ver.empty() )
+        {
+            aMsg << indent4 << indent4 << "version: " << ver << eol;
         }
     }
+    aMsg << eol;
+}
+
+void DEBUG_REPORT::buildExceptionContextInfo ( wxString& aMsg )
+{
+#if wxUSE_CRASHREPORT
+    //printf("BuildExceptInfo\n");
+    wxCrashContext c;
+    if ( !c.code )
+        return;
+
+    wxString eol = "\n";
+    wxString indent4 = "    ";
+
+    aMsg << "exception-context:" << eol;
+
+    aMsg << indent4 << "code:     " << formatHex(c.code) << eol; 
+    aMsg << indent4 << "name:     " << c.GetExceptionString() << eol; 
+    aMsg << indent4 << "address:  " << formatHex(c.addr) << eol; -
+
+#ifdef __INTEL__
+    aMsg << indent4 << "x86-registers:  " << eol;
+    aMsg << indent4 << indent4 << "- eax:   " << formatHex( c.regs.eax ) << eol;
+    aMsg << indent4 << indent4 << "- ebx:   " << formatHex( c.regs.ebx ) << eol;
+    aMsg << indent4 << indent4 << "- ecx:   " << formatHex( c.regs.ecx ) << eol;
+    aMsg << indent4 << indent4 << "- edx:   " << formatHex( c.regs.edx ) << eol;
+    aMsg << indent4 << indent4 << "- esi:   " << formatHex( c.regs.esi ) << eol;
+    aMsg << indent4 << indent4 << "- edi:   " << formatHex( c.regs.edi ) << eol;
+    aMsg << indent4 << indent4 << "- ebp:   " << formatHex( c.regs.ebp ) << eol;
+    aMsg << indent4 << indent4 << "- esp:   " << formatHex( c.regs.esp ) << eol;
+    aMsg << indent4 << indent4 << "- eip:   " << formatHex( c.regs.eip ) << eol;
+    aMsg << indent4 << indent4 << "- cs:    " << formatHex( c.regs.cs ) << eol;
+    aMsg << indent4 << indent4 << "- ds:    " << formatHex( c.regs.ds ) << eol;
+    aMsg << indent4 << indent4 << "- es:    " << formatHex( c.regs.es ) << eol;
+    aMsg << indent4 << indent4 << "- fs:    " << formatHex( c.regs.fs ) << eol;
+    aMsg << indent4 << indent4 << "- gs:    " << formatHex( c.regs.gs ) << eol;
+    aMsg << indent4 << indent4 << "- ss:    " << formatHex( c.regs.ss ) << eol;
+    aMsg << indent4 << indent4 << "- flags: " << formatHex( c.regs.flags ) << eol;
+#endif // __INTEL__
+#endif
 }
 
 
+
 bool DEBUG_REPORT::AddContext( Context ctx )
 {
-    wxCHECK_MSG( IsOk(), false, wxT( "use IsOk() first" ) );
-
-    // create XML dump of current context
-    wxXmlDocument xmldoc;
-    wxXmlNode*    nodeRoot = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "report" ) );
-    xmldoc.SetRoot( nodeRoot );
-    nodeRoot->AddAttribute( wxT( "version" ), wxT( "1.0" ) );
-    nodeRoot->AddAttribute(
-            wxT( "kind" ), ctx == Context_Current ? wxT( "user" ) : wxT( "exception" ) );
-
-    // add system information
-    wxXmlNode* nodeSystemInfo = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "system" ) );
-    if( DoAddSystemInfo( nodeSystemInfo ) )
-        nodeRoot->AddChild( nodeSystemInfo );
-    else
-        delete nodeSystemInfo;
-
-    // add information about the loaded modules
-    wxXmlNode* nodeModules = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "modules" ) );
-    if( DoAddLoadedModules( nodeModules ) )
-        nodeRoot->AddChild( nodeModules );
-    else
-        delete nodeModules;
-
-    // add CPU context information: this only makes sense for exceptions as our
-    // current context is not very interesting otherwise
-    if( ctx == Context_Exception )
-    {
-        wxXmlNode* nodeContext = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "context" ) );
-        if( DoAddExceptionInfo( nodeContext ) )
-            nodeRoot->AddChild( nodeContext );
-        else
-            delete nodeContext;
-    }
-
-    // add stack traceback
+    wxString reportText;
+
+    reportText += wxString::Format("KiCad crash report, version 1.0\n");
+    reportText += wxT("--------------------------------------------------\n\n");
+    
+    wxString verInfo;
+    wxString modInfo;
+    wxString exceptInfo;
+
+    buildVersionInfo( verInfo );
+    buildModulesInfo( modInfo );
+    buildExceptionContextInfo( exceptInfo );
+    
 #if wxUSE_STACKWALKER
-    wxXmlNode*     nodeStack = new wxXmlNode( wxXML_ELEMENT_NODE, wxT( "stack" ) );
-    XmlStackWalker sw( nodeStack );
+    YAML_STACK_WALKER sw;
+
 #if wxUSE_ON_FATAL_EXCEPTION
     if( ctx == Context_Exception )
     {
@@ -234,23 +494,18 @@ bool DEBUG_REPORT::AddContext( Context ctx )
         sw.Walk();
     }
 
-    if( sw.IsOk() )
-        nodeRoot->AddChild( nodeStack );
-    else
-        delete nodeStack;
-#endif // wxUSE_STACKWALKER
-
-    // finally let the user add any extra information he needs
-    DoAddCustomContext( nodeRoot );
+    reportText += verInfo;
+    reportText += modInfo;
+    reportText += exceptInfo;
 
+    if( sw.IsOk() )
+    {
+        reportText += sw.GetMessage();
+    }
 
-    // save the entire context dump in a file
-    wxFileName fn( GetDirectory(), GetReportName(), wxT( "xml" ) );
-
-    if( !xmldoc.Save( fn.GetFullPath() ) )
-        return false;
+    //printf("%s", (const char *) reportText.c_str() );
 
-    AddFile( fn.GetFullName(), _( "process context description" ) );
+    m_reportText = reportText;
 
     return true;
 }
diff --git a/common/dialogs/dialog_crash_report_base.cpp b/common/dialogs/dialog_crash_report_base.cpp
new file mode 100644
index 000000000..ef4ea54f2
--- /dev/null
+++ b/common/dialogs/dialog_crash_report_base.cpp
@@ -0,0 +1,90 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 17 2018)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_crash_report_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DIALOG_CRASH_REPORT_BASE::DIALOG_CRASH_REPORT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+	
+	wxBoxSizer* bSizer2;
+	bSizer2 = new wxBoxSizer( wxHORIZONTAL );
+	
+	wxBoxSizer* bSizer1;
+	bSizer1 = new wxBoxSizer( wxVERTICAL );
+	
+	m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("We are sorry."), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText1->Wrap( -1 );
+	m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	bSizer1->Add( m_staticText1, 0, wxALL|wxEXPAND, 5 );
+	
+	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+	bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+	
+	m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("It looks like KiCad encountered a serious problem and crashed. \n\nTo help us diagnose and fix the problem we generated a crash report that you can send to us.\n\nIf you would like to give us some additional information with the report (e.g. a brief description \nof what were you doing when the crash happened), you can write it down below:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText2->Wrap( -1 );
+	bSizer1->Add( m_staticText2, 0, wxEXPAND|wxALL, 5 );
+	
+	m_additionalInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+	m_additionalInfo->SetMinSize( wxSize( -1,120 ) );
+	
+	bSizer1->Add( m_additionalInfo, 1, wxALL|wxEXPAND, 5 );
+	
+	m_staticText211 = new wxStaticText( this, wxID_ANY, wxT("The report contains only the information about the crash and your operating system\nand does not include any private data. You can view the full text of the report that will be sent to us \nby clicking the View Report button. \n\nNote: if you are offline, we encourage you to click the View Report button, copy the report text\nand send it to us later by creating a bug on:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText211->Wrap( -1 );
+	bSizer1->Add( m_staticText211, 0, wxALL|wxEXPAND, 5 );
+	
+	m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, wxT("http://bugs.launchpad.net/kicad";), wxT("http://www.wxformbuilder.orghttp://bugs.launchpad.net/kicad";), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+	bSizer1->Add( m_hyperlink2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+	
+	m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+	bSizer1->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
+	
+	wxFlexGridSizer* fgSizer1;
+	fgSizer1 = new wxFlexGridSizer( 1, 3, 0, 0 );
+	fgSizer1->AddGrowableCol( 1 );
+	fgSizer1->SetFlexibleDirection( wxBOTH );
+	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+	
+	m_btnViewReport = new wxButton( this, wxID_ANY, wxT("View Report..."), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizer1->Add( m_btnViewReport, 0, wxALL, 5 );
+	
+	m_btnSendReport = new wxButton( this, wxID_ANY, wxT("Send Crash Report"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizer1->Add( m_btnSendReport, 1, wxALL|wxALIGN_RIGHT, 5 );
+	
+	m_btnExit = new wxButton( this, wxID_ANY, wxT("Exit Kicad"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizer1->Add( m_btnExit, 0, wxALL, 5 );
+	
+	
+	bSizer1->Add( fgSizer1, 0, wxEXPAND, 5 );
+	
+	
+	bSizer2->Add( bSizer1, 1, wxEXPAND|wxALL, 5 );
+	
+	
+	this->SetSizer( bSizer2 );
+	this->Layout();
+	
+	this->Centre( wxBOTH );
+	
+	// Connect Events
+	m_btnViewReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CRASH_REPORT_BASE::OnViewReport ), NULL, this );
+	m_btnSendReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CRASH_REPORT_BASE::OnSendReport ), NULL, this );
+	m_btnExit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CRASH_REPORT_BASE::OnExitKicad ), NULL, this );
+}
+
+DIALOG_CRASH_REPORT_BASE::~DIALOG_CRASH_REPORT_BASE()
+{
+	// Disconnect Events
+	m_btnViewReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CRASH_REPORT_BASE::OnViewReport ), NULL, this );
+	m_btnSendReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CRASH_REPORT_BASE::OnSendReport ), NULL, this );
+	m_btnExit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CRASH_REPORT_BASE::OnExitKicad ), NULL, this );
+	
+}
diff --git a/common/dialogs/dialog_crash_report_base.fbp b/common/dialogs/dialog_crash_report_base.fbp
new file mode 100644
index 000000000..3a582ca17
--- /dev/null
+++ b/common/dialogs/dialog_crash_report_base.fbp
@@ -0,0 +1,1092 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="14" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dialog_crash_report_base</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="indent_with_spaces"></property>
+        <property name="internationalize">0</property>
+        <property name="name">dialog_crash_report_base</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">DIALOG_CRASH_REPORT_BASE</property>
+            <property name="pos"></property>
+            <property name="size">730,649</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
+            <property name="title">Kicad Crash Reporter</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiPaneActivated"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnAux1DClick"></event>
+            <event name="OnAux1Down"></event>
+            <event name="OnAux1Up"></event>
+            <event name="OnAux2DClick"></event>
+            <event name="OnAux2Down"></event>
+            <event name="OnAux2Up"></event>
+            <event name="OnChar"></event>
+            <event name="OnCharHook"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMaximize"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnMove"></event>
+            <event name="OnMoveEnd"></event>
+            <event name="OnMoveStart"></event>
+            <event name="OnMoving"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnShow"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer2</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer1</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font">,90,92,-1,70,0</property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">We are sorry.</property>
+                                <property name="markup">0</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticText1</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND | wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticLine" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticline1</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxLI_HORIZONTAL</property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND|wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">It looks like KiCad encountered a serious problem and crashed. &#x0A;&#x0A;To help us diagnose and fix the problem we generated a crash report that you can send to us.&#x0A;&#x0A;If you would like to give us some additional information with the report (e.g. a brief description &#x0A;of what were you doing when the crash happened), you can write it down below:</property>
+                                <property name="markup">0</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticText2</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxTextCtrl" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size">-1,120</property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_additionalInfo</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxTE_MULTILINE</property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">The report contains only the information about the crash and your operating system&#x0A;and does not include any private data. You can view the full text of the report that will be sent to us &#x0A;by clicking the View Report button. &#x0A;&#x0A;Note: if you are offline, we encourage you to click the View Report button, copy the report text&#x0A;and send it to us later by creating a bug on:</property>
+                                <property name="markup">0</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticText211</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                            <property name="proportion">0</property>
+                            <object class="wxHyperlinkCtrl" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="hover_color"></property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">http://bugs.launchpad.net/kicad</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_hyperlink2</property>
+                                <property name="normal_color"></property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxHL_DEFAULT_STYLE</property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="url">http://www.wxformbuilder.orghttp://bugs.launchpad.net/kicad</property>
+                                <property name="visited_color"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnHyperlink"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND | wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticLine" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticline2</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxLI_HORIZONTAL</property>
+                                <property name="subclass">; ; forward_declare</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnAux1DClick"></event>
+                                <event name="OnAux1Down"></event>
+                                <event name="OnAux1Up"></event>
+                                <event name="OnAux2DClick"></event>
+                                <event name="OnAux2Down"></event>
+                                <event name="OnAux2Up"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnCharHook"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxFlexGridSizer" expanded="1">
+                                <property name="cols">3</property>
+                                <property name="flexible_direction">wxBOTH</property>
+                                <property name="growablecols">1</property>
+                                <property name="growablerows"></property>
+                                <property name="hgap">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">fgSizer1</property>
+                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                <property name="permission">none</property>
+                                <property name="rows">1</property>
+                                <property name="vgap">0</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxButton" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="bitmap"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="current"></property>
+                                        <property name="default">0</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="disabled"></property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="focus"></property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">View Report...</property>
+                                        <property name="margins"></property>
+                                        <property name="markup">0</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_btnViewReport</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="position"></property>
+                                        <property name="pressed"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass">; ; forward_declare</property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnAux1DClick"></event>
+                                        <event name="OnAux1Down"></event>
+                                        <event name="OnAux1Up"></event>
+                                        <event name="OnAux2DClick"></event>
+                                        <event name="OnAux2Down"></event>
+                                        <event name="OnAux2Up"></event>
+                                        <event name="OnButtonClick">OnViewReport</event>
+                                        <event name="OnChar"></event>
+                                        <event name="OnCharHook"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxALIGN_RIGHT</property>
+                                    <property name="proportion">1</property>
+                                    <object class="wxButton" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="bitmap"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="current"></property>
+                                        <property name="default">0</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="disabled"></property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="focus"></property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">Send Crash Report</property>
+                                        <property name="margins"></property>
+                                        <property name="markup">0</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_btnSendReport</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="position"></property>
+                                        <property name="pressed"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass">; ; forward_declare</property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnAux1DClick"></event>
+                                        <event name="OnAux1Down"></event>
+                                        <event name="OnAux1Up"></event>
+                                        <event name="OnAux2DClick"></event>
+                                        <event name="OnAux2Down"></event>
+                                        <event name="OnAux2Up"></event>
+                                        <event name="OnButtonClick">OnSendReport</event>
+                                        <event name="OnChar"></event>
+                                        <event name="OnCharHook"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxButton" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="bitmap"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="current"></property>
+                                        <property name="default">0</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="disabled"></property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="focus"></property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">Exit Kicad</property>
+                                        <property name="margins"></property>
+                                        <property name="markup">0</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_btnExit</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="position"></property>
+                                        <property name="pressed"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass">; ; forward_declare</property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnAux1DClick"></event>
+                                        <event name="OnAux1Down"></event>
+                                        <event name="OnAux1Up"></event>
+                                        <event name="OnAux2DClick"></event>
+                                        <event name="OnAux2Down"></event>
+                                        <event name="OnAux2Up"></event>
+                                        <event name="OnButtonClick">OnExitKicad</event>
+                                        <event name="OnChar"></event>
+                                        <event name="OnCharHook"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/common/dialogs/dialog_crash_report_base.h b/common/dialogs/dialog_crash_report_base.h
new file mode 100644
index 000000000..31e009002
--- /dev/null
+++ b/common/dialogs/dialog_crash_report_base.h
@@ -0,0 +1,65 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 17 2018)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOG_CRASH_REPORT_BASE_H__
+#define __DIALOG_CRASH_REPORT_BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include "dialog_shim.h"
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/statline.h>
+#include <wx/textctrl.h>
+#include <wx/hyperlink.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_CRASH_REPORT_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_CRASH_REPORT_BASE : public DIALOG_SHIM
+{
+	private:
+	
+	protected:
+		wxStaticText* m_staticText1;
+		wxStaticLine* m_staticline1;
+		wxStaticText* m_staticText2;
+		wxTextCtrl* m_additionalInfo;
+		wxStaticText* m_staticText211;
+		wxHyperlinkCtrl* m_hyperlink2;
+		wxStaticLine* m_staticline2;
+		wxButton* m_btnViewReport;
+		wxButton* m_btnSendReport;
+		wxButton* m_btnExit;
+		
+		// Virtual event handlers, overide them in your derived class
+		virtual void OnViewReport( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnSendReport( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnExitKicad( wxCommandEvent& event ) { event.Skip(); }
+		
+	
+	public:
+		
+		DIALOG_CRASH_REPORT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Kicad Crash Reporter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 730,649 ), long style = wxDEFAULT_DIALOG_STYLE ); 
+		~DIALOG_CRASH_REPORT_BASE();
+	
+};
+
+#endif //__DIALOG_CRASH_REPORT_BASE_H__
diff --git a/common/dialogs/dialog_crash_report_preview_base.cpp b/common/dialogs/dialog_crash_report_preview_base.cpp
new file mode 100644
index 000000000..f8604785a
--- /dev/null
+++ b/common/dialogs/dialog_crash_report_preview_base.cpp
@@ -0,0 +1,38 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 17 2018)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_crash_report_preview_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DIALOG_CRASH_REPORT_PREVIEW_BASE::DIALOG_CRASH_REPORT_PREVIEW_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+	this->SetSizeHints( wxSize( 800,600 ), wxDefaultSize );
+	
+	wxBoxSizer* bSizer2;
+	bSizer2 = new wxBoxSizer( wxVERTICAL );
+	
+	m_text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
+	bSizer2->Add( m_text, 1, wxEXPAND|wxALL, 5 );
+	
+	m_sdbSizer1 = new wxStdDialogButtonSizer();
+	m_sdbSizer1OK = new wxButton( this, wxID_OK );
+	m_sdbSizer1->AddButton( m_sdbSizer1OK );
+	m_sdbSizer1->Realize();
+	
+	bSizer2->Add( m_sdbSizer1, 0, wxALIGN_RIGHT|wxALL|wxEXPAND, 5 );
+	
+	
+	this->SetSizer( bSizer2 );
+	this->Layout();
+	
+	this->Centre( wxBOTH );
+}
+
+DIALOG_CRASH_REPORT_PREVIEW_BASE::~DIALOG_CRASH_REPORT_PREVIEW_BASE()
+{
+}
diff --git a/common/dialogs/dialog_crash_report_preview_base.fbp b/common/dialogs/dialog_crash_report_preview_base.fbp
new file mode 100644
index 000000000..cee45b101
--- /dev/null
+++ b/common/dialogs/dialog_crash_report_preview_base.fbp
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="14" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dialog_crash_report_preview_base</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="indent_with_spaces"></property>
+        <property name="internationalize">0</property>
+        <property name="name">dialog_crash_report_preview_base</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">800,600</property>
+            <property name="name">DIALOG_CRASH_REPORT_PREVIEW_BASE</property>
+            <property name="pos"></property>
+            <property name="size">800,658</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
+            <property name="title">Kicad Crash Report Preview</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiPaneActivated"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnAux1DClick"></event>
+            <event name="OnAux1Down"></event>
+            <event name="OnAux1Up"></event>
+            <event name="OnAux2DClick"></event>
+            <event name="OnAux2Down"></event>
+            <event name="OnAux2Up"></event>
+            <event name="OnChar"></event>
+            <event name="OnCharHook"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMaximize"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnMove"></event>
+            <event name="OnMoveEnd"></event>
+            <event name="OnMoveStart"></event>
+            <event name="OnMoving"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnShow"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer2</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxTextCtrl" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="maxlength"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_text</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY</property>
+                        <property name="subclass">; ; forward_declare</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnAux1DClick"></event>
+                        <event name="OnAux1Down"></event>
+                        <event name="OnAux1Up"></event>
+                        <event name="OnAux2DClick"></event>
+                        <event name="OnAux2Down"></event>
+                        <event name="OnAux2Up"></event>
+                        <event name="OnChar"></event>
+                        <event name="OnCharHook"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnText"></event>
+                        <event name="OnTextEnter"></event>
+                        <event name="OnTextMaxLen"></event>
+                        <event name="OnTextURL"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_RIGHT|wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStdDialogButtonSizer" expanded="1">
+                        <property name="Apply">0</property>
+                        <property name="Cancel">0</property>
+                        <property name="ContextHelp">0</property>
+                        <property name="Help">0</property>
+                        <property name="No">0</property>
+                        <property name="OK">1</property>
+                        <property name="Save">0</property>
+                        <property name="Yes">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_sdbSizer1</property>
+                        <property name="permission">protected</property>
+                        <event name="OnApplyButtonClick"></event>
+                        <event name="OnCancelButtonClick"></event>
+                        <event name="OnContextHelpButtonClick"></event>
+                        <event name="OnHelpButtonClick"></event>
+                        <event name="OnNoButtonClick"></event>
+                        <event name="OnOKButtonClick"></event>
+                        <event name="OnSaveButtonClick"></event>
+                        <event name="OnYesButtonClick"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/common/dialogs/dialog_crash_report_preview_base.h b/common/dialogs/dialog_crash_report_preview_base.h
new file mode 100644
index 000000000..73a54ae32
--- /dev/null
+++ b/common/dialogs/dialog_crash_report_preview_base.h
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 17 2018)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOG_CRASH_REPORT_PREVIEW_BASE_H__
+#define __DIALOG_CRASH_REPORT_PREVIEW_BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include "dialog_shim.h"
+#include <wx/string.h>
+#include <wx/textctrl.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_CRASH_REPORT_PREVIEW_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_CRASH_REPORT_PREVIEW_BASE : public DIALOG_SHIM
+{
+	private:
+	
+	protected:
+		wxTextCtrl* m_text;
+		wxStdDialogButtonSizer* m_sdbSizer1;
+		wxButton* m_sdbSizer1OK;
+	
+	public:
+		
+		DIALOG_CRASH_REPORT_PREVIEW_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Kicad Crash Report Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,658 ), long style = wxDEFAULT_DIALOG_STYLE ); 
+		~DIALOG_CRASH_REPORT_PREVIEW_BASE();
+	
+};
+
+#endif //__DIALOG_CRASH_REPORT_PREVIEW_BASE_H__
diff --git a/include/debug_report.h b/include/debug_report.h
index 0d0e29fb8..46849af1c 100644
--- a/include/debug_report.h
+++ b/include/debug_report.h
@@ -49,12 +49,23 @@ public:
      */
     static void GenerateReport( Context ctx );
 
+    void buildVersionInfo( wxString& aMsg );
+    void buildModulesInfo( wxString& aMsg );
+    void buildExceptionContextInfo ( wxString& aMsg );
+
     bool AddTimestamp();
 
+    const wxString& GetReportText() const
+    {
+        return m_reportText;
+    }
+
 #if !wxCHECK_VERSION( 3, 1, 2 ) && wxUSE_STACKWALKER
     // in case of wx <= 3.1.1 important stack information were not saved
     virtual bool AddContext( Context ctx ) override;
 #endif
+private:
+    wxString m_reportText;
 };
 
 #endif
\ No newline at end of file
-- 
2.17.1

>From be0cebaaac9d307141a8cfd6ffb2a51871ff02e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 1 Nov 2018 11:26:17 +0100
Subject: [PATCH 06/11] CONTEXT_MENU: fix crash when running with
 non-functional KiWay (i.e. in tests)

---
 common/tool/context_menu.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp
index 89f55d5af..cb229c9e7 100644
--- a/common/tool/context_menu.cpp
+++ b/common/tool/context_menu.cpp
@@ -65,6 +65,12 @@ static void set_wxMenuIcon( wxMenuItem* aMenu, const BITMAP_OPAQUE* aIcon )
 
     // Retrieve the global applicaton show icon option:
     bool useImagesInMenus;
+
+    auto settings = Pgm().CommonSettings();
+
+    if( !settings )
+        return;
+
     Pgm().CommonSettings()->Read( USE_ICONS_IN_MENUS_KEY, &useImagesInMenus );
 
     if( aIcon && useImagesInMenus )
-- 
2.17.1

>From 1024551434d53f42a20be43232d6b09b5f7aab0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 1 Nov 2018 11:52:26 +0100
Subject: [PATCH 07/11] Removed DEBUG_REPORT dependency on wxDebugReport

---
 common/debug_report.cpp |  8 ++++----
 include/debug_report.h  | 10 ++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/common/debug_report.cpp b/common/debug_report.cpp
index f2d349fca..c3effde6b 100644
--- a/common/debug_report.cpp
+++ b/common/debug_report.cpp
@@ -151,12 +151,12 @@ static const wxString formatHex( uint64_t addr )
     return wxString( tmp );
 }
 
-void DEBUG_REPORT::GenerateReport( Context ctx )
+void DEBUG_REPORT::GenerateReport( wxDebugReport::Context ctx )
 {
     DEBUG_REPORT report;
 
     // Add all wx default reports
-    report.AddAll( ctx );
+    report.AddContext( ctx );
 
     DIALOG_CRASH_REPORT crashDialog( &report );
 
@@ -465,7 +465,7 @@ void DEBUG_REPORT::buildExceptionContextInfo ( wxString& aMsg )
 
 
 
-bool DEBUG_REPORT::AddContext( Context ctx )
+bool DEBUG_REPORT::AddContext( wxDebugReport::Context ctx )
 {
     wxString reportText;
 
@@ -484,7 +484,7 @@ bool DEBUG_REPORT::AddContext( Context ctx )
     YAML_STACK_WALKER sw;
 
 #if wxUSE_ON_FATAL_EXCEPTION
-    if( ctx == Context_Exception )
+    if( ctx == wxDebugReport::Context_Exception )
     {
         sw.WalkFromException();
     }
diff --git a/include/debug_report.h b/include/debug_report.h
index 46849af1c..51eceb2fd 100644
--- a/include/debug_report.h
+++ b/include/debug_report.h
@@ -33,7 +33,7 @@
  * saver which gives us useful stack-traces. Furthermore it include
  * additional information which are helpful for debugging a crash.
  */
-class DEBUG_REPORT : public wxDebugReportCompress
+class DEBUG_REPORT
 {
 public:
     DEBUG_REPORT()
@@ -47,7 +47,7 @@ public:
      *
      * @param ctx Context for which the report should be generated
      */
-    static void GenerateReport( Context ctx );
+    static void GenerateReport( wxDebugReport::Context ctx );
 
     void buildVersionInfo( wxString& aMsg );
     void buildModulesInfo( wxString& aMsg );
@@ -60,10 +60,8 @@ public:
         return m_reportText;
     }
 
-#if !wxCHECK_VERSION( 3, 1, 2 ) && wxUSE_STACKWALKER
-    // in case of wx <= 3.1.1 important stack information were not saved
-    virtual bool AddContext( Context ctx ) override;
-#endif
+    bool AddContext( wxDebugReport::Context ctx );
+
 private:
     wxString m_reportText;
 };
-- 
2.17.1

>From b6fc6c96aeb5bfb2f444f29b942c59ce3fb08326 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 22 Nov 2018 21:05:58 +0100
Subject: [PATCH 08/11] Derive DEBUG_REPORT dialogs directly from wxDialog as
 KiWay might be inaccessible after a crash...

---
 common/dialogs/dialog_crash_report_base.cpp         | 2 +-
 common/dialogs/dialog_crash_report_base.fbp         | 2 +-
 common/dialogs/dialog_crash_report_base.h           | 3 +--
 common/dialogs/dialog_crash_report_preview_base.cpp | 2 +-
 common/dialogs/dialog_crash_report_preview_base.fbp | 2 +-
 common/dialogs/dialog_crash_report_preview_base.h   | 3 +--
 6 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/dialogs/dialog_crash_report_base.cpp b/common/dialogs/dialog_crash_report_base.cpp
index ef4ea54f2..e3691858e 100644
--- a/common/dialogs/dialog_crash_report_base.cpp
+++ b/common/dialogs/dialog_crash_report_base.cpp
@@ -9,7 +9,7 @@
 
 ///////////////////////////////////////////////////////////////////////////
 
-DIALOG_CRASH_REPORT_BASE::DIALOG_CRASH_REPORT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+DIALOG_CRASH_REPORT_BASE::DIALOG_CRASH_REPORT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
 	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
 	
diff --git a/common/dialogs/dialog_crash_report_base.fbp b/common/dialogs/dialog_crash_report_base.fbp
index 3a582ca17..8f8e045da 100644
--- a/common/dialogs/dialog_crash_report_base.fbp
+++ b/common/dialogs/dialog_crash_report_base.fbp
@@ -47,7 +47,7 @@
             <property name="pos"></property>
             <property name="size">730,649</property>
             <property name="style">wxDEFAULT_DIALOG_STYLE</property>
-            <property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
+            <property name="subclass">; ; forward_declare</property>
             <property name="title">Kicad Crash Reporter</property>
             <property name="tooltip"></property>
             <property name="window_extra_style"></property>
diff --git a/common/dialogs/dialog_crash_report_base.h b/common/dialogs/dialog_crash_report_base.h
index 31e009002..25c6bde44 100644
--- a/common/dialogs/dialog_crash_report_base.h
+++ b/common/dialogs/dialog_crash_report_base.h
@@ -10,7 +10,6 @@
 
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
-#include "dialog_shim.h"
 #include <wx/string.h>
 #include <wx/stattext.h>
 #include <wx/gdicmn.h>
@@ -33,7 +32,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 /// Class DIALOG_CRASH_REPORT_BASE
 ///////////////////////////////////////////////////////////////////////////////
-class DIALOG_CRASH_REPORT_BASE : public DIALOG_SHIM
+class DIALOG_CRASH_REPORT_BASE : public wxDialog 
 {
 	private:
 	
diff --git a/common/dialogs/dialog_crash_report_preview_base.cpp b/common/dialogs/dialog_crash_report_preview_base.cpp
index f8604785a..5ca88c119 100644
--- a/common/dialogs/dialog_crash_report_preview_base.cpp
+++ b/common/dialogs/dialog_crash_report_preview_base.cpp
@@ -9,7 +9,7 @@
 
 ///////////////////////////////////////////////////////////////////////////
 
-DIALOG_CRASH_REPORT_PREVIEW_BASE::DIALOG_CRASH_REPORT_PREVIEW_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+DIALOG_CRASH_REPORT_PREVIEW_BASE::DIALOG_CRASH_REPORT_PREVIEW_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
 	this->SetSizeHints( wxSize( 800,600 ), wxDefaultSize );
 	
diff --git a/common/dialogs/dialog_crash_report_preview_base.fbp b/common/dialogs/dialog_crash_report_preview_base.fbp
index cee45b101..a7f05cfeb 100644
--- a/common/dialogs/dialog_crash_report_preview_base.fbp
+++ b/common/dialogs/dialog_crash_report_preview_base.fbp
@@ -47,7 +47,7 @@
             <property name="pos"></property>
             <property name="size">800,658</property>
             <property name="style">wxDEFAULT_DIALOG_STYLE</property>
-            <property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
+            <property name="subclass">; ; forward_declare</property>
             <property name="title">Kicad Crash Report Preview</property>
             <property name="tooltip"></property>
             <property name="window_extra_style"></property>
diff --git a/common/dialogs/dialog_crash_report_preview_base.h b/common/dialogs/dialog_crash_report_preview_base.h
index 73a54ae32..ef3fc56ed 100644
--- a/common/dialogs/dialog_crash_report_preview_base.h
+++ b/common/dialogs/dialog_crash_report_preview_base.h
@@ -10,7 +10,6 @@
 
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
-#include "dialog_shim.h"
 #include <wx/string.h>
 #include <wx/textctrl.h>
 #include <wx/gdicmn.h>
@@ -27,7 +26,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 /// Class DIALOG_CRASH_REPORT_PREVIEW_BASE
 ///////////////////////////////////////////////////////////////////////////////
-class DIALOG_CRASH_REPORT_PREVIEW_BASE : public DIALOG_SHIM
+class DIALOG_CRASH_REPORT_PREVIEW_BASE : public wxDialog 
 {
 	private:
 	
-- 
2.17.1

>From 29e9833ada64612d6e751bc3f4b44d48087508a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Thu, 22 Nov 2018 21:06:25 +0100
Subject: [PATCH 09/11] single_top: register global crash handler for Windows
 (unsupported by wx)

---
 common/single_top.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/common/single_top.cpp b/common/single_top.cpp
index 8e2549fab..7b5bfd9d8 100644
--- a/common/single_top.cpp
+++ b/common/single_top.cpp
@@ -126,8 +126,13 @@ struct APP_SINGLE_TOP : public wxApp
 {
     APP_SINGLE_TOP(): wxApp()
     {
-#if wxUSE_ON_FATAL_EXCEPTION && defined( KICAD_CRASH_REPORTER )
+#if defined( KICAD_CRASH_REPORTER )
+
+    #if defined(_WIN32) || defined(_WIN64)
+        InstallWindowsExceptionHandler();
+    #elif defined(wxUSE_ON_FATAL_EXCEPTION)
         wxHandleFatalExceptions();
+    #endif
 #endif
 
         // Disable proxy menu in Unity window manager. Only usual menubar works with wxWidgets (at least <= 3.1)
@@ -282,6 +287,43 @@ struct APP_SINGLE_TOP : public wxApp
 IMPLEMENT_APP( APP_SINGLE_TOP )
 
 
+
+#if defined(_WIN32) || defined(_WIN64)
+
+// implement Windows exception handler, as wx doesn't have one...
+
+#include <windows.h>
+#include <winbase.h>
+
+static ::LONG CALLBACK vectoredExceptionHandler( ::PEXCEPTION_POINTERS ep )
+{
+    switch( ep->ExceptionRecord->ExceptionCode )
+    {
+        case EXCEPTION_ACCESS_VIOLATION:
+        // fixme implement other stuff here
+            break;
+
+        default:
+            return EXCEPTION_CONTINUE_EXECUTION;
+    }
+
+    auto app = wxApp::GetInstance ();
+
+    static_cast<APP_SINGLE_TOP*>(app)->OnFatalException();
+
+    ExitProcess(0);
+
+    return EXCEPTION_CONTINUE_SEARCH;
+}
+
+
+static void InstallWindowsExceptionHandler()
+{
+    ::AddVectoredExceptionHandler( 1, vectoredExceptionHandler );
+}
+
+#endif
+
 bool PGM_SINGLE_TOP::OnPgmInit()
 {
 #if defined(DEBUG)
-- 
2.17.1

>From 5c43a190ae82fa04a2a56bab69ae577d9b3c1f96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Sun, 14 Apr 2019 20:35:52 +0200
Subject: [PATCH 10/11] crash-reporter: clean up the code

---
 common/debug_report.cpp                  | 187 ++++++++++++++---------
 common/dialog_about/AboutDialog_main.cpp |   6 +-
 include/debug_report.h                   |  16 +-
 pcbnew/pcb_edit_frame.cpp                |  12 ++
 4 files changed, 135 insertions(+), 86 deletions(-)

diff --git a/common/debug_report.cpp b/common/debug_report.cpp
index c3effde6b..d6ff08373 100644
--- a/common/debug_report.cpp
+++ b/common/debug_report.cpp
@@ -22,11 +22,12 @@
  */
 
 #include <thread>
+#include <vector>
 
 #include <debug_report.h>
 
-#include <wx/debugrpt.h>
 #include <wx/base64.h>
+#include <wx/debugrpt.h>
 #include <wx/progdlg.h>
 
 #include <dialogs/dialog_crash_report_base.h>
@@ -39,10 +40,16 @@
 
 #include <aboutinfo.h>
 
+#include <boost/version.hpp>
+
 #include <wx/datetime.h>
-#include <wx/ffile.h>
 #include <wx/dynlib.h>
+#include <wx/ffile.h>
 #include <wx/filename.h>
+#include <wx/wx.h>
+
+// where to upload the reports. Currently Orson's machine.
+#define DEBUG_REPORT_URL "https://orson.net.pl/kicad_bug";
 
 extern std::string GetKicadCurlVersion();
 extern std::string GetCurlLibVersion();
@@ -50,8 +57,8 @@ extern std::string GetCurlLibVersion();
 class DIALOG_CRASH_REPORT_PREVIEW : public DIALOG_CRASH_REPORT_PREVIEW_BASE
 {
 public:
-	DIALOG_CRASH_REPORT_PREVIEW( wxWindow* parent, const wxString& aText ) :
-        DIALOG_CRASH_REPORT_PREVIEW_BASE( parent )
+    DIALOG_CRASH_REPORT_PREVIEW( wxWindow* parent, const wxString& aText )
+            : DIALOG_CRASH_REPORT_PREVIEW_BASE( parent )
     {
         m_text->ChangeValue( aText );
     }
@@ -61,59 +68,63 @@ public:
 class DIALOG_CRASH_REPORT : public DIALOG_CRASH_REPORT_BASE
 {
 public:
-    DIALOG_CRASH_REPORT( DEBUG_REPORT* aReport = nullptr ) :
-        DIALOG_CRASH_REPORT_BASE( nullptr )
+    DIALOG_CRASH_REPORT( DEBUG_REPORT* aReport = nullptr ) : DIALOG_CRASH_REPORT_BASE( nullptr )
     {
         m_report = aReport;
     }
 
-	~DIALOG_CRASH_REPORT()
+    ~DIALOG_CRASH_REPORT()
     {
-
     }
 
-    DEBUG_REPORT *GetReport() const{ return m_report ;}
+    DEBUG_REPORT* GetReport() const
+    {
+        return m_report;
+    }
 
     virtual void OnViewReport( wxCommandEvent& event ) override
     {
-        DIALOG_CRASH_REPORT_PREVIEW preview( nullptr, m_report->GetReportText() );
+        m_report->SetAdditionalInfo( m_additionalInfo->GetValue() );
+
+        DIALOG_CRASH_REPORT_PREVIEW preview( this, m_report->GetReportText() );
 
         preview.ShowModal();
     }
 
     virtual void OnSendReport( wxCommandEvent& event ) override
     {
+        m_report->SetAdditionalInfo( m_additionalInfo->GetValue() );
+
         auto rpt = m_report->GetReportText();
         bool ok = true, done = false;
 
-        wxString encoded = wxBase64Encode( (const char*) rpt.c_str(), rpt.length() ); 
+        wxString encoded = wxBase64Encode( (const char*) rpt.c_str(), rpt.length() );
 
-        auto senderThreadFunc = [&]( ) {
+        auto senderThreadFunc = [&]() {
             KICAD_CURL_EASY curl;
-            curl.SetPostData( (const char *) encoded.c_str() );
-            curl.SetURL( "http://pcbe15262:8051"; );
-            
+            curl.SetPostData( (const char*) encoded.c_str() );
+            curl.SetURL( DEBUG_REPORT_URL );
+
             try
             {
-                printf("Uploading...\n");
                 curl.Perform();
-                printf("Done\n");
             }
-            catch ( ... )
+            catch( ... )
             {
                 ok = false;
             }
             done = true;
         };
 
-        std::thread senderThread ( senderThreadFunc );
+        std::thread senderThread( senderThreadFunc );
 
-        wxProgressDialog dlg( _("Sending report..." ), _("The crash report is being uploaded. Please wait..."),
-                            100,    // range
-                            this,   // parent 
-                            wxPD_APP_MODAL |
-                            wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small
-                            );
+        wxProgressDialog dlg(
+                _( "Sending report..." ), 
+                _( "The crash report is being uploaded. Please wait..." ),
+                100,                         // range
+                this,                        // parent
+                wxPD_APP_MODAL | wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small
+        );
 
         while( !done && senderThread.joinable() )
         {
@@ -125,14 +136,15 @@ public:
 
         if( !ok )
         {
-            wxMessageBox( wxT("Error sending cebug report.") );
+            wxMessageBox( wxT( "Error sending cebug report." ) );
             return;
         }
-        m_btnSendReport->SetLabel( _("Report sent") );
+
+        m_btnSendReport->SetLabel( _( "Report sent" ) );
         m_btnSendReport->Enable( false );
     }
 
-	virtual void OnExitKicad( wxCommandEvent& event ) override
+    virtual void OnExitKicad( wxCommandEvent& event ) override
     {
         auto app = wxApp::GetInstance();
         EndModal( false );
@@ -147,7 +159,8 @@ private:
 static const wxString formatHex( uint64_t addr )
 {
     char tmp[1024];
-    snprintf(tmp, 1024, "%p", (size_t) addr);
+
+    snprintf( tmp, 1024, "%p", (void*) addr );
     return wxString( tmp );
 }
 
@@ -160,15 +173,14 @@ void DEBUG_REPORT::GenerateReport( wxDebugReport::Context ctx )
 
     DIALOG_CRASH_REPORT crashDialog( &report );
 
-    //crashDialog.SetVisible( true );
-    crashDialog.ShowModal( );
+    crashDialog.ShowModal();
 }
 
 #if !wxCHECK_VERSION( 3, 1, 2 ) && wxUSE_STACKWALKER
 class YAML_STACK_WALKER : public wxStackWalker
 {
 public:
-    YAML_STACK_WALKER( )
+    YAML_STACK_WALKER()
     {
         m_isOk = false;
         m_msg << "stack-trace:\n";
@@ -187,8 +199,8 @@ public:
 protected:
     virtual void OnStackFrame( const wxStackFrame& frame ) override;
 
-    bool       m_isOk;
-    wxString   m_msg;
+    bool     m_isOk;
+    wxString m_msg;
 };
 
 // ============================================================================
@@ -205,20 +217,24 @@ void YAML_STACK_WALKER::OnStackFrame( const wxStackFrame& frame )
 
     auto func = frame.GetName();
 
-    m_msg << indent4 << "- frame " <<  frame.GetLevel() << ": " << eol;
+    m_msg << indent4 << "- frame " << frame.GetLevel() << ": " << eol;
+
     if( !func.empty() )
     {
         m_msg << indent4 << indent4 << "function: " << func << eol;
     }
 
-    m_msg << indent4 << indent4 << "offset:  " << formatHex(frame.GetOffset()) << eol;
-    m_msg << indent4 << indent4 << "address: " << formatHex(wxPtrToUInt( frame.GetAddress() )) << eol;
+    m_msg << indent4 << indent4 << "offset:  " << formatHex( frame.GetOffset() ) << eol;
+    m_msg << indent4 << indent4 << "address: " << formatHex( wxPtrToUInt( frame.GetAddress() ) )
+          << eol;
 }
 #endif
 
-void DEBUG_REPORT::buildVersionInfo(wxString& aMsg)
+
+void DEBUG_REPORT::buildVersionInfo( wxString& aMsg )
 {
     ABOUT_APP_INFO info;
+
     info.Build( nullptr );
 
     // DO NOT translate information in the msg_version string
@@ -226,8 +242,8 @@ void DEBUG_REPORT::buildVersionInfo(wxString& aMsg)
     wxString eol = "\n";
     wxString indent4 = "    ";
 
-    #define ON "ON" << eol
-    #define OFF "OFF" << eol
+#define ON "ON" << eol
+#define OFF "OFF" << eol
 
     wxPlatformInfo platform;
     aMsg << "application: " << info.GetAppName() << eol;
@@ -260,14 +276,13 @@ void DEBUG_REPORT::buildVersionInfo(wxString& aMsg)
 
     major = wxPlatformInfo().Get().GetToolkitMajorVersion();
     minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
-    aMsg << " GTK+ " <<  major << "." << minor;
+    aMsg << " GTK+ " << major << "." << minor;
 #endif
 
     aMsg << eol;
 
     aMsg << indent4 << "boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." )
-                      << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
-                      << ( BOOST_VERSION % 100 ) << eol;
+         << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 ) << eol;
 
 #ifdef KICAD_USE_OCC
     aMsg << indent4 << "opencascade-technology: " << OCC_VERSION_COMPLETE << eol;
@@ -282,19 +297,19 @@ void DEBUG_REPORT::buildVersionInfo(wxString& aMsg)
 #endif
 
     aMsg << indent4 << "compiler: ";
-#if defined(__clang__)
+#if defined( __clang__ )
     aMsg << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__;
-#elif defined(__GNUG__)
+#elif defined( __GNUG__ )
     aMsg << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__;
-#elif defined(_MSC_VER)
+#elif defined( _MSC_VER )
     aMsg << "Visual C++ " << _MSC_VER;
-#elif defined(__INTEL_COMPILER)
+#elif defined( __INTEL_COMPILER )
     aMsg << "Intel C++ " << __INTEL_COMPILER;
 #else
     aMsg << "Other Compiler ";
 #endif
 
-#if defined(__GXX_ABI_VERSION)
+#if defined( __GXX_ABI_VERSION )
     aMsg << " with C++ ABI " << __GXX_ABI_VERSION << eol;
 #else
     aMsg << " without C++ ABI";
@@ -382,15 +397,19 @@ void DEBUG_REPORT::buildVersionInfo(wxString& aMsg)
     aMsg << OFF;
 #endif
 
+#undef ON
+#undef OFF
+
     aMsg << eol;
 }
 
+
 void DEBUG_REPORT::buildModulesInfo( wxString& aMsg )
 {
-    wxDynamicLibraryDetailsArray modules(wxDynamicLibrary::ListLoaded());
-    const size_t count = modules.GetCount();
+    wxDynamicLibraryDetailsArray modules( wxDynamicLibrary::ListLoaded() );
+    const size_t                 count = modules.GetCount();
 
-    if ( !count )
+    if( !count )
         return;
 
     wxString eol = "\n";
@@ -398,25 +417,26 @@ void DEBUG_REPORT::buildModulesInfo( wxString& aMsg )
 
     aMsg << "modules:" << eol;
 
-    for ( size_t n = 0; n < count; n++ )
+    for( size_t n = 0; n < count; n++ )
     {
         const wxDynamicLibraryDetails& info = modules[n];
-        void *addr = NULL;
-        size_t len = 0;
+        void*                          addr = NULL;
+        size_t                         len = 0;
 
         wxString path = info.GetPath();
-        if ( path.empty() )
+        if( path.empty() )
             path = info.GetName();
 
         aMsg << indent4 << "- " << path << ": " << eol;
-        if ( info.GetAddress(&addr, &len) )
+        if( info.GetAddress( &addr, &len ) )
         {
             aMsg << indent4 << indent4 << "base:    " << formatHex( (uint64_t) addr ) << eol;
             aMsg << indent4 << indent4 << "size:    " << formatHex( (uint64_t) len ) << eol;
         }
 
         wxString ver = info.GetVersion();
-        if ( !ver.empty() )
+
+        if( !ver.empty() )
         {
             aMsg << indent4 << indent4 << "version: " << ver << eol;
         }
@@ -424,12 +444,13 @@ void DEBUG_REPORT::buildModulesInfo( wxString& aMsg )
     aMsg << eol;
 }
 
-void DEBUG_REPORT::buildExceptionContextInfo ( wxString& aMsg )
+
+void DEBUG_REPORT::buildExceptionContextInfo( wxString& aMsg )
 {
 #if wxUSE_CRASHREPORT
-    //printf("BuildExceptInfo\n");
     wxCrashContext c;
-    if ( !c.code )
+
+    if( !c.code )
         return;
 
     wxString eol = "\n";
@@ -437,9 +458,10 @@ void DEBUG_REPORT::buildExceptionContextInfo ( wxString& aMsg )
 
     aMsg << "exception-context:" << eol;
 
-    aMsg << indent4 << "code:     " << formatHex(c.code) << eol; 
-    aMsg << indent4 << "name:     " << c.GetExceptionString() << eol; 
-    aMsg << indent4 << "address:  " << formatHex(c.addr) << eol; -
+    aMsg << indent4 << "code:     " << formatHex( c.code ) << eol;
+    aMsg << indent4 << "name:     " << c.GetExceptionString() << eol;
+    aMsg << indent4 << "address:  " << formatHex( c.addr ) << eol;
+    -
 
 #ifdef __INTEL__
     aMsg << indent4 << "x86-registers:  " << eol;
@@ -464,14 +486,13 @@ void DEBUG_REPORT::buildExceptionContextInfo ( wxString& aMsg )
 }
 
 
-
 bool DEBUG_REPORT::AddContext( wxDebugReport::Context ctx )
 {
     wxString reportText;
 
-    reportText += wxString::Format("KiCad crash report, version 1.0\n");
-    reportText += wxT("--------------------------------------------------\n\n");
-    
+    reportText += wxString::Format( "KiCad crash report, version 1.0\n" );
+    reportText += wxT( "--------------------------------------------------\n\n" );
+
     wxString verInfo;
     wxString modInfo;
     wxString exceptInfo;
@@ -479,11 +500,16 @@ bool DEBUG_REPORT::AddContext( wxDebugReport::Context ctx )
     buildVersionInfo( verInfo );
     buildModulesInfo( modInfo );
     buildExceptionContextInfo( exceptInfo );
-    
+
+    reportText += verInfo;
+    reportText += modInfo;
+    reportText += exceptInfo;
+
 #if wxUSE_STACKWALKER
     YAML_STACK_WALKER sw;
 
 #if wxUSE_ON_FATAL_EXCEPTION
+
     if( ctx == wxDebugReport::Context_Exception )
     {
         sw.WalkFromException();
@@ -494,19 +520,32 @@ bool DEBUG_REPORT::AddContext( wxDebugReport::Context ctx )
         sw.Walk();
     }
 
-    reportText += verInfo;
-    reportText += modInfo;
-    reportText += exceptInfo;
-
     if( sw.IsOk() )
     {
         reportText += sw.GetMessage();
     }
 
-    //printf("%s", (const char *) reportText.c_str() );
+#endif
 
     m_reportText = reportText;
 
     return true;
 }
-#endif // !wxCHECK_VERSION(3, 1, 2) && wxUSE_STACKWALKER
\ No newline at end of file
+
+
+void DEBUG_REPORT::SetAdditionalInfo( const wxString& aInfo )
+{
+    m_additionalInfo = aInfo;
+}
+
+const wxString DEBUG_REPORT::GetReportText() const
+{
+    auto reportText = m_reportText;
+
+    reportText += wxT( "\n" );
+    reportText += wxT( "Additional information from the user:\n" );
+    reportText += m_additionalInfo;
+    reportText += wxT( "\n" );
+
+    return reportText;
+}
diff --git a/common/dialog_about/AboutDialog_main.cpp b/common/dialog_about/AboutDialog_main.cpp
index b12e643d4..b69352668 100644
--- a/common/dialog_about/AboutDialog_main.cpp
+++ b/common/dialog_about/AboutDialog_main.cpp
@@ -373,12 +373,12 @@ void ABOUT_APP_INFO::Build( EDA_BASE_FRAME* aParent )
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Bulgarian (BG)",
-                                          aInfo.CreateKiBitmap( lang_bg_xpm ) ) );
-    aInfo.AddTranslator( new CONTRIBUTOR( "Liu Guang",
+                                          CreateKiBitmap( lang_bg_xpm ) ) );
+    AddTranslator( new CONTRIBUTOR( "Liu Guang",
                                           wxEmptyString,
                                           wxEmptyString,
                                           "Simplified Chinese (zh_CN)",
-                                          aInfo.CreateKiBitmap( lang_zh_xpm ) ) );
+                                          CreateKiBitmap( lang_zh_xpm ) ) );
 
     // Maintainer who helper in translations, but not in a specific translation
     #define OTHERS_IN_TRANSLATION _( "Others" )
diff --git a/include/debug_report.h b/include/debug_report.h
index 51eceb2fd..66a833a71 100644
--- a/include/debug_report.h
+++ b/include/debug_report.h
@@ -49,21 +49,19 @@ public:
      */
     static void GenerateReport( wxDebugReport::Context ctx );
 
-    void buildVersionInfo( wxString& aMsg );
-    void buildModulesInfo( wxString& aMsg );
-    void buildExceptionContextInfo ( wxString& aMsg );
+    void SetAdditionalInfo( const wxString& aInfo );
 
-    bool AddTimestamp();
-
-    const wxString& GetReportText() const
-    {
-        return m_reportText;
-    }
+    const wxString GetReportText() const;
 
     bool AddContext( wxDebugReport::Context ctx );
 
 private:
+    void buildVersionInfo( wxString& aMsg );
+    void buildModulesInfo( wxString& aMsg );
+    void buildExceptionContextInfo( wxString& aMsg );
+
     wxString m_reportText;
+    wxString m_additionalInfo;
 };
 
 #endif
\ No newline at end of file
diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index b420abcad..839ec82b5 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -1477,3 +1477,15 @@ void PCB_EDIT_FRAME::OnExportHyperlynx( wxCommandEvent& event )
 
     ExportBoardToHyperlynx( GetBoard(), fn );
 }
+
+
+void PCB_EDIT_FRAME::OnSimulateCrash( wxCommandEvent& event )
+{
+    bool crash = IsOK( this, _("Clicking on OK will crash KiCad. Did you save?" ) );
+
+    if(!crash)
+        return;
+
+    * (volatile int *) 0xdeafbeef = 0xcafebabe;
+}
+
-- 
2.17.1

>From 011eee2a2c6397f26e22d33e653ec5819d6923bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Wed, 10 Apr 2019 02:33:30 +0200
Subject: [PATCH 11/11] crash-reporter: add option to simulate a crash in
 pcbnew

---
 pcbnew/menubar_pcb_editor.cpp | 7 +++++++
 pcbnew/pcb_edit_frame.cpp     | 1 +
 pcbnew/pcb_edit_frame.h       | 1 +
 pcbnew/pcbnew_id.h            | 1 +
 4 files changed, 10 insertions(+)

diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp
index 48410ee66..4c1b7e561 100644
--- a/pcbnew/menubar_pcb_editor.cpp
+++ b/pcbnew/menubar_pcb_editor.cpp
@@ -434,6 +434,13 @@ void prepareHelpMenu( wxMenu* aParentMenu )
                  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
                  KiBitmap( help_xpm ) );
 
+#ifdef KICAD_CRASH_REPORTER
+    AddMenuItem( aParentMenu, ID_PCB_SIMULATE_CRASH,
+                 _( "Force KiCad crash" ),
+                 _( "Will crash KiCad. For testing of the Debug Report feature." ),
+                 KiBitmap( help_xpm ) );
+#endif
+
     wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_Board_Editor_Hotkeys_Descr, HK_HELP );
     AddMenuItem( aParentMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
                  text,
diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index 839ec82b5..4229fd276 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -135,6 +135,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
     EVT_MENU( ID_GEN_EXPORT_FILE_IDF3, PCB_EDIT_FRAME::OnExportIDF3 )
     EVT_MENU( ID_GEN_EXPORT_FILE_STEP, PCB_EDIT_FRAME::OnExportSTEP )
     EVT_MENU( ID_GEN_EXPORT_FILE_HYPERLYNX, PCB_EDIT_FRAME::OnExportHyperlynx )
+    EVT_MENU( ID_PCB_SIMULATE_CRASH, PCB_EDIT_FRAME::OnSimulateCrash )
 
     EVT_MENU( ID_GEN_IMPORT_SPECCTRA_SESSION,PCB_EDIT_FRAME::ImportSpecctraSession )
     EVT_MENU( ID_GEN_IMPORT_SPECCTRA_DESIGN, PCB_EDIT_FRAME::ImportSpecctraDesign )
diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h
index 3c3ba9db4..162587dd7 100644
--- a/pcbnew/pcb_edit_frame.h
+++ b/pcbnew/pcb_edit_frame.h
@@ -300,6 +300,7 @@ public:
     void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
 
     void OnQuit( wxCommandEvent& event );
+    void OnSimulateCrash( wxCommandEvent& event );
 
     /**
      * Reload the Python plugins if they are newer than
diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h
index ec043de10..c61ca3efe 100644
--- a/pcbnew/pcbnew_id.h
+++ b/pcbnew/pcbnew_id.h
@@ -23,6 +23,7 @@ enum pcbnew_ids
     ID_SET_RELATIVE_OFFSET,
     ID_COPY_BOARD_AS,
     ID_IMPORT_NON_KICAD_BOARD,
+    ID_PCB_SIMULATE_CRASH,
 
     // Right vertical tool bar command IDs.
     ID_PCB_HIGHLIGHT_BUTT,
-- 
2.17.1


Follow ups