Recent

Author Topic: MessageDlg, showmessage - both crash after 2.0 update?!  (Read 1929 times)

JernejL

  • Jr. Member
  • **
  • Posts: 92
MessageDlg, showmessage - both crash after 2.0 update?!
« on: March 11, 2019, 09:39:45 pm »
This is on win32, and was working fine until i updated lazarus to 2.0, the project was converted from delphi in past, if that matters.
 
MessageDlg crash:
 
Code: Pascal  [Select][+][-]
  1. #0 SYSTEM_$$_SYSGETMEM_VAR$LONGWORD$$POINTER at :0
  2. #1 ?? at :0
  3. #2 INTFGRAPHICS$_$TLAZINTFIMAGE_$__$$_CREATEDATA at :0
  4. #3 INTFGRAPHICS$_$TLAZINTFIMAGE_$__$$_ENDUPDATE at :0
  5. #4 INTFGRAPHICS$_$TLAZINTFIMAGE_$__$$_SETDATADESCRIPTION$TRAWIMAGEDESCRIPTION at :0
  6. #5 WIN32WSIMGLIST$_$TWIN32WSCUSTOMIMAGELISTRESOLUTION_$__$$_DRAWTODC$crc39CDD667 at :0
  7. #6 WIN32WSBUTTONS$_$DRAWBITBTNIMAGE$TCUSTOMBITBTN$ANSISTRING_$$_DRAWBITMAP$TBUTTONSTATE$BOOLEAN$BOOLEAN at :0
  8. #7 WIN32WSBUTTONS_$$_DRAWBITBTNIMAGE$TCUSTOMBITBTN$ANSISTRING at :0
  9. #8 WIN32WSBUTTONS$_$TWIN32WSBITBTN_$__$$_SETBIDIMODE$TWINCONTROL$BOOLEAN$BOOLEAN$BOOLEAN at :0
  10. #9 CONTROLS$_$TWINCONTROL_$__$$_CREATEWND at :0
  11. #10 STDCTRLS$_$TCUSTOMBUTTON_$__$$_CREATEWND at :0
  12. #11 CONTROLS$_$TWINCONTROL_$__$$_CREATEHANDLE at :0
  13. #12 CONTROLS$_$TWINCONTROL_$__$$_HANDLENEEDED at :0
  14. #13 DIALOGS$_$TPROMPTDIALOG_$_LAYOUTDIALOG_$$_GETBUTTONSIZE$TBITBTN$$TPOINT at :0
  15. #14 DIALOGS$_$TPROMPTDIALOG_$__$$_LAYOUTDIALOG at :0
  16. #15 DIALOGS$_$TPROMPTDIALOG_$__$$_CREATEMESSAGEDIALOG$crcF15C7478 at :0
  17. #16 DIALOGS_$$_DEFAULTPROMPTDIALOG$crc54ED9B07 at :0
  18. #17 INTERFACEBASE$_$TWIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 at :0
  19. #18 WIN32INT$_$TWIN32WIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 at :0
  20. #19 LCLINTF_$$_PROMPTUSER$ANSISTRING$LONGINT$PLONGINT$LONGINT$LONGINT$LONGINT$$LONGINT at :0
  21. #20 DIALOGS_$$_MESSAGEDLG$ANSISTRING$TMSGDLGTYPE$TMSGDLGBUTTONS$LONGINT$$TMODALRESULT at :0
  22. #21 IMPORTSTREAMIMAGE(0x199f358, 0x1a3c308, false) at u_cared.pas:2201
  23. #22 IMPORTPIC(0x199f358, 0xe3e5724 'J:\AppBuilder\Delfi\Top D'..., false) at u_cared.pas:2399
  24. #23 LOADCARTGACLICK(0x199f358, 0x19b6bc8) at u_cared.pas:1311
  25. #24 CONTROLS$_$TCONTROL_$__$$_CLICK at :0
  26. #25 STDCTRLS$_$TBUTTONCONTROL_$__$$_CLICK at :0
  27. #26 STDCTRLS$_$TCUSTOMBUTTON_$__$$_CLICK at :0
  28. #27 BUTTONS$_$TCUSTOMBITBTN_$__$$_CLICK at :0
  29. #28 STDCTRLS$_$TBUTTONCONTROL_$__$$_WMDEFAULTCLICKED$TMESSAGE at :0
  30. #29 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
  31. #30 VMT_$STDCTRLS_$$_TBUTTONCONTROL at :0
  32. #31 ?? at :0
  33. #32 ?? at :0
  34. #33 CONTROLS$_$TWINCONTROL_$__$$_WNDPROC$TMESSAGE at :0
  35. #34 LCLMESSAGEGLUE_$$_DELIVERMESSAGE$TOBJECT$formal$$LONGINT at :0
  36. #35 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT at :0
  37. #36 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  38. #37 USER32!AddClipboardFormatListener at :0
  39. #38 USER32!CallWindowProcW at :0
  40. #39 USER32!CallWindowProcW at :0
  41. #40 USER32!IsRectEmpty at :0
  42. #41 ntdll!KiUserCallbackDispatcher at :0
  43. #42 ?? at :0
  44. #43 USER32!SendMessageW at :0
  45. #44 USER32!LoadCursorFromFileW at :0
  46. #45 USER32!LoadCursorFromFileW at :0
  47. #46 USER32!LoadCursorFromFileW at :0
  48. #47 USER32!LoadCursorFromFileW at :0
  49. #48 USER32!AddClipboardFormatListener at :0
  50. #49 USER32!CallWindowProcW at :0
  51. #50 USER32!CallWindowProcW at :0
  52. #51 WIN32INT_$$_CALLDEFAULTWINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  53. #52 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT at :0
  54. #53 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  55. #54 WIN32WSBUTTONS_$$_BITBTNWNDPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  56. #55 USER32!AddClipboardFormatListener at :0
  57. #56 USER32!CallWindowProcW at :0
  58. #57 USER32!DispatchMessageW at :0
  59. #58 USER32!DispatchMessageW at :0
  60. #59 WIN32INT$_$TWIN32WIDGETSET_$__$$_APPPROCESSMESSAGES at :0
  61. #60 FORMS$_$TAPPLICATION_$__$$_HANDLEMESSAGE at :0
  62. #61 FORMS$_$TAPPLICATION_$__$$_RUNLOOP at :0
  63. #62 INTERFACEBASE$_$TWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP at :0
  64. #63 FORMS$_$TAPPLICATION_$__$$_RUN at :0
  65. #64 main at CARED.DPR:21

