1. Sverre Tvedt
  2. PowerBuilder
  3. Friday, 02 November 2018

PB 2017 R3/ W10/build 1858

 

I have been using PB Classic from 10.5, all versions up to 12.6, when finally migrating to 2017 R3.

Alle versions have had exactly the same annoying problem. PB frequently crashes when manually closing the debugger, and PB has to be re-started.

I have one easily reproducible such case that behaves in exactly the same way in 12.6 and R3:

When posting a function call in the open event of a window object (so that the open event concludes first), the debugger will crash anywhere within the scope of that function, when manually stopping debugging at a breakpoint or any step further. Clearing of breakpoints has no effect on this, neither reset to default layout, as some have suggested. As soon as the function has completed, this behaviour disappears. There is no code after the function post in the open event.

Can we hope for some progress here?

 

regards,

sverre

· Dainis Accepted Answer Pending Moderation
0
Votes
Undo

I had tested one PFC Sheet Window and each time after stopping Debug PB2017R3 crashed ( Windows 10 Pro, 8Gb RAM). On Windows 7 pro, 16GB RAM, without any problem.

Comment
Hi Danis;

Did you replace your older PFC libraries with the PB2017 built ones from the PFC website?

Regards ... Chris
  1. Chris Pollach
  2. Saturday, 17 November 2018
No. Is this the reason? On Windows 7 is OK, Windows 10 crashes.
  1. · Dainis
  2. Sunday, 18 November 2018
It could be if the PFC version you have is quite old and was just migrated forward & forward over many PB releases. The PFC was open sourced in PB 10, the framework development was basically stalled. However, custodians of the PFC have "tweaked" it for bugs and in particular Unicode and SDK call alignment with newer MS-Windows releases (like W10).

The latter is the key part that might be affecting the stability of your App as the older PFC might not have the best W10 SDK external function declarations or calling usage.

The other thing that I found with the PFC stability can be the use of non-PFC objects in your Apps. Ideally, all of your App's concrete (working) objects should be inherited from the PFE classes. However, I have seem Apps where objects were inherited from the PFC layer or worse yet from the "System Class" area, that caused stability issues.

The big stability issue I have encountered, can just be an abuse of the PFC by the App in question. Either not handling the service instantion correctly, instantiaring in the wrong place (event), service over usage, instantiating the same service on the same object class more than once, etc as just examples I have found that led to App stability issues.

  1. Chris Pollach
  2. Sunday, 18 November 2018
There are no comments made yet.
  1. Saturday, 17 November 2018
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
1
Votes
Undo

Hi Sverre;

   If you have an simple reproducible test case, please open a Support Ticket for this issue.

Note:

  • Clearing the breakpoints and then resetting the layout in the debugger is a very good practice. It does force the IDE to completely let go of any previous break points.
  • Never close the debugger without "stopping" it first.
  • Debugging on the Activate/Deactivate, Get/Loose Focus events, Other Event, etc. can be tricky for the IDE's stability depending on what your code is doing. Sometimes, all you can do is get into these areas, locate your code problem and then stop the debugger. Otherwise a crash may occur after that. Especially where other Posted events or timers are occurring.

FWIW: I follow a regiment of little tips & tricks that make my debugging in PB very stable. In fact, I cannot remember the last time the debugger crashed on me. I think it was last Spring (seriously) and I debug some complex things every week. Especially with my frameworks.

BTW: I will be hosting two seminars at the Elevate2018 Conference on IDE and PowerScripting "Tips & Tricks" where I will also be covering complex debugging.

Regards ... Chris

 

Comment
Maybe I was a bit imprecise. I can debug and step through the entire scope of the function posted from the open event. It is when I stop the debugger using the stop button (or any other method) that the crash occurs. This has persisted through all versions from 10.5 in a period that our overall system has been subject to a massive restructuring.

I can endure this behaviour, and the workaround is to let the function complete before stopping the debugger. But in many instances one simply wants the debugger to stop right away, in place of let it go on ruining a DB data set or consume minutes of processing. During our transition to R3 I had to debug several such posted functions to locate some incompatibilities against 12.6 and I had to endure hundreds of crashes before it was resolved. Productivity is affected. There are other notorious debugger crash scenarios as well, for instance close to web service proxy function calls.



regards, sverre

  1. Sverre Tvedt
  2. Saturday, 3 November 2018
Definitely sounds reproducible and a possible carry over from the earlier PB 10.x days. If you can create a simple test case (I could not produce it), then please open up a support ticket for the Support & Engineering teams to look at.

  1. Chris Pollach
  2. Saturday, 3 November 2018
There are no comments made yet.
  1. Friday, 2 November 2018
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.