1. Berka Frenfert
  2. PowerBuilder
  3. Saturday, 22 June 2019 06:44 AM UTC

Some of the objects in a PBL (PowerBuilder library) cannot be exported, deleted, regenerated. And library itself cannot be optimized. Even those objects cannot be edited and neither their source is opened in editor.

I copied the original object from backup to replace the corrupt one but after that library painter shows me two objects of same type and name. One of them is corrupt and still cannot be deleted. The other i copied from backup is opened and deleted.

How to get rid of those corrupt objects from the library?

Attachments (4)
Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 22 June 2019 13:24 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Berks;

   I have only seen this s few times in all my dealings with PB applications. My personal suggestion would be to create a new PBL & then copy the good objects from the corrupted PBL to the new one. Then copy the missing ones to the new PBL from your backups.

Regards ... Chris

Comment
  1. Berka Frenfert
  2. Saturday, 22 June 2019 13:48 PM UTC
Yes Chris, that was the best option left. and i did it that way. Thank you.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 22 June 2019 14:24 PM UTC
That's super good news Berka!

I think that in some instances, PBL corruption occurs after a hard PB IDE crash where a "save" operation is underway. Also a PC crash or where the PBL's are on a network drive & the network "hiccups". It's a very, very low probability these things happen. Just bad timing in most cases IMHO.
  1. Helpful
  1. Sivaprakash BKR
  2. Monday, 24 June 2019 05:13 AM UTC
This happened to me in all versions of PB [ PB 6.5, PB 10.5, PB 11.5 & PB 2017R3]. In all such conditions, only backup saved my workings.

IMO, if it's related to hard disk issue, then this issue should have happened in every short time. Even though it got repeated in short time gap, a couple of times, in other occasions it happened rarely, say once in a year or so. This corruption happened in a very newer machine too, [ just 2 months old ]. Corruption happened even while working locally too. So it's really tough to judge the reason why this happens, in my experience.

  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Saturday, 22 June 2019 10:18 AM UTC
  2. PowerBuilder
  3. # 1

Seems your PBL file is in really bad condition. I recommend as follows

FIRST, rename broken PBL to "remove" it but keep it around in case you want to try to copy any content from the file.

SECOND, depending on your setup =>

  • "Old" style version control
    1. Delete the .PBG file
    2. Create new, empty PBL using original PBL name
    3. Perform Get-Latest for PBL
  • New "native" version control 
    1. Create new, empty PBL using original PBL name
    2. Perform "refresh" for full PBL
  • NO version control
    1. Get copy of PBL from colleague
  • NEITHER version control NOR colleagues
    1. Backup from before PBL broke? => Use it
    2. Not even backups? =>
      1. Start with new, empty PBL
      2. Copy DW objects from PBD (DWs are just strings).

NOW :: COPY your new healthy PBL as "easy access backup" in case next steps break your new PBL file so you need to restore to well-functioning state.

THEN :: IF you have newer edits in your broken PBL that you want to keep THEN you can try to copy them through export/import. Some may be unreachable. If any copied object ruins your new PBL then restore your new "copy backup" and repeat but skip code that broke your new, healthy PBL.

HTH /Michael

Comment
  1. Michael Kramer
  2. Saturday, 22 June 2019 13:20 PM UTC
There is *NO* easy way when PBL is utterly corrupted. You risk losing code for one or more objects. However, you might be able to obtain that source from source control or colleagues if you follow my recommendations. /M
  1. Helpful
  1. Berka Frenfert
  2. Saturday, 22 June 2019 13:44 PM UTC
Yes, backup is the last option. i use SVN so there is no chance of object level locking/corruption.



1- Made new Library

2- Picked good objetcs from the bad PBL and copied them to new PBL

3- Picked good copy of Bad Objects(identified as bad objects in BAD PBL) from backup and pasted in new PBL



That process worked because there was no recent changes in old PBL otherwise those changes were gone with bad objects.

Finally deleted old PBL.



BUT... what went wrong? do you have any idea?
  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.