Menu

#309 TeXnicCenter crashes

closed-fixed
5
2010-12-16
2010-12-15
Anonymous
No

TeXnicCenter crashes (windows pops up the dialog box telling me that TeXnicCenter has stopped working and asks me if I want to report this to MS) often enough that I've changed my autosave time to 1 minute. I'm not sure whether or not the crashes correspond to anything (e.g., autosave, disk access, etc.), and they aren't predictable enough for me to know how to debug it further to get useful information (I don't know if there's a windows equivalent to, e.g., gdb or strace for linux. Dr. Watson seems to not be for Windows 7. I can't get the source code to compile in VS 2010 Pro, so I can't figure out what line of code it crashes on.). It generally happens when I'm in the middle of typing text (which is most of what I do in TeXnicCenter). It might have happened once or twice on maximize or restore, but I don't remember. It's never happened when TeXnicCenter is in the background/is not focused.

Discussion

  • Anonymous

    Anonymous - 2010-12-15

    I've created (and attached) a dump file created using task manager. I tried clicking debug on the error message that windows gives me, and told it to debug with VS 2010. A message box in VS popped up saying "Unhandled exception at 0x77c4dc9b in TeXnicCenter.exe: 0xC0000374: A heap has been corrupted." It gives me a call stack location of "ntdll.dll!77c4dc9b()". I can't figure out how to get it to load symbols for TeXnicCenter.exe, but, with symbols for all the other dlls loaded, the call stack is:

    > ntdll.dll!_RtlReportCriticalFailure@8() + 0x57 bytes
    ntdll.dll!_RtlpReportHeapFailure@4() + 0x21 bytes
    ntdll.dll!_RtlpLogHeapFailure@24() + 0xa1 bytes
    ntdll.dll!_RtlpCoalesceFreeBlocks@16() + 0x57b21 bytes
    ntdll.dll!@RtlpFreeHeap@16() + 0x10b bytes
    ntdll.dll!_RtlFreeHeap@12() + 0x4c4d bytes
    kernel32.dll!_HeapFree@12() + 0x14 bytes
    msvcr90.dll!free(void * pBlock) Line 110 C
    mfc90u.dll!CAfxStringMgr::Free(ATL::CStringData * pData) Line 154 + 0x9 bytes C++
    mfc90u.dll!ATL::CStringData::Release() Line 113 C++
    TeXnicCenter.exe!0146d223()
    [Frames below may be incorrect and/or missing, no symbols loaded for TeXnicCenter.exe]
    TeXnicCenter.exe!014200fa()
    ntdll.dll!_KiUserCallbackDispatcher@12() + 0x2e bytes
    user32.dll!_SendMessageWorker@24() + 0x5176 bytes
    TeXnicCenter.exe!01420537()
    TeXnicCenter.exe!01420607()
    TeXnicCenter.exe!014206ea()
    TeXnicCenter.exe!01420725()
    mfc90u.dll!CWinThread::DispatchThreadMessageEx(tagMSG * pMsg) Line 771 C++
    mfc90u.dll!AfxInternalPreTranslateMessage(tagMSG * pMsg) Line 227 + 0xd bytes C++
    mfc90u.dll!CWinThread::PreTranslateMessage(tagMSG * pMsg) Line 777 + 0x8 bytes C++
    mfc90u.dll!AfxPreTranslateMessage(tagMSG * pMsg) Line 255 C++
    mfc90u.dll!AfxInternalPumpMessage() Line 178 + 0xf bytes C++
    mfc90u.dll!CWinThread::Run() Line 629 + 0x7 bytes C++
    mfc90u.dll!_AfxThreadEntry(void * pParam) Line 126 C++
    msvcr90.dll!_callthreadstartex() Line 348 + 0x6 bytes C
    msvcr90.dll!_threadstartex(void * ptd) Line 326 + 0x5 bytes C
    kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
    ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
    ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes

     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-15

    Did you get the source that you had tried to compile using VS2010 from our Mercurial repository?

     
  • Anonymous

    Anonymous - 2010-12-15

    No, I got it from the svn repository; my copy of cygwin doesn't seem to have Mercurial installed, but has svn installed. Should I try the Mercurial repository?

     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-15

    Yes, we moved to Mercurial a week ago. The SVN repository is obsolete now.

    When debugging, you might wanna set a breakpoint in CodeView.cpp, line 309. I suspect that the call to GetLine in the previous line is responsible for memory corruption.

     
  • Anonymous

    Anonymous - 2010-12-15

    It fails to build on "Debug x64" and "Release x64" (something about not being able to compile help because it can't open a .chm file or ""cmd.exe" exited with code 1" for release. Intellisense also gave me errors about not being about to find .h files in ../Source, or something like that. I also got lots of warnings about things like possibly loosing information by converting size_t to int. I can give more detailed error messages if you want.). It builds fine on "Debug Win32" and "Release Win32". I'll run it from now on from Debug Win32, and see if the bug pops up again.

     
  • Anonymous

    Anonymous - 2010-12-15

    I got the attached error message while typing. Call stack is

    > msvcr100d.dll!_free_dbg_nolock(void * pUserData, int nBlockUse) Line 1368 + 0x4a bytes C++
    msvcr100d.dll!_free_dbg(void * pUserData, int nBlockUse) Line 1265 + 0xd bytes C++
    mfc100ud.dll!CAfxStringMgr::Free(ATL::CStringData * pData) Line 169 + 0xc bytes C++
    mfc100ud.dll!ATL::CStringData::Release() Line 118 C++
    mfc100ud.dll!ATL::CSimpleStringT<char,1>::~CSimpleStringT<char,1>() Line 289 C++
    mfc100ud.dll!ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::~CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >() Line 1213 + 0x8 bytes C++
    TeXnicCenter.exe!CodeView::GetLineText(int line, bool direct) Line 321 + 0x1b bytes C++
    TeXnicCenter.exe!SpellerBackgroundThread::DoCheckLine(CodeView * view, int line, ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > & text) Line 270 + 0x15 bytes C++
    TeXnicCenter.exe!SpellerBackgroundThread::DoCheckLine(CodeView * view, int line) Line 324 C++
    TeXnicCenter.exe!SpellerBackgroundThread::SpellCheckSingleLine(CodeView * pTextView, int nLine) Line 210 C++
    TeXnicCenter.exe!SpellerBackgroundThread::OnUpdateLine(CodeView * pTextView, int nLine) Line 152 C++
    TeXnicCenter.exe!SpellerBackgroundThread::OnUpdateLine(unsigned int wParam, long lParam) Line 116 C++
    mfc100ud.dll!CWinThread::DispatchThreadMessageEx(tagMSG * pMsg) Line 771 C++
    mfc100ud.dll!AfxInternalPreTranslateMessage(tagMSG * pMsg) Line 227 + 0x14 bytes C++
    mfc100ud.dll!CWinThread::PreTranslateMessage(tagMSG * pMsg) Line 777 + 0x9 bytes C++
    mfc100ud.dll!AfxPreTranslateMessage(tagMSG * pMsg) Line 252 + 0x11 bytes C++
    mfc100ud.dll!AfxInternalPumpMessage() Line 178 + 0x18 bytes C++
    mfc100ud.dll!CWinThread::PumpMessage() Line 900 C++
    mfc100ud.dll!CWinThread::Run() Line 629 + 0xd bytes C++
    mfc100ud.dll!_AfxThreadEntry(void * pParam) Line 122 + 0x13 bytes C++
    msvcr100d.dll!_callthreadstartex() Line 314 + 0xf bytes C
    msvcr100d.dll!_threadstartex(void * ptd) Line 297 C
    kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
    ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
    ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes

     
  • Anonymous

    Anonymous - 2010-12-15

    But when I told it to continue running, it resumed fine.

     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-15

    Unload the TXCUserHelp and Documentation projects and you will be able to build the solution without errors.

    Does it help if you apply the attached patch?

     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-15
    • labels: 434620 -->
    • milestone: 1143860 -->
     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-15
    • labels: --> Text Editor
     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-15
     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-16
    • status: open --> pending
     
  • Sergiu Dotenco

    Sergiu Dotenco - 2010-12-16
    • assigned_to: nobody --> sergiudotenco
    • status: pending --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel