cancel
Showing results for 
Search instead for 
Did you mean: 

PB Classic to .NET migrated application: Null object reference error

Former Member
0 Kudos

Hello everyone,

We have an application in PB 12.5.2 Build 5583 and have migrated it from PB Classic to PB .NET. This is a PFC application.

After migration, we are getting 'Null object reference error' while trying to open a screen from the Menu. Other 2 screens from the same application opens fine. The error doesn't give much details and looks like -

System Error (pfc_systemerror)

Error Number 0.

Error test = Null object reference

Window/Menu/Object = .

Script = .

Line in Script = 0.

On debugging we see that the error seems to be somewhat related to Resize. The code goes multiple times through different Resize events like -

pfc_w_master.resize

pfc_w_frame.resize

pfc_n_cst_winsrv_statusbar.pfc_resize

pfc_u_dw.resize

Then at one point of time, the flow goes to systemerror event from the following code of pfc_w_master.resize event -

If IsValid (inv_preference) and This.windowstate = normal! then                     (--> goes to systemerror from here)

     inv_preference.Post of_setPosSize()

End If

Could you please help us to resolve this issue ?

thanks & regards,

Mazibar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mazibar.

In Wpf, you really don't need the resize service. Try working with wpf layouts. They are really powerfull. Also, what version of PFC are you using? In codeplex there was a separate PB.NET version of pfc's. Did you tried that release?

Andreas.

Former Member
0 Kudos

Hi Andreas,

Thank you very much for your inputs. This has actually helped me to resolve the issue.

PFC version is 8 - migrated over and over again. I am just couple of months into this project. May be soon we should think of upgrading PFC.

In my windows' pfc_preopen event, we had the following line:

This.changemenu(m_incd_type_sheet)

After commenting out this line, the null object reference error comes NO MORE.

What a relief !!!

thanks & regards,

Mazibar

Answers (0)