GetAppObject():exec(EXECWHILEEVENT) replacement

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by rjpajaron »

Hello,

I am now in the "dig deep" testing phase and some long-running process crashes and consistently trace to GetAppObject():exec(EXECWHILEEVENT). When I remove this, it went well but until it finished, the whole app is non-responsive.

I am looking for replacement code for this that in .NET way.

I am reading the X# examples and other related stuff..

TIA,

Rene
User avatar
wriedmann
Posts: 3773
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by wriedmann »

Hi Rene,
the error don't stays in this method, and you cannot solve that in the .NET way if you are using the VO GUI classes.
This method only releases time to the OS if you have ling running processes, and an error here is caused by some other piece of code.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4951
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by Chris »

Hi Rene,

What is the error message you get when the app crashes?
And what is the app doing at that point, why did you need to have the call to Exec(EXECWHILEEVENT) in the VO code?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by TerryB1 »

Rene

It's been a long time since I looked at VO, but from memory this is what I would guess would happen if the event code was particularly long, or for some reason failed to return (release lock) on your program.


Suggest you look a little deeper into what the code is doing. A "net alternative" will go a little deeper than just a one for one swap.

If your program worked once, I suggest you get it back to working the same way before seeking out net alternatives.

Others here will be better qualified to advise.

Terry
Jamal
Posts: 322
Joined: Mon Jul 03, 2017 7:02 pm

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by Jamal »

Rene,

You can try:

Code: Select all

Application:DoEvents()
ic2
Posts: 1861
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by ic2 »

Hello Rene,

This is what I use (in C# but it won't be difficult to change it to X#) . It works well and is of course a lot easier and quicker than the more recommended way: using ASYNC calls to prevent an unresponsive UI. Although I actually do use ASYNC code in programs this turned out not to guarantee the required responsiveness while ProcessUITask, so far, always worked.

You will find the source & comments on http://stackoverflow.com/questions/8128 ... operations

public static void ProcessUITasks()
//
// When called, forces the UI to redraw.
{
DispatcherFrame frame = new DispatcherFrame();
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new DispatcherOperationCallback(delegate (object parameter) {
frame.Continue = false;
return null;
}), null);
Dispatcher.PushFrame(frame);
}


Dick
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by rjpajaron »

Hi Chris,

I wish there was a crash dump. App simply exited. I have DebugView running to see if X# go as usual other crashes I experience but this problem? No crash dump at all.

I will experiment more and also excited to get the 2.6a soon. See my reply to Wolfgang.

Here, we are seeing a code that was written (by me) for the last 20 years. When I see a EXEWHILEEVENT here and there, I do not question my "sanity" LOL why it was there. Well, VO apps works. I keep moving forward pretending that what I did yesterday is all good, until X# see my fault, ouch. Yes, 30 days with nothing but VS 2019 + X#. I am getting expertise level higher now, so I thought. I have a lot to learn when I read a lot of post here about Asynchronous programming. I got to improve this code. If it crashes, this part and others not, then, there a lot wrong on this app. I keep the positivity side that what you guys doing is all good as it speaks for itself on the X# product. Lots of wrinkle such as absence of IntelliSense and other nice things C# can do but "hey, this what VO did but much better way". and the Golden Banner of Shame as what Robert told me about when VS detected X# is slowing down. Maybe I need an 8core/32 GB memory/fastest SSD laptop.

Happy hunting....
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by rjpajaron »

Hi Terry,

Lucky you. I got stuck in VO with this huge apps (our mission critical apps). I refused to move to Vn and X# for some reason. I do not question my decision, only what I am doing today is all good. and it bite me hard. I still have VO rock solid. I will keep releasing on it for next few months or worst, years until this X# app replacement is all good as I advertise to my customers.

This app uses the same classes that other several apps are using and none of it experience any crashes at all but this. That is the clue that something wrong with architecture of this app. Good thing: I am the one who wrote it. Bad part, I have tight ship. I need to do this fast.

--

Rene
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by rjpajaron »

Hi Jamal,

I am still in VO GUI classes, hence the use of class App. Checking on X# docs, there is no DoEvents() method. Or I am missing something.

--

Rene
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

GetAppObject():exec(EXECWHILEEVENT) replacement

Post by rjpajaron »

Hi Dick,

This is what I said a while back, I though I am already an expert,,,, I will try to convert this to X#. and thanks for the StackOverflow link.

One thought, I am still one-foot on the VO GUI classes in X#.

--

Rene
Post Reply