DSN Export fails pcbnew.exe crash

Bug #896690 reported by dweith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Expired
Undecided
Unassigned

Bug Description

Attempts to export Spectra DSN fails with pcbnew.exe crash.

Application: Pcbnew
Version: (2011-11-25 BZR 3247)-testing
Build: wxWidgets 2.9.2 (wchar_t,compiler with C++ ABI 1002,GCC 4.6.1,wx containers,compatible with 2.8)
Platform: Windows XP (build 2600, Service Pack 3), 64-bit edition, 64 bit, Little endian, wxMSW
Options: USE_PNG_BITMAPS=ON
         KICAD_GOST=OFF
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         USE_BOOST_POLYGON_LIBRARY

------------------------------------------------------------
Pop-up dialog verbage:

Microsoft Visual C++ Runtime Library

This application has requested the runtime to terminate in an unusual way.
Please contact the appliation's support team for more information.
----------------------------------------------------------------

Compile command Line: cmake -P KiCadWinbuilder.cmake

KiCadWinbuilder.make:
#
# KiCad easy-build script for Microsoft Windows XP, Vista, 7 x32 + x64
#
# Dependencies:
#
# - Bazaar
# Bazaar version control system must be installed, and the binaries must be
# available in the windows path. It is recommended to get the standalone
# installation.
#
# See: http://wiki.bazaar.canonical.com/WindowsDownloads
#
# - Cmake
# Cmake must be installed, and the binaries must be available in the system
# path
#
# See: http://www.cmake.org/cmake/resources/software.html
#
#
# Usage:
#
# Build KiCad by running the command line: cmake -P KiCadWinbuilder.cmake
#
#
# Licence:
#
# Copyright (C) 2011 Brian Sidebotham
#
# 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
#
#
# Description:
#
# Apart from the above dependencies which are required to be installed prior to
# running this script, all other dependencies for building KiCad are downloaded
# and installed by this script. This includes the GCC compiler suite, wxWidgets
# and the KiCad source code.
#
#
#-------------------------------------------------------------------------------
#
# Version history:
#
# 11.08.11 - BJS
# * Added pcb_calculator.exe to the executable list to be copied to the
# bin directory. Fixes bug #823159
#
# 0.6 04.08.11 - BJS
# * Pumped wxWidgets to 2.9.2 - no need to patch for localisation bug
# * Changed cmake requirement from 2.6.4 to 2.8.2 due to requiring bz2
# support in CPack
# * Default optimisation level set to -O2
# * Upon successful build, binaries and MinGW dependancies are copied to
# the /bin directory so that they can be run in-place without having to
# be installed
#
# 0.5 01.08.11 - BJS
# * Fixed broken MinGW installer download link. Hopefully they will move
# to a stable version soon
# * Added a newline to the "Configuring KiCad ..." messages as bzr doesn't
# insert a newline after a checkout, and it uses \r to keep progress on
# the current line
# * Fixed spelling mistake in mingw stderr log file
# * Added an error message if the script fails to build KiCad instead of
# silently finishing without building
# * Fixed if/endif mismatch in wxWidget build block
#
# 0.4 01.07.11 - BJS
# * Simplified the way Bazaar is used and instead of branching lp:kicad
# only checkout lp:kicad and then update.
# * This script must be run without the source code being already branched
# otherwise the update will always pass as the source is a branch and
# not a checkout of the remote head
#
# 28.06.11 - BJS
# * Fixed bug in wxWidgets build check. Should be ${nnn} instead of nnn
# * Command line settings do not appear to propogate, so build is Release
# by default, but can still be selected as Debug by changing the setting
# in the script
# * Added tree revert before merging as an option. This is the default
# behaviour and now merging is an option as the target audience for this
# script should really use it with vanilla sources. Changes to the
# source should be at developer level who should be able to put together
# a development environment, or at least be able to use bazaar manually
# * Fixed variable expansion bugs in Bazaar merging logic
# * Got rid of needless debug message
#
# 23.06.11 - BJS
# * Fixed bug when updating source code - bzr stdout redirected to
# variable, but bzr also asks for credentials sometimes; hence stdout
# should not be redirected
# * Added check for bzr credentials with "bzr whoami". This needs to be
# done on a fresh bzr install
# * Fixed a bug in the bzr update logic. It is essential to merge AND
# commit, otherwise the second merge will fail with an uncommitted
# changes error from bzr
# * Fixed the error checking for wxWidgets source code
# * Compile only release or debug version of wxWidgets depending on which
# version of KiCad is being targetted
#
# 0.3 15.06.11 - BJS
# * Fixed bug with updating source code - from bzr up to bzr merge
# * Added several failure points, along with useful messages to inform the
# user of why the script (or external) failed
# * Moved wx source code to the src directory!
#
# 0.2 13.06.11 - BJS
# * Added variables for all directories
#
# 08.06.11 - BJS
# * Correctly detect previously installed gcc compiler
# * Simplified wxWidgets installation check by removing the check for a
# system install. Instead, only the KiCad install is supported
# * Added revision number printing so that it is easy to tell what
# revision is being built
# * Fixed configuring KiCad, no longer configures the project if it is not
# needed
#
# 0.1
# 03.06.11 - BJS
# * Tidied up the script, added more useful comments
# * First complete script capable of building KiCad
#

