fbpx
× Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET

Strange VO app delay on exit

More
6 months 1 week ago #1 by Stavros Spanos
Strange VO app delay on exit was created 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

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #2 by Terry Bourne
Replied by Terry Bourne on topic Strange VO app delay on exit
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

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago - 6 months 1 week ago #3 by Stavros Spanos
Replied by Stavros Spanos on topic Strange VO app delay on exit
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!
Last edit: 6 months 1 week ago by Stavros Spanos.

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago #4 by Terry Bourne
Replied by Terry Bourne on topic Strange VO app delay on exit
Only other thing I can think of is trying to disconnect ribbon twice.


Terry

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago #5 by Robert van der Hulst
Replied by Robert van der Hulst on topic Strange VO app delay on exit
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

XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago #6 by Stavros Spanos
Replied by Stavros Spanos on topic Strange VO app delay on exit
Robert thanks for the info!

Unfortunately we checked and have the latest version. 18.4.0

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago #7 by Stavros Spanos
Replied by Stavros Spanos on topic Strange VO app delay on exit

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...

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago #8 by Terry Bourne
Replied by Terry Bourne on topic Strange VO app delay on exit
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
The following user(s) said Thank You: Stavros Spanos

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago - 6 months 6 days ago #9 by Jamal
Replied by Jamal on topic Strange VO app delay on exit
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:
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
Last edit: 6 months 6 days ago by Jamal.
The following user(s) said Thank You: Stavros Spanos

Please Log in or Create an account to join the conversation.

More
6 months 6 days ago #10 by Meinhard Schnoor
Replied by Meinhard Schnoor on topic Strange VO app delay on exit
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
The following user(s) said Thank You: Stavros Spanos

Please Log in or Create an account to join the conversation.

More
5 months 4 weeks ago - 5 months 4 weeks ago #11 by Stavros Spanos
Replied by Stavros Spanos on topic Strange VO app delay on exit
Case closed - and thanks all for the contribution...

All tries to Quit() decently failed.
The real problem was the instantiation of a TWAIN OCX Global Object (scanner) that existed in the Start() method of the app. This in some way interfered with CJ Objects and the result was this really annoying hang when closing the app.

Obviously the auto call of GC when exiting lead to the problem.

It took us several days with this...
Last edit: 5 months 4 weeks ago by Stavros Spanos.

Please Log in or Create an account to join the conversation.