Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Abrupt application exit


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Aug 17, 2017 3:05 AM Last Post By: Marco Rocci
Marco Rocci

Posts: 17
Registered: 8/13/13
Abrupt application exit  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 17, 2017 2:20 AM
Having solved the debugger problem, I am now faced with another:

Why does a call to Application.ProcessMessages cause an abrupt exit from the app?

To give some context. This is a DUnitX GUI test runner form. On form show I populate a TreeView with all the test fixtures and cases. I also load some persisted settings, one of which is the AutoRun of tests. On Windows I had noticed that if I populate the treeview and immediately start test execution, the component is not updated until the tests are done... so I added an Application.ProcessMessages in between and it worked.

On Android that line (actually the AppService.HandleMessage which is internally called by Application.ProcessMessages) somehow exits from the app. Current line becomes the dpr's End line. The callstack I see is:
_NativeMain
Androidapi.Appglue.android_app_entry(void*).SystemEntry(void*)...
Androidapi.Appglue.android_app_entry(...)
:...__pthread_start(void*)
:...__start_thread

If I remove that Application.ProcessMessages it finishes the FormShow event handler, but something very similar happens right afterwards. I am using actions and buttons. IIRC the TActionList itself handles messages to update the actions. I am using Delphi 10.1 Berlin. These are all FMX components, so I was not expecting surprises... is there something I should know?

TIA and regards,
Marco
Marco Rocci

Posts: 17
Registered: 8/13/13
Re: Abrupt application exit  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 17, 2017 3:05 AM   in response to: Marco Rocci in response to: Marco Rocci
Marco Rocci wrote:
If I remove that Application.ProcessMessages it finishes the FormShow event handler, but something very similar happens right afterwards. I am using actions and buttons. IIRC the TActionList itself handles messages to update the actions. I am using Delphi 10.1 Berlin. These are all FMX components, so I was not expecting surprises... is there something I should know?

After further tests I can confirm that by removing both the Application.ProcessMessages and the TActionList, I finally get to see the form.

So what's the problem with these? I've been using action lists since the D6 days. Do I really have to go back to setting button and menu item properties and handling clicks and so on???

Marco
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02