Error - crash open Pdf file

Error - crash open Pdf file

Postby Silvio.Falconi » Sat Mar 23, 2019 10:47 am

I have a list of pdf for a workshop manual of a car and I create a small dialog with a index

Image

then to open a pdf file I use the test pdf.prg ( fwh\sample\)

oBrowse:bRClicked := {|nRow,nCol| ReadFilePdf(oBrowse:aArrayData[oBrowse:narrayat][2],;
oBrowse:aArrayData[oBrowse:narrayat][1]) }



Code: Select all  Expand view  RUN
Function ReadFilePdf(cFile,cTile)

   local oWnd, oActiveX
   Local cFolderFiles:="doc\"
   DEFINE WINDOW oWnd TITLE cTile

   oActiveX = TActiveX():New( oWnd, "
AcroPDF.PDF.1" )

   oWnd:oClient = oActiveX

   oActiveX:Do( "
LoadFile", cFolderFiles+cFile )
   oActiveX:Do( "
SetCurrentPage", 1 )

   ACTIVATE WINDOW oWnd

return nil


when it open the pdf it crash
Code: Select all  Expand view  RUN
Application Internal Error - C:\Work\Errori\WorkShop-Manual-Copen-Hgf\Indice.Exe
Terminated at: 2019-03-23 11:37:35
Unrecoverable error 6005: Exception error:

    Exception Code:C0000005 ACCESS_VIOLATION
    Exception Address:0043A959
    EAX:00000000  EBX:029D8400  ECX:0018EF68  EDX:00000000
    ESI:029E6AA0  EDI:0058207D  EBP:0018EF6C
    CS:EIP:0023:0043A959  SS:ESP:002B:0018EF40
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010246
    Exception Parameters: 00000000 00000000
    CS:EIP: 8B 10 FF 12 53 8B 4D FC 51 8B 01 FF 50 0C 8B 55
    SS:ESP: 00000000 00773120 0018EF68 00000000 029D8400 00000000 00000000 00000000 00000000 0043B33C 029D841C 0018EFA8 0043AD55 029D8400 0057ACC7 007786F8

    C stack:
    EIP:     EBP:       Frame: OldEBP, RetAddr, Params...
    0043A959 0018EF6C   0018EFA8 0043AD55 029D8400 0057ACC7 007786F8 0018FB08 0041E67B 0070BBCC 0018EF7C 0000000C
    0043AD55 0018EFA8   0018EFC4 004C40CC 00000054 00000000 00000000 00000000 00000000
    004C40CC 0018EFC4   0018F0D8 004BDED6 00000003 0057ACD5 00000000 0057A010 007786F8 00000001 0018EFCC 02E88B40
    004BDED6 0018F0D8   0018F0E8 00425005 00581F61 005814D0
    00425005 0018F0E8   0018F108 004C4289 007786F8 0000004D 00000000 00000000 00030010 0000004E
    004C4289 0018F108   0018F21C 004BDF94 00000002 0057ABB1 00000000 007786F8 006BA2EC 02E88D0C 02E88D0C 007786F8
    004BDF94 0018F21C   0018F22C 004014E5 0057AC7A 0057A000
    004014E5 0018F22C   0018F248 004C40CC 00000047 00000000 00000000 00000000 00000076
    004C40CC 0018F248   0018F35C 004BDED6 00000002 007786F8 FFFFFFFD 007D8444 00000000 006BC59C 00000007 0000000E
    004BDED6 0018F35C   0018F394 004C4445 0057ABA5 0057A000 0069A1BC 00000000 006917C8 004C4289 007786F8 00000042
    004C4445 0018F394   0018F4A8 004BDF94 00000004 006CE066 00000000 006BCA0C 021B1D5C 02E88924 02E88924 01230005
    004BDF94 0018F4A8   0018F4B8 00432460 0069A199 00691548
    00432460 0018F4B8   0018F4D8 004C4289 007786F8 00000039 00000000 008001E4 01440008 00000834
    004C4289 0018F4D8   0018F5EC 004BDF94 00000003 00000002 00000001 006BCA0C 00000001 00000000 00437905 01230006
    004BDF94 0018F5EC   0018F5FC 00434760 006CDD40 006B967C
    00434760 0018F5FC   0018F61C 004C417C 0042006A 00000034 00000000 008001E4 01440009 0000141D
    004C417C 0018F61C   0018F628 004C459D 007F0003
    004C459D 0018F628   0018F650 00439BCC 00000003 005B243B 00000000 005AE0E8 000486F8 0018F670 004C424A 007D81E4
    00439BCC 0018F650   0018F670 004C4289 007786F8 0000002E 00000000 008001E4 01230005 00000000
    004C4289 0018F670   0018F784 004BDF94 00000003 006DCD67 00000000 006BEEDC 021B1D5C 02E88924 02E88924 00000000


Modules:
00400000 003A7000 C:\Work\Errori\WorkShop-Manual-Copen-Hgf\Indice.Exe
77A20000 00180000 C:\Windows\SysWOW64\ntdll.dll
76C80000 00110000 C:\Windows\syswow64\kernel32.dll
76540000 00047000 C:\Windows\syswow64\KERNELBASE.dll
76730000 000A0000 C:\Windows\syswow64\ADVAPI32.DLL
76A10000 000AC000 C:\Windows\syswow64\msvcrt.dll
755F0000 00019000 C:\Windows\SysWOW64\sechost.dll
76AC0000 000F0000 C:\Windows\syswow64\RPCRT4.dll
75100000 00060000 C:\Windows\syswow64\SspiCli.dll
750F0000 0000C000 C:\Windows\syswow64\CRYPTBASE.dll
70B30000 00012000 C:\Windows\system32\MPR.DLL
70B80000 00009000 C:\Windows\system32\VERSION.DLL
709E0000 00051000 C:\Windows\system32\WINSPOOL.DRV
76F30000 00090000 C:\Windows\syswow64\GDI32.dll
76D90000 00100000 C:\Windows\syswow64\USER32.dll
764A0000 0000A000 C:\Windows\syswow64\LPK.dll
75380000 0009D000 C:\Windows\syswow64\USP10.dll
70A40000 00084000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\COMCTL32.DLL
76300000 0007B000 C:\Windows\syswow64\COMDLG32.DLL
76270000 00057000 C:\Windows\syswow64\SHLWAPI.dll
75620000 00C4A000 C:\Windows\syswow64\SHELL32.dll
74600000 00005000 C:\Windows\system32\MSIMG32.DLL
6EA00000 00032000 C:\Windows\system32\WINMM.DLL
768B0000 0015C000 C:\Windows\syswow64\OLE32.DLL
752F0000 0008F000 C:\Windows\syswow64\OLEAUT32.DLL
6CAE0000 0001C000 C:\Windows\system32\OLEDLG.DLL
74700000 00190000 C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_72d273598668a06b\GDIPLUS.DLL
76590000 00060000 C:\Windows\system32\IMM32.DLL
76BB0000 000CC000 C:\Windows\syswow64\MSCTF.dll
736A0000 00091000 C:\Windows\SysWOW64\tmumh\20019\AddOn\7.0.0.1162\TmUmEvt.dll
75610000 00005000 C:\Windows\syswow64\PSAPI.DLL
735A0000 000F2000 C:\Windows\SysWOW64\tmumh\20019\TmMon\2.5.0.2084\tmmon.dll
74B00000 00080000 C:\Windows\system32\uxtheme.dll
74A80000 00013000 C:\Windows\system32\dwmapi.dll
6F150000 0019E000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.DLL
764B0000 00083000 C:\Windows\syswow64\CLBCatQ.DLL
70D80000 00016000 C:\Windows\system32\CRYPTSP.dll
70D40000 0003B000 C:\Windows\system32\rsaenh.dll
70D30000 0000E000 C:\Windows\system32\RpcRtRemote.dll

Called from CREATEACTIVEX(0)
Called from TACTIVEX:NEW(78) in .\source\classes\ACTIVEX.PRG
Called from READFILEPDF(118) in Indice.prg
Called from (b)TEST(84) in Indice.prg
Called from TCONTROL:RBUTTONDOWN(2100) in .\source\classes\WINDOW.PRG
Called from TXBROWSE:RBUTTONDOWN(5149) in .\source\classes\XBROWSE.PRG
Called from TWINDOW:HANDLEEVENT(0)
Called from TCONTROL:HANDLEEVENT(1801) in .\source\classes\CONTROL.PRG
Called from TXBROWSE:HANDLEEVENT(11123) in .\source\classes\XBROWSE.PRG
Called from _FWH(3541) in .\source\classes\WINDOW.PRG
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(304) in .\source\classes\DIALOG.PRG
Called from TEST(102) in Indice.prg
------------------------------------------------------------------------
Application Internal Error - C:\Work\Errori\WorkShop-Manual-Copen-Hgf\Indice.Exe
Terminated at: 2019-03-23 11:37:53
Unrecoverable error 6005: Exception error:

    Exception Code:C0000005 ACCESS_VIOLATION
    Exception Address:0043A959
    EAX:00000000  EBX:029D8400  ECX:0018EF68  EDX:00000000
    ESI:029E6AA0  EDI:0058207D  EBP:0018EF6C
    CS:EIP:0023:0043A959  SS:ESP:002B:0018EF40
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010246
    Exception Parameters: 00000000 00000000
    CS:EIP: 8B 10 FF 12 53 8B 4D FC 51 8B 01 FF 50 0C 8B 55
    SS:ESP: 00000000 00773120 0018EF68 00000000 029D8400 00000000 00000000 00000000 00000000 0043B33C 029D841C 0018EFA8 0043AD55 029D8400 0057ACC7 007786F8

    C stack:
    EIP:     EBP:       Frame: OldEBP, RetAddr, Params...
    0043A959 0018EF6C   0018EFA8 0043AD55 029D8400 0057ACC7 007786F8 0018FB08 0041E67B 0070BBCC 0018EF7C 0000000C
    0043AD55 0018EFA8   0018EFC4 004C40CC 00000054 00000000 00000000 00000000 00000000
    004C40CC 0018EFC4   0018F0D8 004BDED6 00000003 0057ACD5 00000000 0057A010 007786F8 00000001 0018EFCC 02E7BB28
    004BDED6 0018F0D8   0018F0E8 00425005 00581F61 005814D0
    00425005 0018F0E8   0018F108 004C4289 007786F8 0000004D 00000000 00000000 00030010 0000004E
    004C4289 0018F108   0018F21C 004BDF94 00000002 0057ABB1 00000000 007786F8 006BA2EC 02E7BCB4 02E7BCB4 007786F8
    004BDF94 0018F21C   0018F22C 004014E5 0057AC7A 0057A000
    004014E5 0018F22C   0018F248 004C40CC 00000047 00000000 00000000 00000000 00000076
    004C40CC 0018F248   0018F35C 004BDED6 00000002 007786F8 FFFFFFFD 0220844C 00000000 006BC59C 0018F290 0018F280
    004BDED6 0018F35C   0018F394 004C4445 0057ABA5 0057A000 0069A1BC 00000000 006917C8 004C4289 007786F8 00000042
    004C4445 0018F394   0018F4A8 004BDF94 00000004 006CE066 00000000 006BCA0C 022B1A5C 02E78794 02E78794 01230005
    004BDF94 0018F4A8   0018F4B8 00432460 0069A199 00691548
    00432460 0018F4B8   0018F4D8 004C4289 007786F8 00000039 00000000 02230204 01440008 00000834
    004C4289 0018F4D8   0018F5EC 004BDF94 00000003 00000002 00000001 006BCA0C 00000001 00000000 00437905 01230006
    004BDF94 0018F5EC   0018F5FC 00434760 006CDD40 006B967C
    00434760 0018F5FC   0018F61C 004C417C 00B90059 00000034 00000000 02230204 01440009 0000141D
    004C417C 0018F61C   0018F628 004C459D 02220003
    004C459D 0018F628   0018F650 00439BCC 00000003 005B243B 00000000 005AE0E8 000486F8 0018F670 004C424A 022081EC
    00439BCC 0018F650   0018F670 004C4289 007786F8 0000002E 00000000 02230204 01230005 00000000
    004C4289 0018F670   0018F784 004BDF94 00000003 006DCD67 00000000 006BEEDC 022B1A5C 02E78794 02E78794 00000000


Modules:
00400000 003A7000 C:\Work\Errori\WorkShop-Manual-Copen-Hgf\Indice.Exe
77A20000 00180000 C:\Windows\SysWOW64\ntdll.dll
76C80000 00110000 C:\Windows\syswow64\kernel32.dll
76540000 00047000 C:\Windows\syswow64\KERNELBASE.dll
76730000 000A0000 C:\Windows\syswow64\ADVAPI32.DLL
76A10000 000AC000 C:\Windows\syswow64\msvcrt.dll
755F0000 00019000 C:\Windows\SysWOW64\sechost.dll
76AC0000 000F0000 C:\Windows\syswow64\RPCRT4.dll
75100000 00060000 C:\Windows\syswow64\SspiCli.dll
750F0000 0000C000 C:\Windows\syswow64\CRYPTBASE.dll
70B30000 00012000 C:\Windows\system32\MPR.DLL
70B80000 00009000 C:\Windows\system32\VERSION.DLL
709E0000 00051000 C:\Windows\system32\WINSPOOL.DRV
76F30000 00090000 C:\Windows\syswow64\GDI32.dll
76D90000 00100000 C:\Windows\syswow64\USER32.dll
764A0000 0000A000 C:\Windows\syswow64\LPK.dll
75380000 0009D000 C:\Windows\syswow64\USP10.dll
70A40000 00084000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\COMCTL32.DLL
76300000 0007B000 C:\Windows\syswow64\COMDLG32.DLL
76270000 00057000 C:\Windows\syswow64\SHLWAPI.dll
75620000 00C4A000 C:\Windows\syswow64\SHELL32.dll
74600000 00005000 C:\Windows\system32\MSIMG32.DLL
6EA00000 00032000 C:\Windows\system32\WINMM.DLL
768B0000 0015C000 C:\Windows\syswow64\OLE32.DLL
752F0000 0008F000 C:\Windows\syswow64\OLEAUT32.DLL
6E900000 0001C000 C:\Windows\system32\OLEDLG.DLL
74700000 00190000 C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_72d273598668a06b\GDIPLUS.DLL
76590000 00060000 C:\Windows\system32\IMM32.DLL
76BB0000 000CC000 C:\Windows\syswow64\MSCTF.dll
736A0000 00091000 C:\Windows\SysWOW64\tmumh\20019\AddOn\7.0.0.1162\TmUmEvt.dll
75610000 00005000 C:\Windows\syswow64\PSAPI.DLL
735A0000 000F2000 C:\Windows\SysWOW64\tmumh\20019\TmMon\2.5.0.2084\tmmon.dll
74B00000 00080000 C:\Windows\system32\uxtheme.dll
74A80000 00013000 C:\Windows\system32\dwmapi.dll
6F150000 0019E000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.DLL
764B0000 00083000 C:\Windows\syswow64\CLBCatQ.DLL
70D80000 00016000 C:\Windows\system32\CRYPTSP.dll
70D40000 0003B000 C:\Windows\system32\rsaenh.dll
70D30000 0000E000 C:\Windows\system32\RpcRtRemote.dll

Called from CREATEACTIVEX(0)
Called from TACTIVEX:NEW(78) in .\source\classes\ACTIVEX.PRG
Called from READFILEPDF(118) in Indice.prg
Called from (b)TEST(84) in Indice.prg
Called from TCONTROL:RBUTTONDOWN(2100) in .\source\classes\WINDOW.PRG
Called from TXBROWSE:RBUTTONDOWN(5149) in .\source\classes\XBROWSE.PRG
Called from TWINDOW:HANDLEEVENT(0)
Called from TCONTROL:HANDLEEVENT(1801) in .\source\classes\CONTROL.PRG
Called from TXBROWSE:HANDLEEVENT(11123) in .\source\classes\XBROWSE.PRG
Called from _FWH(3541) in .\source\classes\WINDOW.PRG
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(304) in .\source\classes\DIALOG.PRG
Called from TEST(102) in Indice.prg
------------------------------------------------------------------------
 




why ?



for now I resolve with
oBrowse:bRClicked := {|nRow,nCol| ShellExecute( IfNil( oDlg:hWnd, GetWndDefault() ), "open",cFolderFiles+oBrowse:aArrayData[oBrowse:narrayat][2])}


But I wish open the pdf in a dialog
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 42 guests