cancel
Showing results for 
Search instead for 
Did you mean: 

Close window results in appcrash on remote server

0 Kudos

First, let's start with some basic information. We use PowerBuilder 12.5 (Classic) (build 5703) on our workstations with Windows 7. Our application runs great, no harm there.

We use a Windows 2012R2 server for our remote work, whenever we are not at the office, and our application crashes when we close a specific window. Only on that window. Closing other windows with the same technique (CloseWithReturn) works like you would expect.

Attached you will find a screenshot of the difference in pbdebug file (*.dbg) where the error occurred. On the left, the one form our workstation, thus working correct. On the right, the one from the remote server.

Also attached you see the error form the Windows event log and our setup for the remote server roles.

Hope you guys can help/point me in the right direction to fix this issue.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Erik;

   Have you tried ....

1) Full optimize on all your application's PBL's?

2) Restart PB IDE

3) Full build of your application's objects?

4) The redeploy your .EXE

Regards ... Chris

0 Kudos

Hi Chris,

We generate our PBL's through PowerGen, with a full bootstrap import from our SVN repository. During this process all PBL's are optimized and deployed as separate PBD's and EXE.

This issue does not concern the PB IDE, but our deployed Windows application.

Former Member
0 Kudos

The reason I ask about the PBL optimization is that the PB IDE does not delete classes in the PBL's but can create a new entry and leave the old class intact but marked for space reclamation. Sometimes, the IDE can pick an old marked for deletion copy of a compiled class when creating the EXE / PBD's. The optimization process ensures that this scenario does not happen. 

So now ... the issue becomes just that one window. I would now look at the following ...

1) Its ancestry & their behaviours

2) Any special User Events mapped & their processing

3) Review the code in the Close & CloseQuery events carefully.

Suggestion: Comment out all the code in this Window and see if it closes OK. Then start uncommenting the code until it fails. A bit of a PIA though, I must admit.

HTH

0 Kudos

The window is only inherited from the window object, so not much code to go through. The Close event is empty and the only line of code in the CloseQuery is "CloseWithReturn( this, "A" )".

0 Kudos

I think that's the issue. The CloseQuery is looping, because there is the statement to CloseWithReturn and thus going through the whole CloseQuery/Close train again and again.

I'm now building and deploying our application. I'll get back to you.

0 Kudos

Removing the "CloseWithReturn( this, "A" )" from the CloseQuery event was the solution.

Strange that W7 handles this differently than W2012R2 and that this issue never came up earlier.

Thank you all so much for your help!

Former Member
0 Kudos

Excellent news Erik! 

Have you hugged your DataWindow today? 

0 Kudos

Of course Chris, can't start the day without a good cup of coffee and hungging my DataWindow

Former Member
0 Kudos

A man after my own heart .... Have a great day!  

Former Member
0 Kudos

Fantastic news, I'll make a mental note of that one. Thanks

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Erik,

In the link it says:

Fault Module Name:  pbdwe125.dll

If this crash location is correct then it crashes in the datawindow engine.

Do you perhaps have a heavy datawindow on it or have a datawindow is still shared or have ole object in it?

Maybe you can set the datawindow object to empty string or give it a bit more time with some yields.
Set the Use Hwnd is no in the ini.

The two traces in the other link don't seem to quite match either.

Ben

Former Member
0 Kudos

Hi Ben;

  That is a good observation. This is always the way I end my Close of a Window class with DC/DS's involved ...

1)  DC/DS.Reset ( )

2)  DC/DS.DataObject = ""

3)  Destroy DS   // no need for DC

FWIW: The above code cleans up the DWO's buffers first and then forces the DWO to be unloaded completely before the control is destroyed. This creates an orderly shutdown of the DW processing instead of trying to let the PBVM/DWE handle it all in one destroy command.

HTH

Regards ... Chris

0 Kudos

I tried your options 1 and 2 on all datawindow objects in the Close event, but a similar error remains. The error on pbdwe125.dll changed to an error on pbvm125.dll.

Former Member
0 Kudos

A couple of questions:

1. Does it work on a Windows 8 PC?

2. If you the the application on the console of the Server not through RDP (Using VNC or something) does it still crash?

0 Kudos

Hi David,

1. We don't have a Windows 8 PC to test.

2. Yes it does crash when using a console session or a VNC-like connection.

Former Member
0 Kudos

My gut is telling me that this is an environment issue on server 2012. Have you tried running your application in compatibility mode?

0 Kudos

We tried numerous compatibility options but non of them seem to work.