cancel
Showing results for 
Search instead for 
Did you mean: 

pb126- window hierarchy to complex? or a bug?

Former Member
0 Kudos

Hi,

we're developing our product on pb 12.6 Build 4035 - Classic. Now we have following problem:

We have a complex window hierarchy, where each level has a special kind of functionality and becoming more and more complex. On the highest level is a visual userobject. This got the instance var to the window. If the user does any task in the userobject we send over the instance var the actions to the window. Delevoping -> Saving -> Running is all okay. BUT after the deploy the function to the window ends up in a bad runtime reference. This error occurs in running out of powerbuilder (only after deploy) and running the exe (standalone). After a new save of our userobject, it's working again.

Our window hierachie:

vom lowest to highest level
wo_window ( simple window, basic functions, like a msgbox )
wo_uni (window has right system and more functions)
wo_sheet (window can communicate with database)
wo_tab (window has a tabpage )
wo_tab_obj ( object window, special functions, objects are items or address, highest level of hierarchy )
w_adr ( object window for adress )

on wo_tab_obj is our userobject.  => wo_tab_obj::open{ uo_blaettern_obj.event ue_set_ref( /*wo_tab_obj awo_tab_obj */ this ) }

->in the userobject the reference is stored in iwo_tab_obj

user starts action on the userobject and the code calls: iwo_tab_obj.get_obj().get_parameterart()

the function call get_obj() throws the exception bad runtime reference. get_obj() is declared at wo_tab_obj. So now we tried something and called function of lower hierarchy level. this is working (also after compiling, and running the exe).

the exception also appers at events, calling a event which is declared at wo_uni works.

So we think there's a bug inside the compiling process, or are we doing something wrong?

We won't recreate our window hierarchy, because it's perfect for our tasks, we need all of this levels.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kay;

    FWIW: your inheritance hierarchy is nothing extraordinary as I have more complicated ones that run well (not necessarily fast and/or efficient though <bg>).

   Can you tell us ...

1) Was this class structure working in a previous version of PB?

2) Is your compile P-Code or M-Code?

3) Are you compiling to a 32bit or 64bit EXE?

4) Are you compiled with Debug ON?

Regards ... Chris

Former Member
0 Kudos

H Chris,

1) Was this class structure working in a previous version of PB?  

  • no, this structure is new, new pb -> new structure for our product

2) Is your compile P-Code or M-Code?

  • P-Code

3) Are you compiling to a 32bit or 64bit EXE?

  • 32 bit

4) Are you compiled with Debug ON?

  • it's turned off
Former Member
0 Kudos

1) instead of concatenated functions ...  try putting them each on a separate line.

2) wrap each function call in an INVALID () check as well to make sure that you get a valid pointer on the "of_get_obj" especially.

3) try using the PB debugger & step INTO your method(s) that are failing to find out why.

4) you could also try the -PBDEBUG runtime switch.

Former Member
0 Kudos

1) instead of concatenated functions ...  try putting them each on a separate line.

  • already tried, same result

2) wrap each function call in an INVALID () check as well to make sure that you get a valid pointer on the "of_get_obj" especially.

  • valid checks throws also the exception in the isValid call => if isValid(iwo_tab_obj.get_obj()) throws bad runtime

3) try using the PB debugger & step INTO your method(s) that are failing to find out why.

  • tried without any results

4) you could also try the -PBDEBUG runtime switch.

  • already tried, same result

the only working solution we found was, to declare our functions or event on lower window levels, but thats no solution for us. we started a support ticket today, now we wait for an answer by sap.

Former Member
0 Kudos

Hi Kay;

  Sounds like opening a support ticket is the next best step. Hopefully, you can send SAP a simple little test application using that hierarchy that reproduces that problem.

Regards ... Chris

Former Member
0 Kudos

we found the problem....

In out window level wo_tab we found an undeclared event ( existing definition without a declation), this one seems to be the root of all evil...

But thanks for your help Chris.

Former Member
0 Kudos

Hi Kay;

  Glad that you found the issue!

Interesting that this problem did not show up as at least a warning during a Full Build.  😞

Regards ... Chris