Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3827

App keeps running

$
0
0

Does anybody have some advice what I should be looking for with following symptoms:

  • The app keeps running when I close the last window from the window close button. The App.Close event trigger does not get activated. No window is visible anymore.
  • The app terminates correctly when I close it using the Exit entry in the main menu of the last window

Additional information:

  • Xojo 2024r1.1 on MX Linux 23.3 with Xfce
  • I am new to Linux, I have been developing this App on Windows, while others have taken care of the MacOS and Linux side of it
  • the app terminates correctly on Windows 8.1 (64-Bit), run with Xojo 2022r1.1 as a 32-Bit app
  • the app uses some features from API2 but most of it uses the original API. No Desktop… application, windows or controls are being used.
  • the window has a CancelClose event handler which returns False, and a Close event handler
  • the app has a no CancelClose event handler, but a Close event handler.
  • before the app hangs, the window’s CancelClose and Close events get triggered, but App.Close does not get triggered
  • App.WindowCount = 0 in MainWindow.Close
  • when I pause the application when it hangs, the debugger sais Eventloop in the Stack panel
  • I tried calling Quit from MainWindow.Close, both, with App.AutoQuit = True Or False, only to find out that this causes a real mess (the app segfaults)
  • I could not replicate the error with a test application, neither with Application / Window nor with DesktopApplication / DesktopWindow. With a DesktopApplication AllowAutoQuit = False even stops System.Log from working. I could not reproduce the hang nor the segfault. With Quit from MainWindow.Closing, App.Closing did not get triggered.
  • As I cannot install Xojo 2024r1.1 on Windows 8.1, I tried remote debugging from Linux on Windows. This did not work, as the app displays a message on the windows system: “Cannot connect to debugger ‘Since we could not locate the target IDE to start a debug session, this application will now exit.’” The firewall is opened for the remote debugger application on Windows, I did not find any requirements that need to be met on the Linux side.
  • I tried to isolate the culprit by commenting out stretches of code that still allow the app to start up. Doing so I found two stretches of code that both, individually seem to trigger the fault, i.e. if I skip both, the app terminates, if I leave in the one or the other, the app hangs. I could not make out anything remotely “dangerous” in either of them. I could not find something they have in common, apart maybe the fact that they create objects and use up some memory. But other stretches of code do this also, without triggering the fault. The second stretch of code registers the initial placement and size of controls to help in adjusting the layout after a resize operation or after a movement of a divider bar within the window. If I disable the first stretch of code, I am able to add 31 controls to the object created to handle the adjustments. When I add the 32nd, the hang re-appears. It has not to do with which controls are added, only with the number. (Note: when I wanted to verify this last claim, I could no longer get the app to close correctly even with the two stretches disabled entirely.)

Having said all that, it is pretty clear either the bug is in my code, but likely not in those stretches I identified, or the fault is in the platform (i.e. caused by Xojo).

I would not even bother to file an issue, without being able to provide a simple sample application (I could provide the real application, as it is open source anyway, but that likely would not help to get Xojo look at it).

How should I proceed from here?

20 posts - 7 participants

Read full topic


Viewing all articles
Browse latest Browse all 3827

Trending Articles