Jump to content

How to get rid of the MessageBox without user's clicking OK


kikonan

Recommended Posts

I want to provide the player with information about current situation periodically, e.g. every 6 seconds. I use Wherigo.Messagebox function after the timer elapses. As the next Messagebox covers the previous one the player does not need to click OK. He just watches the display. This is desirable behaviour. However, when I tried this cartridge, the player started showing errors after maybe 30 minutes, i.e. after approx. 300 Messageboxes shown. I understand the Messageboxes are somehow stacked and after so many of them the stack overflows. My question is how to get rid of the previously shown Messageboxes without forcing the user to click the OK button.

 

Any help is appreciated.

 

Kiko

Link to comment

messageboxes do not stack, they cancel each other.

many cartridges show a messagebox every second to display a timer for something, and it works without problem

 

you should try to find out whether the errors start

a) after 30 minutes regardless of messagebox timing

B) after a number of messageboxes (try showing a messagebox in an endless loop - if the number of messageboxes is really the problem, it should crash pretty quickly)

c) when something specific happens - you enter a zone, something else is displayed etc.

 

there is a known bug in the legacy players that when you close an Input by showing a messagebox from a timer, it causes a crash. isn't this your problem?

 

also, you didn't say which player shows this problem. if it is an Oregon, for example, i wouldn't be surprised if it started crashing on its own for no reason. also, some Nokia S60-based phones with openwig stop displaying output after some time.

Edited by matejcik
Link to comment

But is there a way to progrematically close a message box? I use a message box in an onEnter to display an image based on their location. It works good but is also a pain as they have to hit OK all the time. I would like to display the image for a couple seconds and then close it without forcing the user to hit the OK button. I don't have multiple windows stacking to hide them.. just one...

Link to comment

Excellent post, matejcik. kikonan, matejcik is one of our third-party developers; he developed OpenWIG, the first cell phone Wherigo Player. He's an excellent person to have answer your question.

 

The only thing I can add for experimentation's sake is throwing in showing the main screen.

Link to comment

messageboxes do not stack, they cancel each other.

many cartridges show a messagebox every second to display a timer for something, and it works without problem

 

 

Thank you for the quick and clear response. To be more precise the errors apeared without entering the zone or any other event in coincidence with messagebox. The device was Nokia N97 mini (i.e. S60 device) with OpenWIG. I shall try to generate the messageboxes in the loop and see how it works.

 

Once more many thanks for hints.

 

Kiko

Link to comment

If you can see errors in the gwl log, please post them here.

If you actually see errors, as opposed to a seeming freeze of the application, it is an issue different from the one I mentioned, and it might be fixable ;e)

 

In the GWL I found only Out of memory Error without further details. The error repeated several times after timer eplased again. After several errors the OpenWIG ended completly.

This is the excerpt from the GWL:

18:22:15|48.2112|17.1128|366.0|108.9862289428711|:: EEND: Signal.OnTick
18:22:20|48.2112|17.1126|366.0|65.00985717773438|:: TIME: Signal tick
18:22:20|48.2112|17.1126|366.0|65.00985717773438|:: EVNT: Signal.OnTick
18:22:20|48.2112|17.1126|366.0|65.00985717773438|:: CALL: MessageBox - Sila signalu: XXX zo smeru JZ
18:22:21|48.2112|17.1126|366.0|106.103271484375|:: java.lang.OutOfMemoryError

stack trace: 
18:22:27|48.2112|17.1125|366.5|104.61651611328125|:: TIME: Signal tick
18:22:28|48.2113|17.1125|366.5|106.05799102783203|:: EVNT: Signal.OnTick
18:22:28|48.2113|17.1125|366.5|106.05799102783203|:: CALL: MessageBox - Sila signalu: XXX zo smeru JZ
18:22:33|48.2113|17.1125|367.0|111.48428344726563|:: TIME: Signal tick
18:22:36|48.2113|17.1125|367.5|75.35679626464844|:: EEND: Signal.OnTick
18:22:36|48.2113|17.1125|367.5|75.35679626464844|:: EVNT: Signal.OnTick
18:22:36|48.2113|17.1125|367.5|75.35679626464844|:: CALL: MessageBox - Sila signalu: XXX zo smeru JZ
18:22:39|48.2113|17.1125|367.5|116.55587005615234|:: TIME: Signal tick
18:22:39|48.2113|17.1125|367.5|130.67630004882813|:: java.lang.OutOfMemoryError

stack trace: 
18:22:46|48.2114|17.1125|368.5|94.26203155517578|:: EVNT: Signal.OnTick
18:22:46|48.2114|17.1125|368.5|94.26203155517578|:: TIME: Signal tick
18:22:46|48.2114|17.1125|368.5|94.26203155517578|:: CALL: MessageBox - Sila signalu: XXX zo smeru JZ
18:22:46|48.2114|17.1125|368.5|94.26203155517578|:: java.lang.OutOfMemoryError

stack trace: 

 

Kiko

Link to comment

well, that indicates a memory leak, that's beyond doubt.

now the question is whether the leak is in openwig, or in S60's java, or in your cartridge.

in any case, it's interesting.

is your cartridge doing anything potentially memory-consuming, besides showing the messageboxes?

can you post the cartridge?

Link to comment

well, that indicates a memory leak, that's beyond doubt.

now the question is whether the leak is in openwig, or in S60's java, or in your cartridge.

in any case, it's interesting.

is your cartridge doing anything potentially memory-consuming, besides showing the messageboxes?

can you post the cartridge?

 

The cartridge does not seem to do anything memory consuming. It shows the messagebox each 6 seconds based on the distance and bearing to the particular zone. So as the player moves the messageboxes change the content based on the position of the player. I can send it to you via email, if it helps.

Link to comment

you could use ShowScreen and see if that closes the messagebox. but beware that on Garmins, only ShowScreen(MAIN_SCREEN) works and the others crash the player

 

Sorry to go back in the topic.

I have 3 online cartridges, in all of them the user navigation is made by ShowDetailScreen "The next Zone to go" and it has been running perfectly in Garmins.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...