Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6244929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:24:56+00:00 2026-05-24T12:24:56+00:00

i am working on project developed in Qt, Windows, i use Qt Version 4.1.4

  • 0

i am working on project developed in Qt, Windows,
i use Qt Version 4.1.4 and VC6 IDE for compiling project, most of usage of product are on WindowsXp.

i frequently receive crash reports from testers and customers which does not have fix pattern and does not reproduce in my development environment.

so i come to the conclusion that i need to write a crash log from my program so that i always get the call stack when program is crashed.

in linux i know its possible to do it with some signal handling of segmentation fault. but how to do the same thing in windows/C++?

i tried to search on Google to find some ready made solution but without any luck.

Suggestion regarding any third party tools/libraries (free or licensed) are also accepted, but please do not suggest any method where i have to modify each function in my module to get log, because the project is huge and i can not afford that.

thanks in advance.

updates.
I have attached StackWalker to my Code now (with bit of hassle of _MBCS & UNICODE) but atleast managed to attach it.

my main file looks like below,

class MyStackWalker : public StackWalker
{  
   FILE *sgLogFile;
   public:
   MyStackWalker() : StackWalker() 
   {
     sgLogFile = fopen("ThisIsWhatIcallLog.log", "w");
   }
   MyStackWalker(DWORD dwProcessId, HANDLE hProcess) : StackWalker(dwProcessId, hProcess) 
   {
   }
   virtual void OnOutput(LPCSTR szText) 
   { 
      printf(szText); 
      fprintf(sgLogFile, "%s",szText);
      fclose(sgLogFile);
      StackWalker::OnOutput(szText); 
   }
};

LONG Win32FaultHandler(struct _EXCEPTION_POINTERS *  ExInfo)
{
    MyStackWalker sw;   
    sw.ShowCallstack();
    return EXCEPTION_EXECUTE_HANDLER;
}

void InstallFaultHandler()
{
    SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER) Win32FaultHandler);
}

But i get linker error now that symbols are not found,

main.obj : error LNK2001: unresolved external symbol "public: int __thiscall StackWalker::ShowCallstack(void *,struct _CONTEXT const *,int (__stdcall*)(void *,unsigned __int64,void *,int,unsigned long *,void *),void *)" (?ShowCallstack@StackWalker@@QAEHPAXPBU_CONTEXT@@P6GH0_K0HPAK0@Z0@Z)
main.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall StackWalker::OnDbgHelpErr(char const *,int,unsigned __int64)(?OnDbgHelpErr@StackWalker@@MAEXPBDH_K@Z)
main.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall StackWalker::OnLoadModule(char const *,char const *,unsigned __int64,int,int,char const *,char const *,unsigned __int64)" (?OnLoadModule@StackWalker@@MAEXPBD0_KHH001@Z)
main.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall StackWalker::OnSymInit(char const *,int,char const *)" (?OnSymInit@StackWalker@@MAEXPBDH0@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall StackWalker::StackWalker(int,char const *,int,void *)" (??0StackWalker@@QAE@HPBDHPAX@Z)
release/Prog.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

I have modified the StackWalker.cpp file to adapt to the UNICODE support, replaced “_tcscat_s” with “wcscat”.

can you see, what’s going wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:24:58+00:00Added an answer on May 24, 2026 at 12:24 pm

    For cross-platform application Breakpad is probably better solution. But easy way for Windows -is to set unhandled exception handler via SetUnhandledExceptionFilter and write minidumps (with configuration you need) with WriteMiniDumpEx in handler.

    example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on small open source project for developed Windows. I created new project
Currently working on a project that is being developed in VS2010. I'm running Windows
Being a Windows developer I'm currently working on my own project using LAMP. I
I'm going to start working on project developed in ASP.NET. In this project I
I am working on a project which was developed in Visual Studio 2005 (.NET
I’m working on a project and have developed the high level user requirements for
I'm working on a project where we have several SOAP Web Services developed on
I'm working with an OCR project which is developed using Visual C++ on .net
I am working with a django project, I haven't started. The developed working on
I am working on an Arduino Mega 2560 project. At a Windows 7 PC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.