6.5 upgrade to 2017, failed when opening w_pagesetup window and the program crashes. After investigation, I found that there was an error in executing of_PageSetupDlg here.
pfcmain--> pfc_u_dw--> pfc_pagesetupdlg
↓↓↓source code↓↓↓
// Open page setup dialog
f_setplatform (lnv_platform, true)
ll_rc = lnv_platform.of_PageSetupDlg (astr_pagesetup)
f_setplatform (lnv_platform, false)
The program crashes when executing 'll_rc = lnv_platform.of_PageSetupDlg (astr_pagesetup)', but it does not happen in PB6.5
I tried to add a 'messagebox("testmsg","of_PageSetupDlg")' in front of of_PageSetupDlg.
↓↓↓like this↓↓↓
// Open page setup dialog
f_setplatform (lnv_platform, true)
messagebox("testmsg","of_PageSetupDlg")
ll_rc = lnv_platform.of_PageSetupDlg (astr_pagesetup)
f_setplatform (lnv_platform, false)
After adding messagebox, w_pagesetup will open normally.In addition, when I use the debug mode to find the cause of the problem, the window can open normally.
This question makes me feel incredible,Is this because of the error caused by the focus?What should I do to resolve this error?
FWIW: Probably a YIELD() command would work as well.
Regards ... Chris
Yes, both commands create what we call a "hiccup wait" and allow other events in progress to complete first.