View Issue Details

IDProjectCategoryView StatusLast Update
00025723 - Current Dev ListBugpublic2018-04-14 10:23
ReporterPD9FER 
Assigned ToK7ZCZ 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0002572: Logbook build 794 Crash on Printing awardd status
DescriptionAttempting to print from the Award Tracking pane causes HRD Logbook to crash and write a minidump
Steps To Reproduce
1. Start HRD Logbook
2. Select Award Tracking
3. Select award program " ARRL DXCC (HRD)"
4. Click "Print" - Print dialog box opens
5. In Print dialog, select "Print Summary Report" or "Print Award Credits Matrix"
6. Click "OK"
7. Error dialog appears: "HRD Logbook encountered a problem. A minidump was written
Additional InformationTicket #806356

Dumpfile is in G-Drive Dumpfolder with this Mantis ID
TagsNo tags attached.
ModuleLogbook
Sub-ModuleAwards
TestingNot Started

Relationships

has duplicate 0002319 resolvedK7ZCZ Ticket #224553 - System Crash when printing Matrix 
related to 0002676 new Logbook: Printing "Award Credits Matrix" causes a crash 

Activities

K7ZCZ

2018-04-13 12:16

manager  

MANTIS_ID-0002572HRDLogbook_20180305_091738.rar (16,127,361 bytes)

K7ZCZ

2018-04-13 12:16

manager   ~0004818

Attaching the dump to this issue directly, which is much more convenient than referencing Google drive.

From the dump, I can see that the customer was using Build 794.

K7ZCZ

2018-04-13 18:33

manager   ~0004819

The attached dump has this call stack:

0:000> kp
  *** Stack trace for last set context - .thread/.cxr resets it
 # ChildEBP RetAddr
