Page 3 of 6

Re: MSVS 2012

PostPosted: Mon May 20, 2013 6:54 am
by Richard Chidiak
Antonio,

I know exactly how it gpf's now.

If "inside" the activex you call a dialog , there is no problem whatever you do. The dialog is part of the control (child).

if you call a dialog from outside the control (buttonbar), then the gpf occurs. In other words hb_gcall() is not doing its job in this case.

Basically the only dialogs i call from the buttonbar are settings, a work around would be to remove them from the buttonbar and have them called somewhere else (menu ...etc) if we do not find a solution,

Hth

Richard

Re: MSVS 2012

PostPosted: Mon May 20, 2013 8:01 am
by Antonio Linares
Richard,

If "inside" the activex you call a dialog , there is no problem whatever you do. The dialog is part of the control (child)


Could you please explain that ? I don't understand exactly what you mean, thanks

Re: MSVS 2012

PostPosted: Mon May 20, 2013 8:08 am
by Richard Chidiak
Antonio

there is the main window (mdi) let us call it Ownd

Button bar Obar from Ownd holds buttons for different tasks , settings etc... This is where the problem comes from

2 Codejock components (date picker and calendar , left or right)

in the Codejock components, dialogs are invoked , there is no problem on them.

The problems come only from any dialog called from the buttons in obar , i hope i made it clear

If you still have the test.prg i sent you it is easy to explain, dialogs called from any button of obar will make it crash at second call

Richard

Re: MSVS 2012

PostPosted: Mon May 20, 2013 8:21 am
by Richard Chidiak
Antonio

an image explains it much better

[img]
http://cbati.com/planning1.png
[/img]

in this first image the dialog is obtained by dbl clicking on an appointment contained in the control

[img]
http://cbati.com/planning2.png
[/img]

in the second image the dialog is obtained from a button in the button bar , this is where the problem comes from

Re: MSVS 2012

PostPosted: Mon May 20, 2013 9:31 am
by Antonio Linares
Richard,

Ok, now I see what you mean. Thanks

Re: MSVS 2012

PostPosted: Mon May 20, 2013 9:40 am
by Antonio Linares
Richard,

I don't like this line:

::oCalexStdDlgs:Calendar = TOleAuto():New( ::oCalex:oOleAuto:__hObj )

maybe we should use:

::oCalexStdDlgs:Calendar = TOleAuto():New( ::oCalex )

In codejock docs, how to create such calendar ?

Re: MSVS 2012

PostPosted: Mon May 20, 2013 9:42 am
by Antonio Linares
Or simply:

::oCalexStdDlgs:Calendar = ::oCalex

Re: MSVS 2012

PostPosted: Mon May 20, 2013 10:04 am
by Richard Chidiak
Antonio

This is how it is defined with xharbour

::oCalexStdDlgs:Calendar( TOleAuto():New( ActXPdisp( ::oCalex:hActiveX ) ) )

it was replaced for harbour with

::oCalexStdDlgs:Calendar = TOleAuto():New( ::oCalex:oOleAuto:__hObj )

all the above suggestions do not work

Richard

Re: MSVS 2012

PostPosted: Mon May 20, 2013 12:04 pm
by Antonio Linares
Richars,

What error do you get if you do;

::oCalexStdDlgs:Calendar = ::oCalex

Re: MSVS 2012

PostPosted: Mon May 20, 2013 12:26 pm
by Richard Chidiak
Antonio

in this case, try catch error the message is displayed Manque composants dialogues Standard oerr ERROR

TRY
::oCalexStdDlgs := CreateObject( "Codejock.CalendarDialogs.15.0.2" )
//::oCalexStdDlgs:Calendar := TOleAuto():New( ::oCalex:oOleAuto:__hObj )
::oCalexStdDlgs:Calendar = ::oCalex