Showmessage() crashes too:
 
Code: Pascal  [Select][+][-]
  1. #0 SYSTEM_$$_SYSGETMEM_FIXED$LONGWORD$$POINTER at :0
  2. #1 ?? at :0
  3. #2 LAZUTF8_$$_UTF16TOUTF8$UNICODESTRING$$ANSISTRING at :0
  4. #3 WIN32INT$_$TWIN32WIDGETSET_$__$$_GETOBJECT$LONGWORD$LONGINT$POINTER$$LONGINT at :0
  5. #4 WIN32INT$_$TWIN32WIDGETSET_$_INITSTOCKFONT$TOBJECT$TSTOCKFONT$$BOOLEAN_$$_ASSIGNDEFAULT at :0
  6. #5 WIN32INT$_$TWIN32WIDGETSET_$__$$_INITSTOCKFONT$TOBJECT$TSTOCKFONT$$BOOLEAN at :0
  7. #6 FORMS$_$TSCREEN_$__$$_GETSYSTEMFONT$$TFONT at :0
  8. #7 FORMS_$$_SCREENGETSYSTEMFONT$$LONGWORD at :0
  9. #8 GRAPHICS$_$TCANVAS_$__$$_TEXTRECT$TRECT$LONGINT$LONGINT$ANSISTRING$TTEXTSTYLE at :0
  10. #9 DIALOGS$_$TPROMPTDIALOG_$__$$_PAINT at :0
  11. #10 FORMS$_$TCUSTOMFORM_$__$$_PAINTWINDOW$LONGWORD at :0
  12. #11 CONTROLS$_$TWINCONTROL_$__$$_PAINTHANDLER$TLMPAINT at :0
  13. #12 CONTROLS$_$TWINCONTROL_$__$$_WMPAINT$TLMPAINT at :0
  14. #13 CONTROLS$_$TCUSTOMCONTROL_$__$$_WMPAINT$TLMPAINT at :0
  15. #14 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
  16. #15 VMT_$CONTROLS_$$_TCUSTOMCONTROL at :0
  17. #16 ?? at :0
  18. #17 ?? at :0
  19. #18 CONTROLS$_$TWINCONTROL_$__$$_WNDPROC$TMESSAGE at :0
  20. #19 FORMS$_$TCUSTOMFORM_$__$$_WNDPROC$TMESSAGE at :0
  21. #20 LCLMESSAGEGLUE_$$_DELIVERMESSAGE$TOBJECT$formal$$LONGINT at :0
  22. #21 WIN32INT$_$TWINDOWPROCHELPER_$__$$_SENDPAINTMESSAGE$LONGWORD at :0
  23. #22 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT at :0
  24. #23 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  25. #24 WIN32WSFORMS_$$_CUSTOMFORMWNDPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  26. #25 USER32!AddClipboardFormatListener at :0
  27. #26 USER32!CallWindowProcW at :0
  28. #27 USER32!CallWindowProcW at :0
  29. #28 USER32!IsRectEmpty at :0
  30. #29 ntdll!KiUserCallbackDispatcher at :0
  31. #30 ?? at :0
  32. #31 USER32!DispatchMessageW at :0
  33. #32 WIN32INT$_$TWIN32WIDGETSET_$__$$_APPPROCESSMESSAGES at :0
  34. #33 FORMS$_$TCUSTOMFORM_$__$$_SHOWMODAL$$LONGINT at :0
  35. #34 DIALOGS_$$_DEFAULTPROMPTDIALOG$crc54ED9B07 at :0
  36. #35 INTERFACEBASE$_$TWIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 at :0
  37. #36 WIN32INT$_$TWIN32WIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 at :0
  38. #37 LCLINTF_$$_PROMPTUSER$ANSISTRING$LONGINT$PLONGINT$LONGINT$LONGINT$LONGINT$$LONGINT at :0
  39. #38 LCLINTF_$$_PROMPTUSER$ANSISTRING$LONGINT$array_of_LONGINT$LONGINT$LONGINT$$LONGINT at :0
  40. #39 LCLINTF_$$_NOTIFYUSER$ANSISTRING$LONGINT at :0
  41. #40 DIALOGS_$$_SHOWMESSAGE$ANSISTRING at :0
  42. #41 IMPORTSTREAMIMAGE(0x13f2a0, 0x1dc2a8, false) at u_cared.pas:2199
  43. #42 IMPORTPIC(0x13f2a0, 0xe41cfcc 'J:\AppBuilder\Delfi\Top D'..., false) at u_cared.pas:2401
  44. #43 LOADCARTGACLICK(0x13f2a0, 0x156b10) at u_cared.pas:1311
  45. #44 CONTROLS$_$TCONTROL_$__$$_CLICK at :0
  46. #45 STDCTRLS$_$TBUTTONCONTROL_$__$$_CLICK at :0
  47. #46 STDCTRLS$_$TCUSTOMBUTTON_$__$$_CLICK at :0
  48. #47 BUTTONS$_$TCUSTOMBITBTN_$__$$_CLICK at :0
  49. #48 STDCTRLS$_$TBUTTONCONTROL_$__$$_WMDEFAULTCLICKED$TMESSAGE at :0
  50. #49 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
  51. #50 VMT_$STDCTRLS_$$_TBUTTONCONTROL at :0
  52. #51 ?? at :0
  53. #52 ?? at :0
  54. #53 CONTROLS$_$TWINCONTROL_$__$$_WNDPROC$TMESSAGE at :0
  55. #54 LCLMESSAGEGLUE_$$_DELIVERMESSAGE$TOBJECT$formal$$LONGINT at :0
  56. #55 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT at :0
  57. #56 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  58. #57 USER32!AddClipboardFormatListener at :0
  59. #58 USER32!CallWindowProcW at :0
  60. #59 USER32!CallWindowProcW at :0
  61. #60 USER32!IsRectEmpty at :0
  62. #61 ntdll!KiUserCallbackDispatcher at :0
  63. #62 ?? at :0
  64. #63 USER32!SendMessageW at :0
  65. #64 USER32!LoadCursorFromFileW at :0
  66. #65 USER32!LoadCursorFromFileW at :0
  67. #66 USER32!LoadCursorFromFileW at :0
  68. #67 USER32!LoadCursorFromFileW at :0
  69. #68 USER32!AddClipboardFormatListener at :0
  70. #69 USER32!CallWindowProcW at :0
  71. #70 USER32!CallWindowProcW at :0
  72. #71 WIN32INT_$$_CALLDEFAULTWINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  73. #72 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT at :0
  74. #73 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  75. #74 WIN32WSBUTTONS_$$_BITBTNWNDPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT at :0
  76. #75 USER32!AddClipboardFormatListener at :0
  77. #76 USER32!CallWindowProcW at :0
  78. #77 USER32!DispatchMessageW at :0
  79. #78 USER32!DispatchMessageW at :0
  80. #79 WIN32INT$_$TWIN32WIDGETSET_$__$$_APPPROCESSMESSAGES at :0
  81. #80 FORMS$_$TAPPLICATION_$__$$_HANDLEMESSAGE at :0
  82. #81 FORMS$_$TAPPLICATION_$__$$_RUNLOOP at :0
  83. #82 INTERFACEBASE$_$TWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP at :0
  84. #83 FORMS$_$TAPPLICATION_$__$$_RUN at :0
  85. #84 main at CARED.DPR:21
  86.  