00 (Inline) -------- HRDLogbook!CGdiObject::GetSafeHandle+0x4 [f:\dd\vctools\vc7libs\ship\atlmfc\include\afxwin1.inl @ 68]
01 01a6ef70 005d3c23 HRDLogbook!CDC::SelectObject(class CBrush * pBrush = 0x018a0022)+0x2f [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wingdi.cpp @ 252]
02 01a6f058 005d3689 HRDLogbook!CAwards2View::DrawPageFrame(class CDC * pDC = 0x01a6f0e0 {hDC={...} attrib={...}}, class CRect * rect = 0x01a6f09c {LT(26, 258) RB(4932, 6930) [4906 x 6672]}, wchar_t * lpTitle = 0x17922778 "Awards Summary Report.Ferry, PD9FER")+0x363 [c:\ham radio\logbook\hrdlogbook\awards2view.cpp @ 1365]
03 01a6f0c0 005d3ee3 HRDLogbook!CAwards2View::PrintSpreadsheet(class CDC * pDC = 0x01a6f0e0 {hDC={...} attrib={...}})+0xd9 [c:\ham radio\logbook\hrdlogbook\awards2view.cpp @ 1409]
04 01a6f4b4 00164039 HRDLogbook!CAwards2View::OnFilePrint(void)+0x213 [c:\ham radio\logbook\hrdlogbook\awards2view.cpp @ 1265]
05 01a6f4c4 00163e72 HRDLogbook!_AfxDispatchCmdMsg(class CCmdTarget * pTarget = 0x07cb1460, unsigned int nID = 0xe107, int nCode = 0n0, <function> * pfn = 0x005d3cd0, void * pExtra = 0x00000000, unsigned int nSig = 0x3a, struct AFX_CMDHANDLERINFO * pHandlerInfo = 0x00000000)+0x42 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\cmdtarg.cpp @ 78]
06 01a6f4f4 0017c0b4 HRDLogbook!CCmdTarget::OnCmdMsg(unsigned int nID = 0xe107, int nCode = 0n0, void * pExtra = 0x00000000, struct AFX_CMDHANDLERINFO * pHandlerInfo = 0x00000000)+0x120 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\cmdtarg.cpp @ 373]
07 01a6f534 00179fd2 HRDLogbook!CView::OnCmdMsg(unsigned int nID = 0xe107, int nCode = 0n0, void * pExtra = 0x00000000, struct AFX_CMDHANDLERINFO * pHandlerInfo = 0x00000000)+0x1f [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\viewcore.cpp @ 164]
08 01a6f574 0015f7ea HRDLogbook!CFrameWnd::OnCmdMsg(unsigned int nID = 0xe107, int nCode = 0n0, void * pExtra = 0x00000000, struct AFX_CMDHANDLERINFO * pHandlerInfo = 0x00000000)+0x37 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp @ 980]
09 01a6f5c4 0017a09e HRDLogbook!CWnd::OnCommand(unsigned int wParam = 0xe107, long lParam = 0n0)+0x89 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 2784]
0a 01a6f5e0 00160402 HRDLogbook!CFrameWnd::OnCommand(unsigned int wParam = 0xe107, long lParam = 0n0)+0x7b [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp @ 383]
0b 01a6f698 0012f0f6 HRDLogbook!CWnd::OnWndMsg(unsigned int message = 0x111, unsigned int wParam = 0xe107, long lParam = 0n0, long * pResult = 0x01a6f6d0)+0x3c [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 2108]
0c 01a6f6b4 00161bf8 HRDLogbook!CXTPCommandBarsSiteBase<CMDIChildWnd>::OnWndMsg(unsigned int message = 0x111, unsigned int wParam = 0xe107, long lParam = 0n0, long * pResult = 0x01a6f6d0)+0x46 [c:\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpframewnd.h @ 190]
0d 01a6f6d4 0015d2de HRDLogbook!CWnd::WindowProc(unsigned int message = 0x111, unsigned int wParam = 0xe107, long lParam = 0n0)+0x22 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 2094]
0e 01a6f744 0015da93 HRDLogbook!AfxCallWndProc(class CWnd * pWnd = 0x07caf870 {hWnd={...}}, struct HWND__ * hWnd = 0x000a08b4, unsigned int nMsg = 0x111, unsigned int wParam = 0xe107, long lParam = 0n0)+0xb0 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 285]
0f 01a6f764 763c62fa HRDLogbook!AfxWndProc(struct HWND__ * hWnd = 0x000a08b4, unsigned int nMsg = 0x111, unsigned int wParam = 0xe107, long lParam = 0n0)+0x34 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 434]
10 01a6f790 763c6d3a user32!InternalCallWinProc+0x23
11 01a6f808 763d0d3f user32!UserCallWinProcCheckWow+0x109
12 01a6f840 763d0d65 user32!CallWindowProcAorW+0xab
13 01a6f860 003c3ebc user32!CallWindowProcW+0x1b
14 01a6f8a8 763c62fa HRDLogbook!CXTPHookManager::HookWndProc(struct HWND__ * hWnd = 0x0015da5f, unsigned int message = 0x111, unsigned int wParam = 0xe107, long lParam = 0n0)+0xac [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\common\xtphookmanager.cpp @ 267]
15 01a6f8d4 763c6d3a user32!InternalCallWinProc+0x23
16 01a6f94c 763c965e user32!UserCallWinProcCheckWow+0x109
17 01a6f990 763c96c5 user32!SendMessageWorker+0x581
18 01a6f9b4 002d1fd1 user32!SendMessageW+0x7f
19 01a6f9f0 002d0741 HRDLogbook!CXTPControl::OnExecute(void)+0x191 [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpcontrol.cpp @ 914]
1a 01a6fa38 0037fed8 HRDLogbook!CXTPControl::ClickToolBarButton(class CRect rcActiveRect = {LT(8, 2) RB(45, 39) [37 x 37]})+0x271 [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpcontrol.cpp @ 785]
1b 01a6fa54 002d2135 HRDLogbook!CXTPControlButton::OnClick(int bKeyboard = 0n0, class CPoint pt = {x=36 y=31})+0x78 [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpcontrolbutton.cpp @ 77]
1c 01a6fa6c 002ba428 HRDLogbook!CXTPControl::OnLButtonDown(class CPoint point = {x=36 y=31})+0x35 [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpcontrol.cpp @ 1327]
1d 01a6fa88 002b6088 HRDLogbook!CXTPCommandBar::OnLButtonDown(unsigned int nFlags = 1, class CPoint point = {x=36 y=31})+0x128 [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpcommandbar.cpp @ 434]
1e 01a6faa0 001608c9 HRDLogbook!CXTPToolBar::OnLButtonDown(unsigned int nFlags = 1, class CPoint point = {x=36 y=31})+0x88 [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtptoolbar.cpp @ 1016]
1f 01a6fb5c 002badcb HRDLogbook!CWnd::OnWndMsg(unsigned int message = <Value unavailable error>, unsigned int wParam = 1, long lParam = 0n2031652, long * pResult = 0x01a6fb94)+0x503 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 2473]
20 01a6fb78 00161bf8 HRDLogbook!CXTPCommandBar::OnWndMsg(unsigned int message = 0x201, unsigned int wParam = 1, long lParam = 0n2031652, long * pResult = 0x01a6fb94)+0x2b [c:\hrdbranch\ham radio\codejock software\mfc\xtreme toolkitpro v15.0.2\source\commandbars\xtpcommandbar.cpp @ 2416]
21 01a6fb98 0015d2de HRDLogbook!CWnd::WindowProc(unsigned int message = 0x201, unsigned int wParam = 1, long lParam = 0n2031652)+0x22 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 2094]
22 01a6fc08 0015da93 HRDLogbook!AfxCallWndProc(class CWnd * pWnd = 0x07cf87f0 {hWnd={...}}, struct HWND__ * hWnd = 0x00020928, unsigned int nMsg = 0x201, unsigned int wParam = 1, long lParam = 0n2031652)+0xb0 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 285]
23 01a6fc28 763c62fa HRDLogbook!AfxWndProc(struct HWND__ * hWnd = 0x00020928, unsigned int nMsg = 0x201, unsigned int wParam = 1, long lParam = 0n2031652)+0x34 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 434]
24 01a6fc54 763c6d3a user32!InternalCallWinProc+0x23
25 01a6fccc 763c77c4 user32!UserCallWinProcCheckWow+0x109
26 01a6fd2c 763c788a user32!DispatchMessageWorker+0x3b5
27 01a6fd3c 00166cef user32!DispatchMessageW+0xf
28 01a6fd4c 00167326 HRDLogbook!AfxInternalPumpMessage(void)+0x3e [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp @ 183]
29 01a6fd68 00584209 HRDLogbook!CWinThread::Run(void)+0x57 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp @ 629]
2a 01a6fd7c 00582a59 HRDLogbook!AfxWinMain(struct HINSTANCE__ * hInstance = 0x00120000, struct HINSTANCE__ * hPrevInstance = 0x00000000, wchar_t * lpCmdLine = 0x01e92636 "", int nCmdShow = 0n1)+0x66 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winmain.cpp @ 47]
2b 01a6fdc8 753b343d HRDLogbook!__tmainCRTStartup(void)+0x12f [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c @ 618]
2c 01a6fdd4 77539832 kernel32!BaseThreadInitThunk+0xe
2d 01a6fe14 77539805 ntdll!__RtlUserThreadStart+0x70
2e 01a6fe2c 00000000 ntdll!_RtlUserThreadStart+0x1b



