1. Jeremy Vetter
  2. PowerBuilder
  3. Wednesday, 10 April 2024 14:37 PM UTC

I have a PowerBuilder app runs fine in production when compiled with 2019.  We are trying to move to 2022 but that app starts but after hitting a button in one of the windows it crashes.  We can resolve this by regenerating one of the objects.  After regeneration the application runs fine.  The issue is when I close the IDE and re-open it the broken state is back.

 

  1. Can someone tell me what happens with you select regenerate from the context menu?  Are there files changes and where are they changed at?  I have looked at timestamps and I don't see any changes.
  2. I have looked at the Event Viewer and it seems like a .Net error making me assume that some configuration is changed when running regenerate.  I have tried to enable Debugging but it slows that app to almost a stand still.  Since the debug was so slow I haven't seen any profiler information either.

Sorry for the lack of information but there isn't much available to help with this one.

 

I hope someone can help!!

Jeremy Vetter Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 05:31 AM UTC
  2. PowerBuilder
  3. # 1

I did a migrate and it didn't work or at least I don't think it worked.  Do you sometimes need to run migrate multiple times?  Also, will the IDE ever tell you that your code has been migrated and there is nothing else you need to do.  I ran the migration tool then went back to migrate again expecting it to say that I was already migrated but it didn't.

Comment
There are no comments made yet.
Jeremy Vetter Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 05:30 AM UTC
  2. PowerBuilder
  3. # 2

I did a migrate and it didn't work or at least I don't think it worked.  Do you sometimes need to run migrate multiple times?  Also, will the IDE ever tell you that your code has been migrated and there is nothing else you need to do.  I ran the migration tool then went back to migrate again expecting it to say that I was already migrated but it didn't.

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 11 April 2024 19:17 PM UTC
  2. PowerBuilder
  3. # 3

I've always done multiple full builds and optimize pbls in this scenario.  Migrate should also work but the full build + optimize has been my go to.  Have seen the behavior you mentioned at client sites when they didn't do that.

Comment
There are no comments made yet.
Jeremy Vetter Accepted Answer Pending Moderation
  1. Wednesday, 10 April 2024 18:35 PM UTC
  2. PowerBuilder
  3. # 4
  1. PB Version 2022 R3
    1. IDE R3 Build 3289
    2. Runtime 2022 R3 Build 3289
  2. Windows 10 Enterprise Version 22H2
  3. The DBMS is Oracle 10g
  4. Not sure about the client
  5. I am not a PB expert so how do I optimize the PBL libraries?
  6. A full build did succeed

 

I am curious though what does the regenerate command do and where are the changes located at?

 

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 10 April 2024 19:02 PM UTC
For #2 - Are you connecting to O10g using the "Oracle 10" DB Client?

=> (ie: SQLCA.DBMS = "O10" )

For #5 .. RMB each PBL and then select "Optimize" from the Pop-Up menu.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 10 April 2024 15:28 PM UTC
  2. PowerBuilder
  3. # 5

Hi Jeremy ;

  Can you tell us ...

  • Exact PB version & build that you are using
  • O/S version & build that you are using
  • DBMS version & build that you are using
  • DB Client that you are using to connect to your DBMS.
  • Did you optimize all your PBL libraries?
  • If you perform a Full Build, does it complete with no errors or warnings?

Regards ... Chris

Comment
  1. Jeremy Vetter
  2. Friday, 7 June 2024 16:37 PM UTC
feel I am explaining this incorrectly. The application will never run during a normal build. The team has tried numerous things even working with Appeon support and the issue was not resolved. The only way the application runs is if we right click a specific data window and select "show hierarchy". After doing that the application runs and will continue to run as long as we keep the IDE open. When we close the IDE and reopen the workspace the application crashes again and any changes that were done by "show hierarchy" are gone. We are using git and can make sure that we have a clean repo with no changes. Then run the command "show hierarchy" and check the git status and nothing has changed. That is why we are assuming the changes are made in memory.







I have looked in the EvenLog and the application is throwing a .Net Kernal exception. This exception can be caused by many different things but mostly related to .Net code reaching out to a WIN32 assembly. We have tried debugging the application but it doesn't crash in the same spot every time. That to me means it is some kind of pointer or memory leak or reference that is being lost. When we run the "show hierarchy" command it some how fixes this reference and then everything runs correctly.







We can not share our code so it makes it very hard to work through some of these issues on a community like this. I am hoping that someone in this community can help us move past this bug.







It would be great if someone could work with us to figure this out but I know that probably isn't possible. What we need to understand is what does "show hierarchy" do under the covers and why doesn't it save what it did after it does it.







Any ides or suggestions would be greatly appreciated!!
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 10 April 2024 15:15 PM UTC
  2. PowerBuilder
  3. # 6

you need to do a migrate (not just a regen) to go from an earlier to a newer version.  the migrate is basically a super regen - it does it a few times to get everything right.

 

 

Comment
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.