1. william yau
  2. PowerBuilder
  3. Tuesday, 14 December 2021 10:50 AM UTC

Hi Guru 

 

My program work in pb.70 as following statement, but upgrade to 2019 , it will be lead to program crushed, please advise

 

idw_report.SetSort(ls_keycolumn+" A")

idw_report.Sort()

 

 

David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Wednesday, 15 December 2021 15:08 PM UTC
  2. PowerBuilder
  3. # 1

Hi

I had a similar problem with PB12.5 and a PFC application just blewup when the user clicked on a column header to sort the DW. I did a lot of work with SAP on it to debug the problem, providing memory dumps etc. From their analysis they came back and said that the DW memory was corrupted somehow. Nothing to do with the PB code just a combination of DW design, data and the wind being in the wrong direction! (I added that last bit)

From what you said it does not crash in all cases, so I would recreate the datawindows that are a problem and see if it goes away :)

Hope that helps

David

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Tuesday, 14 December 2021 13:01 PM UTC
  2. PowerBuilder
  3. # 2

In addition to what Andreas said, you just say the app crashed.  Was there a message?  Is it crashing in the IDE or EXE or both?  Going from PB7 to 2019 you are moving to unicode is also something to consider.  Have you done a Full Build on the code?  Are you using any frameworks such as PFC?  If pfc, did you also migrate to the newest version of the pfc?  Did you check to make sure idw_report is not null?  Hopefully the try/catch will trap the error.  One client I had, we were getting multiple errors like this after converting from PB12 to 2017, but once we did a full build on the code, they went away.

 

Good luck,

Kevin

Comment
  1. william yau
  2. Wednesday, 15 December 2021 01:58 AM UTC
both IDE and exe are crashing, just close application without any message, i found datawindow meets sort(), deleterow() will be crushed, only for 3 datawindow have this problem, other datawindow is ok .
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 14 December 2021 11:01 AM UTC
  2. PowerBuilder
  3. # 3

Hi.

You provide little information. This particular commands cannot be the cause of your crash. As from PB 7 to PB 2019 there are changes in the order events are triggered, I would try to debug and see if idw_report is:

  1. Created when those command are executed.
  2. A dataobject was defined.
  3. The datawindow has issued a settransobject (if it is not an external datawindow).

Also, I would put 

idw_report.SetSort(ls_keycolumn+" A")
idw_report.Sort()

in a try catch block and would check if an error throws...

Andreas.

Comment
  1. william yau
  2. Wednesday, 15 December 2021 03:26 AM UTC
I use try and catch, but program is crush down did not leave any message, how can check the error
  1. Helpful
  1. Andreas Mykonios
  2. Wednesday, 15 December 2021 14:40 PM UTC
Did you tried to do a full build? What happens if you regenerate the datawindows? Another think that you can do is to optimize your pbls.

Also, you can check if idw_report is valid before running the commands where you estimate the issue is located.



Andreas.
  1. Helpful 1
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.