Which shows us that pOldFont isn't NULL, but also isn't a valid C++ object. Usually, this is caused by the mismanagement of drawing objects selected into the DC ... or by the mismanagement of the DC itself.

I'm not able to reproduce the problem with the "Print summary report" checkbox marked in the print dialog. I am able to reproduce it with these settings:

[ ] Print Summary Report
[x] Print Award Credits Matrix
    [ ] Sort by column 2 (Full description)
    [x] Show Type Colors
[ ] Print Record Sheet from Template // disabled

And so I have a slightly different call stack (from VC++ in a debug build):


     HRDLogbook.exe!CGdiObject::GetSafeHandle() Line 68 C++
     HRDLogbook.exe!CDC::SelectObject(CFont * pFont=0x630a49d9) Line 264 C++
> HRDLogbook.exe!CAwards2View::DrawPageFrame(CDC * pDC=0x03efde94, CRect & rect={...}, const wchar_t * lpTitle=0x214fd260) Line 1364 C++
     HRDLogbook.exe!CAwards2View::PrintCreditReport(CDC * pDC=0x03efde94) Line 1618 C++
     HRDLogbook.exe!CAwards2View::OnFilePrint() Line 1283 C++
     HRDLogbook.exe!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x1be40c10, unsigned int nID=57607, int nCode=0, void (void) * pfn=0x00d3f824, void * pExtra=0x00000000, unsigned int nSig=58, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 77 C++
     HRDLogbook.exe!CCmdTarget::OnCmdMsg(unsigned int nID=57607, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 373 C++
     HRDLogbook.exe!CView::OnCmdMsg(unsigned int nID=57607, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 164 C++
     HRDLogbook.exe!CFrameWnd::OnCmdMsg(unsigned int nID=57607, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 980 C++
     HRDLogbook.exe!CWnd::OnCommand(unsigned int wParam=57607, long lParam=0) Line 2784 C++
     HRDLogbook.exe!CFrameWnd::OnCommand(unsigned int wParam=57607, long lParam=0) Line 384 C++
     HRDLogbook.exe!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=57607, long lParam=0, long * pResult=0x03efe6cc) Line 2108 C++
     HRDLogbook.exe!CXTPCommandBarsSiteBase<CMDIChildWnd>::OnWndMsg(unsigned int message=273, unsigned int wParam=57607, long lParam=0, long * pResult=0x03efe6cc) Line 191 C++
     HRDLogbook.exe!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=57607, long lParam=0) Line 2094 C++
     HRDLogbook.exe!AfxCallWndProc(CWnd * pWnd=0x1bef1620, HWND__ * hWnd=0x005819d4, unsigned int nMsg=273, unsigned int wParam=57607, long lParam=0) Line 282 C++
     HRDLogbook.exe!AfxWndProc(HWND__ * hWnd=0x005819d4, unsigned int nMsg=273, unsigned int wParam=57607, long lParam=0) Line 435 C++

    
Debugging this issue will be slow going, as the crash ends up freezing the Visual Studio debugger. Each iteration so far has required a hard reboot of my system.

K7ZCZ

2018-04-14 10:10

manager   ~0004820

fixed with this checkin
https://hrdsoftware.visualstudio.com/HRD/_versionControl/changeset/4053

Note that there are plenty of other bugs (some that even cause crashes) in this area of code. Only this specific issue is fixed with this checkin.

Issue History

Date Modified Username Field Change
2018-03-05 03:22 PD9FER New Issue
2018-04-13 10:23 WA9PIE Project 1 - Backlog => 3 - Current Dev List
2018-04-13 12:16 K7ZCZ File Added: MANTIS_ID-0002572HRDLogbook_20180305_091738.rar
2018-04-13 12:16 K7ZCZ Note Added: 0004818
2018-04-13 18:33 K7ZCZ Assigned To => K7ZCZ
2018-04-13 18:33 K7ZCZ Status new => assigned
2018-04-13 18:33 K7ZCZ Note Added: 0004819
2018-04-14 10:10 K7ZCZ Status assigned => resolved
2018-04-14 10:10 K7ZCZ Resolution open => fixed
2018-04-14 10:10 K7ZCZ Testing => Not Started
2018-04-14 10:10 K7ZCZ Note Added: 0004820
2018-04-14 10:23 K7ZCZ Relationship added related to 0002676
2018-04-16 09:55 K7ZCZ Relationship added has duplicate 0002319