1. Tracy Lamb
  2. PowerBuilder
  3. Tuesday, 9 November 2021 15:43 PM UTC

Hi Friends,

I'm getting a new error in my app.  I cleaned a few things up now it won't run at all :(  The application error I get is "Null Object Reference at line 1 of system error event".  As I drill into things, I see A problem with my nvo n_cst_btmanager, and possibly n_cst_hasp. 

I can't open n_cst_btmanager ... PB keeps saying I have regenerate it.  When I regenerate it, I get 2 errors, both the same...

---------- Compiler: Errors (10:28:43 AM)
bt10main.pbl(n_cst_btmanager).n_cst_btmanager.of_set_hasp.42: Error C0169: Autoinstantiated class illegal for create statement: n_cst_hasp
bt10main.pbl(n_cst_btmanager).n_cst_btmanager.of_set_hasp.47: Error C0169: Autoinstantiated class illegal for destroy statement: n_cst_hasp
---------- Finished Errors (10:28:43 AM)

n_cst_hasp is still in the library, and I can open it in PB.

I'm using PB Version 2019 R3 Build 2728.

TIA,

~~~Tracy

 

Accepted Answer
Tracy Lamb Accepted Answer Pending Moderation
  1. Tuesday, 9 November 2021 17:28 PM UTC
  2. PowerBuilder
  3. # Permalink

Thank you Roland Smith for replying, twice!

I fixed the problem.  It wasn't pretty, and I'm still not sure was the root cause was.  I had to remove all instances of "hasp" and variations thereof... properties, functions, events, etc.  I deleted references in all objects, ancestors and decendants.  

Wish I knew how to use Edit Source earlier, I used export, edit in notepad, import...  I could have done all of those edits right in PB. :(

~~~Tracy

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 9 November 2021 19:10 PM UTC
Hi Tracy ... If I recall correctly, I think that this was a bug from way back in the Sybase PB versions as well. :-(
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 9 November 2021 15:55 PM UTC
  2. PowerBuilder
  3. # 1

n_cst_btmanager.of_set_hasp has Create and Destroy statements for a local n_cst_hasp variable but n_cst_hasp is set to Autoinstantiate.

 

You either have to turn off Autoinstantiate in n_cst_hasp or open n_cst_btmanager in edit source mode and comment/remove the create/destroy lines.

Comment
  1. Roland Smith
  2. Tuesday, 9 November 2021 16:20 PM UTC
I would use edit source to comment out the lines it is complaining about until it compiles. Then open it in normal edit mode and uncomment.
  1. Helpful 1
  1. Tracy Lamb
  2. Tuesday, 9 November 2021 17:18 PM UTC
I didn't know about Edit Source... I exported objects, edited in notepad, then re-imported. Lol!
  1. Helpful
  1. Olan Knight
  2. Tuesday, 9 November 2021 21:31 PM UTC
Don't feel bad, a lot of us did that at first! :)
  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.