1. David Haas
  2. PowerBuilder
  3. Monday, 6 May 2019 14:40 PM UTC

I have an app that I run in development.  I get to the 1st screen after logging in.  Whenever I go there(or further in app) and then close,  I get the Appeon PowerBuilder 2017 R3 has stopped working' and then I click the 'Close Program' button.

This is very annoying and appears to have increased in frequency since we upgrade from v11.5 to v2017.

Any suggestions on why this may be coming up so much and/or how to resolve.  Very tedious to re-open v2017 after every run of an application.

Thanks for any suggestions!!!!

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 6 May 2019 15:51 PM UTC
  2. PowerBuilder
  3. # 1

Hi David;

   When you execute the App from your PB IDE, the App is run as a "sub-task". If your App experiences any instability and in particular a crash. The MS-Window O/S escalates the problem to the main task which of course, is the IDE. Thus, if the sub-task crashes - the main task will likely as well. In 99% of the cases, its not a PB IDE stability issue - more in that it gets blamed for your App's demise and thus shutdown.

  The big question of course is why your App has this instability issue. If you build an EXE and run it .. does the App crash on close? If it does, does the System Error event fire so that the App can catch it? If not ... try running the EXE with a "/pbttrace" option and see if that point something peculiar happening at the point of closure.

Note: An unstable DB Client driver (or bad setting there) can also crash your PB App's prematurely as well.

Regards ... Chris

Comment
There are no comments made yet.
David Haas Accepted Answer Pending Moderation
  1. Monday, 6 May 2019 16:34 PM UTC
  2. PowerBuilder
  3. # 2

Thanks Chris!! What I had done to get to this issue is create a work PBL that is before all other PBLs in the app.  I created some new dwo's and have a current window that I moved to the work pbl to modify.  Once I run, go to this window and then close app,  I get the error.  All subsequent runs I get error even if I don't go as far as opening the window I'm modifying.

I tried taking the work PBL out of library list and still get error.  Now if I take the work PBL out, close PB and open PB back up, I don't get error (without work PBL).  So it is weird what is going on.

I need to go out and find documentation on /pbtrace as I very rarely used that...last time I did, I was following a document and couldn't get it to work.

On DB client driver, we use SQL Server.  Are you saying it could be a matter of just getting the most current driver and installing?

 

Comment
  1. David Haas
  2. Monday, 6 May 2019 17:46 PM UTC
Where does the trace file get created?
  1. Helpful
  1. David Haas
  2. Monday, 6 May 2019 18:15 PM UTC
It is weird to say the least but I think I got it so the error doesn't come up on close. I have current window I'm modifying and a brand new DWO used in the window. I created a datastore declared as instance var. Both these object are in same work PBL. before creating EXE to use trace on, I put a messagebox to get number of rows retrieved in the datastore. In IDE, it comes up with '4'. In the EXE, '-1'.



I changed this datastore to datawindow control. and I can't get the error to reproduce. Not to go into specifics, I'm at a loss as to why IDE crashed because of using datastore.







  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 6 May 2019 18:56 PM UTC
Hi David;

That certainly is a weird error situation I must say. I can say that I have never encountered that problem before - but, have heard that others have in the past.

FWIW: What I always do at the end of my DS processing is, as follows: ...

DS.Reset ()

DS.dataobject =""

Destroy DS

HTH

Regards ... Chris

  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 6 May 2019 23:21 PM UTC
  2. PowerBuilder
  3. # 3

I'm sure you have checked, but 1) has the new WORK PBL been added to the Library List, and 2) then a FULL BUILD been done on the application before starting the app?

Olan

Comment
There are no comments made yet.
Ricardo Colarina Accepted Answer Pending Moderation
  1. Tuesday, 7 May 2019 03:17 AM UTC
  2. PowerBuilder
  3. # 4

In my case, the IDE freezes when closing the application since PB 2017 R1.  The windows (apart from the frame window) closes when Esc is pressed and the issue seems to happen most often than not when I close multiple windows in quick succession by pressing Esc.  And when only the frame window remains, the IDE freezes after I close the application.  All the windows have got the usual clean up in the close event.  I also added the DS.Reset, DS.dataobject ="" and Destroy DS suggested by Chris, but still the same issue.  Since the deployed application works ok, I just put up with the issue.

Comment
There are no comments made yet.
David Haas Accepted Answer Pending Moderation
  1. Tuesday, 7 May 2019 13:04 PM UTC
  2. PowerBuilder
  3. # 5

Unfortunately now, the crash is occurring again.  I have done adding the work PBL to Lib list and doing a full build.  Tried a number of other things to no avail.

I could put up with it as it doesn't happen in EXE but is a royal pain having to re-open PB every time I run the app.  Very time consuming.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 7 May 2019 19:22 PM UTC
Hi David;

Just a random thought that cured a similar situation a few times for me in the past ... try creating a new Work.PBL from scratch. Do not try & reuse the old one.

HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
David Haas Accepted Answer Pending Moderation
  1. Thursday, 9 May 2019 16:59 PM UTC
  2. PowerBuilder
  3. # 6

Still having same issue.....I did the following so  far

  1. I made sure all datastores were destroyed
  2. Change to different app and then changed back to app having issue
  3. Tried pbtrace but couldn't find where the log file is placed from this.  Turned on debugger to see if there was a specific bit of code that was causing this.  Always hit the last line of code and after stepping off of that, IDE crashed
  4. Created new Work PBL, had that In Lib List and did a full rebuild
  5. Moved the Work PBL from 1st PBL in list to 2nd, behind PBL that has application and project objects.  Did full rebuid

I had varying degrees of success but none where the IDE crash stopped 100%.  In trying #4 & #5 above, it didn't crash on every closing of the app but crashed less frequently like after anywhere from 4 - 10 runs which at least kept me from pulling my hair out...but still an annoyance.

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 9 May 2019 17:19 PM UTC
Hi David;

The /PBDEBUG option trace will create an {ExeName}.DBG trace file in the same folder as your EXE.

HTH

Regards ... Chris
  1. Helpful
  1. Brad Mettee
  2. Friday, 10 May 2019 15:08 PM UTC
Chris - the only time he has problems is in the IDE. He's already said an executable doesn't have a problem.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 10 May 2019 15:48 PM UTC
He asked about the /PBTrace earlier. Yes, the problem now seems to be all centered around the IDE execution. :-(
  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.