::oCalexStdDlgs:RemindersWindowShowInTaskBar = .t.
::oCalexStdDlgs:CreateRemindersWindow()
CATCH oErr
MsgInfo( "Manque composants dialogues Standard oerr " + cvaltochar(oerr))
END

Richard

Re: MSVS 2012

PostPosted: Mon May 20, 2013 1:01 pm
by Richard Chidiak
Antonio

This is not the offending part

I commented all the dtpicker part and the problem is still there

Is there a Harbour equivalent of xharbour hb_gcall(.t.) that forces garbage collector to do its job ?

I tried it but same result

Richard

Re: MSVS 2012

PostPosted: Mon May 20, 2013 1:56 pm
by Antonio Linares
Richard,

Please try this function:
Code: Select all  Expand view

#include <hbapi.h>

HB_FUNC( MYGCALL )
{
   hb_ret();

   hb_gcCollectAll( hb_pcount() < 1 || hb_parl( 1 ) );
}

 


and keep your function hb_gcAll() ; return nil

then after finishing with the ActiveX just call MyGcAll()

Re: MSVS 2012

PostPosted: Mon May 20, 2013 2:14 pm
by Richard Chidiak
Antonio

Still not good but the gpf does not occur on the same place.

It occurs on calling mygcall()

weird ....

is there any explanation for this Unrecoverable error 6005: Exception error: i know it is the type of errors that do not have much explanation, but maybe

Exception Code:C0000005
Exception Address:52F8558D
EAX:72A8C91C EBX:00000000 ECX:04075A50 EDX:00000000
ESI:00CAD5C8 EDI:00CAD7D0 EBP:00AFF178
CS:EIP:0023:52F8558D SS:ESP:002B:00AFF15C
DS:002B ES:002B FS:0053 GS:002B
Flags:00210206
CS:EIP:
SS:ESP: 72A7AAC5 0CBC2077 00CAD5C8 00CAD5C8 00AFF1A0 72AA8F48 00000005 00CAD7B0 03D7B35D 00000000 00CAD5C8 00AFF1E4 00CAD5D8 00000000 00CAD5C8 00CAD7B0

C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
52F8558D 00AFF178 00CAD7B0 03D7B35D 00000000 00CAD5C8 00AFF1E4 00CAD5D8 00000000 00CAD5C8 00CAD7B0 00CAD7D0
03D7B35D 00CAD7B0 03F13D24 03EF6834 00000000 00000011 00000000 00000000 00000000 0000000A 03EF6834 00000000


