1. 継武 董
  2. PowerBuilder
  3. Monday, 1 July 2019 05:26 AM UTC

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?

Attachments (1)
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 15:28 PM UTC
  2. PowerBuilder
  3. # 1

Hi;

   I see that your PB 6.5 application seems to be using the PFC. Many things have changed in the PFC framework v6.5 vs the current PFC v2017 release.  You should think about replacing your PFC layer (PBL) libraries with the PFC version that matches your PB 2017 version.

FYI: https://github.com/OpenSourcePFCLibraries

HTH

Regards ... Chris

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 23 July 2019 13:57 PM UTC
Hi;

FWIW: Probably a YIELD() command would work as well.

Regards ... Chris
  1. Helpful
  1. 継武 董
  2. Wednesday, 24 July 2019 02:45 AM UTC
Yes, YIELD() can also solve this problem, thank you Chris
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 24 July 2019 14:29 PM UTC
Thanks for the feedback on that alternative!

Yes, both commands create what we call a "hiccup wait" and allow other events in progress to complete first.
  1. Helpful
There are no comments made yet.
継武 董 Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 06:01 AM UTC
  2. PowerBuilder
  3. # 2

Thank you !

I found that lnv_platform will execute the 'of_PageSetupDlg' method in 'pfc_n_cst_platform'.

↓↓↓ of_PageSetupDlg   code↓↓↓

long ll_rc

ll_rc = OpenWithParm (w_pagesetup, astr_pagesetup)
if ll_rc > 0 then
   astr_pagesetup = message.PowerObjectParm
   if not astr_pagesetup.b_actiontaken then
      ll_rc = 0
   end if
end if
return ll_rc

Executing OpenWithParm() Opens the 'w_pagesetup' window and the program is not responding. Is the OpenWithParm method in PBVM170.DLL different from PB6.5?

Comment
  1. Roland Smith
  2. Tuesday, 2 July 2019 16:33 PM UTC
The function I am thinking of was removed from PBVM in version 9 or 10. The function name was PFC_PrintDlg.

You should take Chris' advice and update the base layer PBL files to the most recent version.

  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 1 July 2019 10:45 AM UTC
  2. PowerBuilder
  3. # 3

There was at one point an external function call into a function in pbvm###.dll and that was replaced with a regular script function. I think that may be your issue.

Comment
  1. 継武 董
  2. Tuesday, 2 July 2019 07:08 AM UTC
Sorry, I didn't reply to you because of my mistakes.My reply has become a new answer....
  1. Helpful
  1. 継武 董
  2. Thursday, 4 July 2019 07:06 AM UTC
Thank you Roland, I tried the Chris' advice and it failed.I can only temporarily not deal with this problem, it takes a lot of time
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.