I am experiencing a very weird problem
There are certain web pages in my application that i cannot instantiate.
The compiler doesn’t flag any errors.
The program just stuck at the instruction and would never move to the next line.
The line is as below:
Session.thisMainPage = new wpMainPage
Xojo would stuck at that line and wont move to the next instruction.
If i replace any other page, it would work ok.
But i dont see any error and my debugger wont go into the web page
Can anybody point to any kind of mistake?
This actually has happened even in XOJO 2023 R3
Do you have something in the WepPage.Opening event that could be hanging or creating a circular stack? Xojo is supposed to catch StackOverflowException but that would be my first guess.
Well if nothing in your code changed from R2 to R3/R4 you could submit a ticket and attach your project privately for Xojo to review. Anything we can offer here without a project to work with is going to be a guess.
For example, in my Web app, the login sequence is much simpler:
WebPage wLoginWindow
sub DoSuccessfulLogin()
// this function is called when the user has successfully logged in with a valid username/password:
wMainWindow.show // open the new window
self.close // close the login screen
end sub
I did all that in desperation to see how that can be resolved. Trust me its not that messy previously.
In the end, what i found out:
The same program that run well in 2023 R2 ( from login in landing page to main page instantly )
Will take a few minutes ( in compiled mode ) to move from login in landing page to the main page.
It will take a lot longer in debug mode and stuck for a few minutes at instancing the main page (wpMainPage).
I ll prepare and submit ticket to issues later as this program is quite large and have a number of resources.
Instead of doing new WebDialog how about just dragging an instance of the custom WebDialog to the WebPage and then just call WebDialog1.Show – it should be functionally equivalent, and if it works it may help you narrow down the bug.
I resorted to recreating a new landing page altogether.
I suspect it might have something to do with moving this page from the previous version.
So far everything now works acceptable ( still slow, but not as slow as before ).