Skip to content
Permalink
Browse files

crash report: fix report on 64bit

  • Loading branch information
jef-n committed Jul 20, 2017
1 parent e7744bd commit 74407dc6976bc63e826adf6e5a130598f80823e6
Showing with 28 additions and 24 deletions.
  1. +14 −6 src/app/main.cpp
  2. +0 −2 src/app/qgsmaptoolfillring.cpp
  3. +14 −16 src/core/qgsstacktrace.cpp
@@ -471,12 +471,6 @@ int main( int argc, char *argv[] )
#endif

#ifdef Q_OS_WIN
if ( !QgsApplication::isRunningFromBuildDir() )
{
QString symbolPath( getenv( "QGIS_PREFIX_PATH" ) );
symbolPath = symbolPath + "\\pdb;http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore";
QgsStackTrace::setSymbolPath( symbolPath );
}
SetUnhandledExceptionFilter( QgsCrashHandler::handle );
#endif

@@ -800,6 +794,20 @@ int main( int argc, char *argv[] )
myApp.setWindowIcon( QIcon( QgsApplication::appIconPath() ) );
#endif

#ifdef Q_OS_WIN
if ( !QgsApplication::isRunningFromBuildDir() )
{
QString symbolPath( getenv( "QGIS_PREFIX_PATH" ) );
symbolPath = symbolPath + "\\pdb;http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore";
QgsStackTrace::setSymbolPath( symbolPath );
}
else
{
QString symbolPath( getenv( "QGIS_PDB_PATH" ) );
symbolPath = symbolPath + ";http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore";
QgsStackTrace::setSymbolPath( symbolPath );
}
#endif

//
// Set up the QSettings environment must be done after qapp is created
@@ -145,8 +145,6 @@ void QgsMapToolFillRing::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
}
}

QgsRectangle bBox = g.boundingBox();

QgsExpressionContext context = vlayer->createExpressionContext();

QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterFid( fid ) );
@@ -103,32 +103,30 @@ QVector<QgsStackTrace::StackLine> QgsStackTrace::trace( _EXCEPTION_POINTERS *Exc
if ( SymFromAddr( process, ( DWORD64 )stack_frame.AddrPC.Offset, &displacement, symbol ) )
{
DWORD dwDisplacement;
QString fileName;
QString lineNumber;
QString moduleName;
if ( SymGetLineFromAddr( process, ( DWORD )( stack_frame.AddrPC.Offset ), &dwDisplacement, line ) )

QgsStackTrace::StackLine stackline;
stackline.symbolName = QString( symbol->Name );

if ( SymGetLineFromAddr( process, ( DWORD64 ) stack_frame.AddrPC.Offset, &dwDisplacement, line ) )
{
fileName = QString( line->FileName );
lineNumber = QString::number( line->LineNumber );
stackline.fileName = QString( line->FileName );
stackline.lineNumber = QString::number( line->LineNumber );
}
else
{
fileName = "(unknown file)";
lineNumber = "(unknown line)";
stackline.fileName = "(unknown file)";
stackline.lineNumber = "(unknown line)";
}
if ( SymGetModuleInfo( process, ( DWORD )( stack_frame.AddrPC.Offset ), module ) )

if ( SymGetModuleInfo( process, ( DWORD64 ) stack_frame.AddrPC.Offset, module ) )
{
moduleName = QString( module->ModuleName );
stackline.moduleName = module->ModuleName;
}
else
{
moduleName = "(unknown module)";
stackline.moduleName = "(unknown module)";
}
QgsStackTrace::StackLine stackline;
stackline.moduleName = moduleName;
stackline.fileName = fileName;
stackline.lineNumber = lineNumber;
stackline.symbolName = QString( symbol->Name );

stack.append( stackline );
}
}

0 comments on commit 74407dc

Please sign in to comment.
You can’t perform that action at this time.