xsharp.eu • Strange VO app delay on exit
Page 1 of 2

Strange VO app delay on exit

Posted: Sun Jul 15, 2018 12:22 pm
by Stavros Spanos
Hi all!

I'm struggling several days with this...

We have a rather huge VO 2.8 CRM application that is working ok for years. Like Arne we also hope sometime we see it in xsharp, but until then... :-)

This app delivers several CRM products (for real estate, lawyers, support teams etc.) depending on certain settings.

Last year we did a major interface upgrade based on Codejock Ribbon bar suite.

We released this like a month ago and all goes well EXCEPT...

One of the products has a significant delay on closing, results in 5333 or hangs if we use QUIT, or just delays if we use oApp:Quit().

- Same code turning off Codejock interface (we use a parameter for this) , works fine.
- Same code with Codejock enabled but for all other products works, and quits like a charm.

We dont seem to do anything special in this product (just some custom menus and ribbons based on this product).

Any ideas appreciated...

Stavros

Strange VO app delay on exit

Posted: Sun Jul 15, 2018 1:39 pm
by Terry
Hi Stavros.
I have no knowledge of any of this - but could it have anything to do with the order in which you're linking things up to the ribbon?

Sorry if it's a daft idea.

Terry

Strange VO app delay on exit

Posted: Sun Jul 15, 2018 1:47 pm
by Stavros Spanos
Doesnt seem so unfortunately. The only difference is several if/then/elses leading to different menus about every product.

I even assigned NULL_OBJECT to CJ Object calling Collectforced() afterwards - and prior to QUIT. The result was the same ; 2-3 annoying seconds not trapable by the debugger as the are after the final QUIT...

Thanks!

Strange VO app delay on exit

Posted: Sun Jul 15, 2018 4:53 pm
by Terry
Only other thing I can think of is trying to disconnect ribbon twice.


Terry

Strange VO app delay on exit

Posted: Mon Jul 16, 2018 6:45 am
by robert
Stavros,
In one of my customers' projects we had similar problems with CodeJock. We switched to a newer version of the OCX and the problem was gone.

Robert

Strange VO app delay on exit

Posted: Mon Jul 16, 2018 11:26 am
by Stavros Spanos
Robert thanks for the info!

Unfortunately we checked and have the latest version. 18.4.0

Strange VO app delay on exit

Posted: Mon Jul 16, 2018 11:27 am
by Stavros Spanos
Terry wrote:Only other thing I can think of is trying to disconnect ribbon twice.


Terry
Terry, what do you mean "disconnect" ? I don't see such a method/func/action...

Strange VO app delay on exit

Posted: Mon Jul 16, 2018 1:40 pm
by Terry
Hi Stavros

I meant that there may be some very subtle difference in the way you invoke your menus etc. leading to some being closed followed by further attempts to close the same thing again.

The delay would seem to indicate that the logic of the code is that it is trying to find something without success.

I am sorry I can't be more specific, but it's been a long time since I used VO and I've never used Codejock.

Terry

Strange VO app delay on exit

Posted: Mon Jul 16, 2018 2:53 pm
by Jamal
I don't use CodeJock, but most likely the app cannot clean up all the messages or hooks by CodeJock.
Instead of Quit() which calls Win32 PostQuitMessage(), try the following:

Code: Select all

local hWnd := oMainWindow:Handle() as PTR

 if (hWnd := oMainWindow:Handle()) != null_ptr	   
	       DestroyWindow(hWnd)
		// PostMessage(hWnd, WM_CLOSE, 0, 0)   // this works too
	      return self
endif
See what happens.

Jamal

Strange VO app delay on exit

Posted: Mon Jul 16, 2018 3:44 pm
by Meinhard
Hi Stavros,

as a long time user of the CodeJock OCX controls,I remember that there is a weird thing with timers. As far as I remember the Ribbon fires a timer event and this gave us all kind of trouble. So we added this to the dispatch method of the window which owns the OCX :

if oEvent:Message == WM_TIMER
if oEvent:wParam =6828
KillTimer( self:Handle() , oEvent:wParam )
endif
endif


HTH & Regards
Meinhard