I cannot explain this, it stopped working only in 1 project, and not in others..
 

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: MessageDlg, showmessage - both crash after 2.0 update?!
« Reply #1 on: March 14, 2019, 11:13:27 am »
Quote
#41 IMPORTSTREAMIMAGE(0x13f2a0, 0x1dc2a8, false) at u_cared.pas:2199
#42 IMPORTPIC(0x13f2a0, 0xe41cfcc 'J:\AppBuilder\Delfi\Top D'..., false) at u_cared.pas:2401

What kind of image are you loading/streaming? Make sure that it is in correct format (as in the stream).

JernejL

  • Jr. Member
  • **
  • Posts: 92
Re: MessageDlg, showmessage - both crash after 2.0 update?!
« Reply #2 on: March 26, 2019, 06:54:20 pm »
That image is loaded via vampyre library on my side and is not the cause of any issues, the crash happens in dialogs functions, and regardless from where i call them.
 
A simple call to showmessage('test') causes that crash - anywhere from my app.
 

JernejL

  • Jr. Member
  • **
  • Posts: 92
Re: MessageDlg, showmessage - both crash after 2.0 update?!
« Reply #3 on: May 12, 2019, 05:11:50 pm »
For the record, this was caused by not including dialogs and messages unit at correct place and / or order. As for why this broke after updating lazarus - i have no idea.
 

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: MessageDlg, showmessage - both crash after 2.0 update?!
« Reply #4 on: May 12, 2019, 05:27:18 pm »
What version of Lazarus were you running before, and what was the order that had to be changed with the units?
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018