1. Scott Gorke
  2. PowerBuilder
  3. Friday, 22 March 2019 19:08 PM UTC

Background: PB 12.1 build 6639 (lots of clients with legacy s/w) against MS SQL Server 2012 R2

Scenario:
* 2 app users
* same group, so same app access rights
* same PC, using same autologin/generic Windows account
* one user occasionally crashes on a null object reference, the other never does
* the user who crashes out of app restarts app, repeats the same crash steps, and does not crash

Any advice on diagnosing the problem is appreciated.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 22 March 2019 19:22 PM UTC
  2. PowerBuilder
  3. # 1

Hi Scott;

   What is/are the error(s) at the time of the crash (ie: MS-Windows Event logs)?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 2 April 2019 20:23 PM UTC
The "Null Object" error crash should be easy to find as PB fires the System Error event on your PB App's "Application" object class when anything like this happens. You will see that the System Error event arguments allow you to know the object, method, line number, cause, etc of the System Error.

The key point here is that the PB App codes the System Error event to trap & record the error (like a Null Object) so that the PB developer can then go straight to the faulting line of code and resolve the logic error. Which is typically, a pointer that has not been initialized for some reason.

In the worst case, the PB developers can place an IsValid() around the PowerScipt command that is getting the Null Object error in order to recover from the surrounding code that may not be doing its job correctly (ie such as a CREATE at the right time).

HTH
  1. Helpful
  1. Scott Gorke
  2. Wednesday, 24 April 2019 14:03 PM UTC
Chris, thanks. We have the PB app System Error message, but as stated, the System Error crash occurs when doing a specific set of steps, that are not reproducible when the user repeats the steps immediately after restarting our app. My latest question was about what errors in the Event Viewer we should look for. Any suggestion there?



Finally, thanks for the "worst case" suggestion, which I may need to code to get this client by.



Thanks for your help - it's an honor to get advice from you.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 24 April 2019 16:26 PM UTC
Hi Scott;

Since the error does not reoccur on a typical App restart, my guess would be that another process is doing a "Destroy" on a resource that the later executing PowerScript code is depending on (and thinks that its still there). Have a look at your "Destroy xxxx" commands for that resource that gets the Null Object error.

HTH

Regards ... Chris
  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.