Author Topic: message after quiting compiled HAC applications  (Read 9393 times)

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
message after quiting compiled HAC applications
« on: November 19, 2012, 08:18:27 AM »
Hi there,
I wanted to report a possible bug in HAC after 'quiting' or pushing the home button on the phone (in a compiled apk file).

After a short moment every compiled application that I made comes with the message 'test1 is gestopt (test1 is stopped). Do you know how this can be prevented? I think it has someting to do with the life cycle of the app. I noticed this 'error' also in the solarsystem example and possible more examples?
 

grts, Jeroen
« Last Edit: November 19, 2012, 08:40:27 AM by kaboekieman »

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: message after quiting compiled HAC applications
« Reply #1 on: November 19, 2012, 08:40:24 AM »
Hi Jeroen

Many thanks for the report - I'll look into it right now.

Malkom
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: message after quiting compiled HAC applications
« Reply #2 on: November 19, 2012, 08:42:15 AM »
thx malkom... I can sent you a sample hac and apk file if you want, just mention it :)

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: message after quiting compiled HAC applications
« Reply #3 on: November 19, 2012, 08:52:36 AM »
A sample would be great thank you - then I can attach to to debugger and track it down :)

Its not appearing on G1 or HiApad devices but sounds like a bug when Activity is sent to back.
I'll test Kindle Fire etc later this morning.


UPDATE - Kindle Fire is okay.

Perhaps its to do with the version of Android OS on your device - I'll target specific emulator.




« Last Edit: November 19, 2012, 09:00:46 AM by Malkom »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: message after quiting compiled HAC applications
« Reply #4 on: November 19, 2012, 09:39:19 AM »
o.k. hold on malkom... I'll upload the files soon ...
I have a HTC One X, but yesterday evening when testing it on my old Samsung II I got the notice "forced to stop" after quiting or pushing the home button on my phone. My Samsung I'll test this evening, the HTC I'll test in a hour or so... I will also give you a sample file, with matching apk and will give the OS version of the HTC.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: message after quiting compiled HAC applications
« Reply #5 on: November 19, 2012, 10:08:24 AM »
o.k. hold on malkom... I'll upload the files soon ...
I have a HTC One X, but yesterday evening when testing it on my old Samsung II I got the notice "forced to stop" after quiting or pushing the home button on my phone. My Samsung I'll test this evening, the HTC I'll test in a hour or so... I will also give you a sample file, with matching apk and will give the OS version of the HTC.

Thats fine Jeroen, I'm looking forward to the test files but no rush :)
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: message after quiting compiled HAC applications
« Reply #6 on: November 19, 2012, 10:34:28 AM »
Hi Malkom, just formated my internal memory on my phone (HTC One X) and tested the whole routine again. I have Android OS 4.0.4 running on my HTC. I also have TasKiller (v3.3.5) running on my phone (to kill app's that are running in the background). And this is where the trouble lies.

I have made a simple 1 page HAC project (see test.rar) and build an Android APK file (see test.apk). After installing it to my phone everything works fine (I see the page, a black screen with green text: "test"). When pushing the home button everything lookes to be ok. But when I force quit the test App that is running in the background with TasKiller after a few seconds I get the notice "test is gestopt" (test is stopped) on my phone... After about 30 seconds I get this notice once more.

When force quiting (using taskiller) other applications (not made with HAC) I don't get this notice.

I need to force quit the app to test reading from my flatfile database and this is when I came across this 'problem'. So the trouble starts when using 3rd party applications to force quit an App made in HAC. This is also true for the SolarSystem2 app in your example page (at least it is for me). I have compiled the SolarSystem2 App as APK file and installed it to my phone (exact the same 'problem' when force quiting it => "SolarSystem is gestopt").

Tonight I will test my Samsung, I will post results tonight or tomorrow morning.

p.s. when quiting the app (inside the application) then no problem occurs.

Hope I have supplied you all the information... :) and thanks again for the help...

Jeroen
« Last Edit: November 19, 2012, 10:41:49 AM by kaboekieman »

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: message after quiting compiled HAC applications
« Reply #7 on: November 19, 2012, 10:42:22 AM »
apk file of test file

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: message after quiting compiled HAC applications
« Reply #8 on: November 19, 2012, 04:50:52 PM »
Hi Jeroen

Many thanks for all the details on this.

I think there are two issues here ? but please correct me if there are more :)


1) Returning activity to a HAC app after its HOME had been pressed produces a system error message.
   
   Unfortunately I cannot repeat the errant behaviour despite using a debugger and your Test app.
   I have tried several devices, G1(Dream), HTC Hero, HiApad and Kindle Fire, plus emulator with 4.1 .

   The debugger messages show the HAC app being sent to the background then returning to foreground without any issues.

   I wonder if it is something specific to your device.

   I'll keep looking into this because its clearly a bug and needs fixing :(




2) Killing HAC apps using apps like Taskiller.

    HAC apps are meant to run continuously even when in the background(perhaps idling). Quitting is meant to be done either via their menu bar Quit option or else programmatically using the Quit command.

    One reason why HAC apps cause a system error message when forcibly quit by an external app is that HAC apps have both an Activity and a Service running. So perhaps Taskiller kills the Activity and damages the running Service.

   I wonder if any of the non-HAC apps you tried had their own Services running or perhaps they were all just Activities.



Quite a bit to think about here :)

Malkom


I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: message after quiting compiled HAC applications
« Reply #9 on: November 20, 2012, 07:56:44 PM »
hi malkom... I have rewriten the solor app and it lookes promishing (reading from the flatfile worked, without errors, only quiting with taskiller is still a issue, but I will take that for granted)... It will take me a couple of days I think but then I should then have a short micro dungeon game, with save state and insert text from a flatfile... If it's finished I will post it on this forum... Jeroen

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: message after quiting compiled HAC applications
« Reply #10 on: November 20, 2012, 10:09:32 PM »
hi malkom... I have rewriten the solor app and it lookes promishing (reading from the flatfile worked, without errors, only quiting with taskiller is still a issue, but I will take that for granted)... It will take me a couple of days I think but then I should then have a short micro dungeon game, with save state and insert text from a flatfile... If it's finished I will post it on this forum... Jeroen

Hi Jeroen

Thats really great progress you have made - i hope things go to plan :)

About quitting - I tested Taskiller on my G1 and it forced HAC apps to quit without an error message.
Actually though, having an app forced quit by another without any error message occurring could have some security issues.

Perhaps you could use HAC's Quit or QuitSave command or the menu Quit to get the result you need.

Malkom


I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

 

anything