Modules:
0x00170000 0x00809000 C:\CBATI32\CBATIWIN.exe
0x775D0000 0x00157000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x76F70000 0x00130000 C:\WINDOWS\SYSTEM32\KERNEL32.DLL
0x76EC0000 0x000A6000 C:\WINDOWS\SYSTEM32\KERNELBASE.dll
0x72C00000 0x000A7000 C:\WINDOWS\system32\apphelp.dll
0x56E50000 0x00244000 C:\WINDOWS\AppPatch\AcGenral.DLL
0x75100000 0x000B1000 C:\WINDOWS\SYSTEM32\msvcrt.dll
0x74DF0000 0x00034000 C:\WINDOWS\SYSTEM32\sechost.dll
0x74BF0000 0x0001C000 C:\WINDOWS\SYSTEM32\SspiCli.dll
0x773B0000 0x00040000 C:\WINDOWS\SYSTEM32\SHLWAPI.dll
0x72890000 0x00088000 C:\WINDOWS\SYSTEM32\UxTheme.dll
0x773F0000 0x00116000 C:\WINDOWS\SYSTEM32\USER32.dll
0x75500000 0x000FD000 C:\WINDOWS\SYSTEM32\GDI32.dll
0x72E90000 0x00021000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x73350000 0x00012000 C:\WINDOWS\SYSTEM32\samcli.dll
0x74C30000 0x00119000 C:\WINDOWS\SYSTEM32\ole32.dll
0x75470000 0x0008B000 C:\WINDOWS\SYSTEM32\OLEAUT32.dll
0x5FFD0000 0x00014000 C:\WINDOWS\SYSTEM32\MSACM32.dll
0x746B0000 0x00008000 C:\WINDOWS\SYSTEM32\VERSION.dll
0x759E0000 0x010C6000 C:\WINDOWS\SYSTEM32\SHELL32.dll
0x74800000 0x0001B000 C:\WINDOWS\SYSTEM32\USERENV.dll
0x72F20000 0x00019000 C:\WINDOWS\SYSTEM32\dwmapi.dll
0x75300000 0x0011F000 C:\WINDOWS\SYSTEM32\urlmon.dll
0x76BF0000 0x000AE000 C:\WINDOWS\SYSTEM32\ADVAPI32.dll
0x72EC0000 0x00060000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
0x6FDF0000 0x00013000 C:\WINDOWS\SYSTEM32\MPR.dll
0x74FA0000 0x000AC000 C:\WINDOWS\SYSTEM32\RPCRT4.dll
0x74BE0000 0x00009000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
0x72E60000 0x0002A000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll
0x751C0000 0x00136000 C:\WINDOWS\SYSTEM32\combase.dll
0x74510000 0x00011000 C:\WINDOWS\SYSTEM32\profapi.dll
0x76CC0000 0x001F8000 C:\WINDOWS\SYSTEM32\iertutil.dll
0x75600000 0x001B8000 C:\WINDOWS\SYSTEM32\WININET.dll
0x74B80000 0x00051000 C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll
0x74490000 0x00075000 C:\WINDOWS\SYSTEM32\SHCORE.DLL
0x76CA0000 0x00020000 C:\WINDOWS\system32\IMM32.DLL
0x76B00000 0x000DD000 C:\WINDOWS\SYSTEM32\MSCTF.dll
0x737E0000 0x001F8000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\COMCTL32.dll
0x770F0000 0x00089000 C:\WINDOWS\SYSTEM32\COMDLG32.dll
0x6FFA0000 0x00006000 C:\WINDOWS\SYSTEM32\MSIMG32.dll
0x64CE0000 0x0001D000 C:\WINDOWS\SYSTEM32\oledlg.dll
0x10000000 0x00200000 C:\CBATI32\freeimage.dll
0x757D0000 0x00074000 C:\WINDOWS\SYSTEM32\clbcatq.dll
0x03D70000 0x00296000 C:\PROGRA~2\CODEJO~1\ActiveX\XTREME~2.2\Bin\CODEJO~2.OCX
0x729C0000 0x00119000 C:\WINDOWS\SYSTEM32\MFC42.DLL
0x602A0000 0x00018000 C:\WINDOWS\SYSTEM32\OLEPRO32.DLL
0x72590000 0x000A1000 C:\WINDOWS\SYSTEM32\ODBC32.dll
0x65D90000 0x000A0000 C:\WINDOWS\SYSTEM32\sxs.dll
0x04150000 0x00007000 C:\CBATI32\Calendar.ResourceFr.dll
0x74540000 0x00163000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9200.16518_none_ba1cf6b7e09f1918\GdiPlus.dll

Called from MYGCALL(0)
Called from (b)MENUTEC(726) in C:\CBATI32\CBATITEC.PRG
Called from TMENU:COMMAND(461) in .\source\classes\MENU.PRG

Re: MSVS 2012

PostPosted: Mon May 20, 2013 2:19 pm
by Antonio Linares
Richard,

Same problem, gpf at GdiPlus:

0x74540000 0x00163000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9200.16518_none_ba1cf6b7e09f1918\GdiPlus.dll

Called from MYGCALL(0)

Re: MSVS 2012

PostPosted: Mon May 20, 2013 3:12 pm
by Antonio Linares
Richard,

Please change TActiveX with THActiveX in your code. Don't do anything with hb_gcAll() (remove our tests)

and let me know your results, thanks :-)