# Minimum cmake version required for this script
cmake_minimum_required(VERSION 2.8.2)

# Set a bin directory to populate on successful build
set( BINDIR "${CMAKE_SOURCE_DIR}/bin" )

# Setup variables for a list of directories
set( LOGDIR "${CMAKE_SOURCE_DIR}/logs" )

# Set a build directory will have release/debug subdirs
set( BUILDDIR "${CMAKE_SOURCE_DIR}/build" )

# The sourcecode directory
set( SRCDIR "${CMAKE_SOURCE_DIR}/src" )

# Setup the version of wxWidgets to use
set( WXVER 2.9.2 )

# The wxWidgets root source code directory. This is where the source archive
# will be placed
set( WXSRCROOT "${SRCDIR}/wx" )

# Thw wxWidgets source code directory
set( WXSRC "${WXSRCROOT}/wxWidgets-${WXVER}" )

# Set the build type.
# Valid settings are: "Release" or "Debug"
set( BUILD "Release" )

# Set the option for what happens when there are uncommitted changes in the
# source tree when merging head
# Valid settings are: "Revert" or "Commit"
set( PREOP "Revert" )

# Create a directory to place log files in
if( NOT EXISTS ${LOGDIR} )
    file( MAKE_DIRECTORY ${LOGDIR} )
endif( NOT EXISTS ${LOGDIR} )

# Create a directory to place log files in
if( NOT EXISTS ${BINDIR} )
    file( MAKE_DIRECTORY ${BINDIR} )
endif( NOT EXISTS ${BINDIR} )

set( OLD_PATH $ENV{PATH} )
set( MINGW_MAKE mingw32-make )
set( STRIP strip )
set( GCC gcc )

message( STATUS "Build type: ${BUILD}")

#-------------------------------------------------------------------------------
#
# Check Bazaar installation
#
message( STATUS "Checking for installed Bazaar" )
execute_process(
    COMMAND bzr
    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
    OUTPUT_VARIABLE bzr_stdout
    RESULT_VARIABLE bzr_NOT_FOUND )

#
# Error when bazaar is not available
#
if( bzr_NOT_FOUND )

    message( ERROR "Bazaar must be installed and in the windows path" )
    message( ERROR "See: http://wiki.bazaar.canonical.com/WindowsDownloads" )
    return()

else( bzr_NOT_FOUND )

    # Test to seee if bzr has been correctly configured yet. If not, we will
    # need to guide the user to set it up
    execute_process(
        COMMAND bzr whoami
        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
        OUTPUT_VARIABLE bzr_stdout
        ERROR_VARIABLE bzr_stderr
        RESULT_VARIABLE bzr_NOT_SETUP )

    # Barf and return if Bazaar has not yet been setup correctly
    if( bzr_NOT_SETUP )

        message( ERROR
            " Bazaar has not yet been setup. You must tell the Bazaar install\n"
            " who you are by supplying an email address. Just following the \n"
            " instructions given by Bazaar below:\n"
            " \n"
            "${bzr_stderr}")
        return()

    endif( bzr_NOT_SETUP )

endif( bzr_NOT_FOUND )

#-------------------------------------------------------------------------------
#
# Check for working compiler
#
message( STATUS "Checking for installed MinGW compiler" )
execute_process(
    COMMAND gcc -dumpversion
    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
    OUTPUT_VARIABLE mingw_stdout
    ERROR_VARIABLE mingw_stderr
    RESULT_VARIABLE mingw_NOT_FOUND )

#-------------------------------------------------------------------------------
#
# Carry on searching if there was no installed MinGW compiler installed
#
if( mingw_NOT_FOUND )

    message( STATUS "Checking for local MinGW compiler")
    execute_process(
        COMMAND mingw/bin/gcc --version
        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
        OUTPUT_VARIABLE mingw_stdout
        ERROR_VARIABLE mingw_stderr
        RESULT_VARIABLE mingw_local_NOT_FOUND )

    set( ENV{PATH} "${CMAKE_SOURCE_DIR}/mingw/bin;${OLD_PATH}" )
    set( MINGW_MAKE "${CMAKE_SOURCE_DIR}/mingw/bin/mingw32-make" )
    set( GCC "${CMAKE_SOURCE_DIR}/mingw/bin/gcc" )

    if( mingw_local_NOT_FOUND )

        message( STATUS "Downloading MinGW Installer...")
        file( MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/mingw" )
        file( DOWNLOAD "http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/mingw-get-0.3-alpha-2/mingw-get-0.3-mingw32-alpha-2-bin.tar.gz/download" "${CMAKE_SOURCE_DIR}/mingw/mingw-get.tar.gz" )

        message( STATUS "Extracting MinGW Installer ..." )
        execute_process(
            COMMAND ${CMAKE_COMMAND} -E tar xfz "${CMAKE_SOURCE_DIR}/mingw/mingw-get.tar.gz"
            WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/mingw"
            RESULT_VARIABLE check )

        message( STATUS "Installing MinGW..." )
        execute_process(
            COMMAND bin/mingw-get install gcc g++ gdb mingw32-make
            OUTPUT_FILE "${LOGDIR}/mingw_install_stdout.log"
            ERROR_FILE "${LOGDIR}/mingw_install_stderr.log"
         WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/mingw"
         RESULT_VARIABLE check )

    endif( mingw_local_NOT_FOUND )

    # Using the local copy of MinGW
    set( using_localMingw true )
    set( GCCDIR "${CMAKE_SOURCE_DIR}/mingw/bin" )

else( mingw_NOT_FOUND )

    message( STATUS "Using installed MinGW compiler, version: ${mingw_stdout}")

endif( mingw_NOT_FOUND )

#-------------------------------------------------------------------------------
#
# Check for installed wxWidgets
#
message( STATUS "Checking for wxWidgets" )

# Try to find wxWidgets and when found set this to true
set( wxWidgets_FOUND false )

if( EXISTS "${WXSRC}/lib/gcc_lib/libwxmsw29u_gl.a" AND
    ${BUILD} STREQUAL "Release" )

    # wxWidgets is found
    set( wxWidgets_FOUND true )

endif( EXISTS "${WXSRC}/lib/gcc_lib/libwxmsw29u_gl.a" AND
    ${BUILD} STREQUAL "Release" )

if( EXISTS "${WXSRC}/lib/gcc_lib/libwxmsw29ud_gl.a" AND
    ${BUILD} STREQUAL "Debug" )

    # wxWidgets is found
    set( wxWidgets_FOUND true )

endif( EXISTS "${WXSRC}/lib/gcc_lib/libwxmsw29ud_gl.a" AND
    ${BUILD} STREQUAL "Debug" )

#
# If wxWidgets cannot be found, make sure the source code has been downloaded.
# Relies on the user not removing the source archive!
#

if( NOT wxWidgets_FOUND )

    # Check that the source code has been downloaded

    if( NOT EXISTS "${WXSRCROOT}/wxWidgets-${WXVER}.tar.bz2" )

        message( STATUS "Downloading wxWidgets source code" )
        file( MAKE_DIRECTORY "${WXSRCROOT}")
        file(
            DOWNLOAD "ftp://ftp.wxwidgets.org/pub/${WXVER}/wxWidgets-${WXVER}.tar.bz2"
            "${WXSRCROOT}/wxWidgets-${WXVER}.tar.bz2"
            STATUS download_error_list )
        list( GET ${download_error_list} 0 download_error )
        list( GET ${download_error_list} 1 download_error_str )

    endif( NOT EXISTS "${WXSRCROOT}/wxWidgets-${WXVER}.tar.bz2" )

    #
    # Report an error on failure and quit the script as there is nothing else
    # left to do
    #

    if( download_error )

        message( ERROR "${download_error} Failed to decrompress wxWidgets-${WXVER} source." )
        message( ERROR "${download_error_str}" )
        return()

    endif( download_error )

    #
    # See if we need to decompress the archive, or if it has already been
    # decompressed
    #

    # Set the error flag used below to zero to begin with
    SET( error 0 )

    # Check for the existance of the makefile we'll be using later to build the
    # source
    if( NOT EXISTS "${WXSRC}/build/msw/makefile.gcc" )

        message( STATUS "Decompressing wxWidgets source code" )
        execute_process(
            COMMAND ${CMAKE_COMMAND} -E tar xfj "${WXSRCROOT}/wxWidgets-${WXVER}.tar.bz2"
            WORKING_DIRECTORY "${WXSRCROOT}"
            RESULT_VARIABLE untar_error )

        # update the error variable
        set( error ${untar_error} )

    endif( NOT EXISTS "${WXSRC}/build/msw/makefile.gcc" )

    #
    # Report an error on failure and quit the script as there is nothing else
    # left to do
    #

    if( error )

        message(
            ERROR
            "${untar_error} Failed to decrompress wxWidgets-${WXVER} source." )
        return()

    endif( error )

    #
    # Build wxWidgets, either Release or Debug version
    #

    if( ${BUILD} STREQUAL "Release" )

        message( STATUS "Building wxWidgets (Release)" )
        execute_process(
            COMMAND ${MINGW_MAKE} -f makefile.gcc BUILD=release CXXFLAGS=-Os
            OUTPUT_FILE "${LOGDIR}/wxWidgets_build_stdout_r.log"
            ERROR_FILE "${LOGDIR}/wxWidgets_build_stderr_r.log"
            WORKING_DIRECTORY "${WXSRC}/build/msw"
            RESULT_VARIABLE error )

    endif( ${BUILD} STREQUAL "Release" )

    if( ${BUILD} STREQUAL "Debug" )

        message( STATUS "Building wxWidgets (Debug)" )
        execute_process(
            COMMAND ${MINGW_MAKE} -f makefile.gcc BUILD=debug CXXFLAGS=-O2
            OUTPUT_FILE "${LOGDIR}/wxWidgets_build_stdout_d.log"
            ERROR_FILE "${LOGDIR}/wxWidgets_build_stderr_d.log"
            WORKING_DIRECTORY "${WXSRC}/build/msw"
            RESULT_VARIABLE error )

    endif( ${BUILD} STREQUAL "Debug" )

else( NOT wxWidgets_FOUND )

    # wxWidgets appears to be built and in the correct place!
    message( STATUS "Found wxWidgets" )

endif( NOT wxWidgets_FOUND )

#-------------------------------------------------------------------------------
#
# Get the KiCad source code
#
if( NOT EXISTS "${SRCDIR}" )
    file( MAKE_DIRECTORY "${SRCDIR}" )
endif( NOT EXISTS "${SRCDIR}" )

if( NOT EXISTS "${SRCDIR}/kicad/.bzr" )

    #
    # The directory is not a bazaar version controlled directory, so we must
    # checkout the KiCad project
    #

    message( STATUS "Checking out KiCad source code (BZR head)" )
    execute_process(
        COMMAND bzr co lp:kicad
        WORKING_DIRECTORY "${SRCDIR}"
        RESULT_VARIABLE kicad_src_NOT_CO )

    # If the repository cannot be checked out, error and quit
    if( kicad_src_NOT_CO )

        message( ERROR " Checking out source code!" )
        return()

    endif( kicad_src_NOT_CO )

else( NOT EXISTS "${SRCDIR}/kicad/.bzr" )

    #
    # Directory is a bazaar version controlled directory, so we should already
    # have the codebase. Simply update and build
    #

    message( STATUS "Updating KiCad source code from bazaar head" )

    # Do NOT redirect stdout as bazaar could need to ask the user for an auth
    # password. So keep the output directed to the screen. stderr can still
    # be redirected though
    execute_process(
        COMMAND bzr up
        WORKING_DIRECTORY "${SRCDIR}/kicad"
        ERROR_VARIABLE bzr_up_stderr
        RESULT_VARIABLE kicad_src_NOT_UPDATED )

    # If the repository cannot be updated, error and quit
    if( kicad_src_NOT_UPDATED )

        message( ERROR " Updating source code!" )
        message( ERROR " Bazaar said: ${bzr_up_stderr}" )

        return()

    endif( kicad_src_NOT_UPDATED )

endif( NOT EXISTS "${SRCDIR}/kicad/.bzr" )

# ------------------------------------------------------------------------------
#
# Configure with cmake. Coinfigure both Release and debug versions as it doesn't
# take very long to configure
#
if( NOT EXISTS ${BUILDDIR} )
    file( MAKE_DIRECTORY ${BUILDDIR} )
endif( NOT EXISTS ${BUILDDIR} )

if( NOT EXISTS "${BUILDDIR}/release" )
    file( MAKE_DIRECTORY "${BUILDDIR}/release" )
endif( NOT EXISTS "${BUILDDIR}/release" )

# Test to see if the source is already configured. If it is not, we will need to
# configure it now
if( NOT EXISTS "${BUILDDIR}/release/Makefile" AND ${BUILD} STREQUAL "Release" )

    # Insert a new line as bzr does not insert a newline at the end of a branch!
    message( STATUS "\n Configuring KiCad (Release)" )
    execute_process(
        COMMAND ${CMAKE_COMMAND} -G "CodeBlocks - MinGW Makefiles" -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Release -DwxWidgets_ROOT_DIR=${WXSRC} ${SRCDIR}/kicad
        WORKING_DIRECTORY "${BUILDDIR}/release"
        OUTPUT_FILE "${LOGDIR}/cmake_release_stdout.log"
        ERROR_FILE "${LOGDIR}/cmake_release_stderr.log"
        RESULT_VARIABLE kicad_src_NOT_CONFIGURED )

    #
    # Report an error on failure and quit the script as there is nothing else
    # left to do
    #

    if( kicad_src_NOT_UPDATED )

        message( ERROR "ERROR: Could not configure the KiCad source code. Cmake failed." )
        message( ERROR "See the log file ${LOGDIR}/cmake_release_stderr.log for more details" )
        return()

    endif( kicad_src_NOT_UPDATED )

endif( NOT EXISTS "${BUILDDIR}/release/Makefile" AND ${BUILD} STREQUAL "Release" )

if( NOT EXISTS "${BUILDDIR}/debug" )
    file( MAKE_DIRECTORY "${BUILDDIR}/debug" )
endif( NOT EXISTS "${BUILDDIR}/debug" )

# Test to see if the source is already configured. If it is not, we will need to
# configure it now
if( NOT EXISTS "${BUILDDIR}/debug/Makefile" AND ${BUILD} STREQUAL "Debug" )

    # Insert a new line as bzr does not insert a newline at the end of a branch!
    message( STATUS "\n Configuring KiCad (Debug)" )
    execute_process(
        COMMAND ${CMAKE_COMMAND} -G "CodeBlocks - MinGW Makefiles" -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_ROOT_DIR=${WXSRC} ${SRCDIR}/kicad
        WORKING_DIRECTORY "${BUILDDIR}/debug"
        OUTPUT_FILE "${LOGDIR}/cmake_debug_stdout.log"
        ERROR_FILE "${LOGDIR}/cmake_debug_stderr.log"
        RESULT_VARIABLE kicad_src_NOT_CONFIGURED )

    #
    # Report an error on failure and quit the script as there is nothing else
    # left to do
    #

    if( kicad_src_NOT_UPDATED )

        message( ERROR "ERROR: Could not configure the KiCad source code. Cmake failed." )
        message( ERROR "See the log file ${LOGDIR}/cmake_debug_stderr.log for more details" )
        return()

    endif( kicad_src_NOT_UPDATED )

endif( NOT EXISTS "${BUILDDIR}/debug/Makefile" AND ${BUILD} STREQUAL "Debug" )

# ------------------------------------------------------------------------------
#
# Build KiCad (Release Version)
#

# Get the bazaar revision number so the user knows what revision is being built
execute_process(
    COMMAND bzr revno
    WORKING_DIRECTORY "${SRCDIR}/kicad"
    OUTPUT_VARIABLE bzr_revno
    ERROR_VARIABLE bzr_stderr
    RESULT_VARIABLE bzr_revno_result )

# This variable will be filled with the build result after make has executed
set( kicad_NOT_BUILT 1 )

if( ${BUILD} STREQUAL "Release" )

# Build the release version of KiCad - log cmake's output
message( STATUS "Building Release version of KiCad revision: ${bzr_revno}" )
execute_process(
    COMMAND ${MINGW_MAKE}
    WORKING_DIRECTORY "${BUILDDIR}/release"
    OUTPUT_FILE "${LOGDIR}/make_release_stdout.log"
    ERROR_FILE "${LOGDIR}/make_release_stderr.log"
    RESULT_VARIABLE kicad_NOT_BUILT )

else( ${BUILD} STREQUAL "Release" )

# Build the debug version of KiCad - log cmake's output
message( STATUS "Building Debug version of KiCad revision: ${bzr_revno}" )
execute_process(
    COMMAND ${MINGW_MAKE}
    WORKING_DIRECTORY "${BUILDDIR}/debug"
    OUTPUT_FILE "${LOGDIR}/make_debug_stdout.log"
    ERROR_FILE "${LOGDIR}/make_debug_stderr.log"
    RESULT_VARIABLE kicad_NOT_BUILT )

endif( ${BUILD} STREQUAL "Release" )

# Display a message if there is a problem with the build rather than just
# silently dropping out
if( kicad_NOT_BUILT )

    message( STATUS "KiCad was NOT built successfully! Please view the logs" )
    return()

endif( kicad_NOT_BUILT )

#-------------------------------------------------------------------------------
#
# Copy the built binaries to the bin folder along with the dependancies from
# MinGW
#

message( STATUS "Copying binaries to /bin directory" )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/bitmap2component/bitmap2component.exe ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/cvpcb/cvpcb.exe ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/eeschema/eeschema.exe ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/gerbview/gerbview.exe ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/kicad/kicad.exe ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/pcb_calculator/pcb_calculator.exe ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${BUILDDIR}/release/pcbnew/pcbnew.exe ${BINDIR} )

#
# If we are using the local MinGW, this is not in the environment path, and so
# we need to copy the MinGW compiled dependancies across to the bin directory
# too. If not using a local copy, MinGW's bin directory (and therefore
# dependancies!) are in the env path anyway so no need to copy.
#

if( ${using_localMingw} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${GCCDIR}/libgcc_s_dw2-1.dll ${BINDIR} )

execute_process(
    COMMAND ${CMAKE_COMMAND} -E copy ${GCCDIR}/libstdc++-6.dll ${BINDIR} )

endif( ${using_localMingw} )

Tags: windows dsn
Revision history for this message
dweith (dweith) wrote :
Download full text (12.0 KiB)

Extra output from Visual Studio 2010 post crash debug

'pcbnew.exe': Loaded 'C:\Program Files (x86)\KiCad\bin\pcbnew.exe', Binary was not built with debug information.
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'pcbnew.exe': Loaded 'C:\Program Files (x86)\KiCad\bin\libstdc++-6.dll', Binary was not built with debug information.
'pcbnew.exe': Loaded 'C:\Program Files (x86)\KiCad\bin\libgcc_s_dw2-1.dll', ...

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

It may be that CMAKE_BUILD_TYPE of "Debug" would allow the runtime environment to tell you more about the specific crash location.

If you do not have the skills to make this Debug build, then I am willing to try it here using your BOARD file along with any needed libraries. Ask on the user's list how to prepare that file set package for me please.

Thanks,

Dick

Revision history for this message
Brian Sidebotham (brian-sidebotham) wrote :

As you are using kicad-winbuilder, you can edit line 167 to select the build type. Replace "Release" with "Debug" to produce a debug build which may give you further information to help Dick debug this problem.

Best Regards,

Brian.

Revision history for this message
Martin Errenst (imp-d) wrote :

Does this problem still exist?

Martin Errenst (imp-d)
Changed in kicad:
status: New → Incomplete
Martin Errenst (imp-d)
tags: added: windows
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for KiCad because there has been no activity for 60 days.]

Changed in kicad:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.