Jump to content

Exiting & Re-entering a zone while Input active crashes PDA


Audion64

Recommended Posts

This bit of code consistently crashes on a Mio P550. (attachment of the lua file at the bottom)

 

If the user enters a zone, pulls up the Unlock command and is prompted for Input and exits then re-enters the zone while the Input screen is still active, it crashes and locks up the PDA.

 

This seems like a pretty basic bit of code and necessary for even the simplest cartridge really. Surprised and annoyed that this crashes.

 

Can anyone else replicate this on other hardware or any ideas on the cause?

 

Builder Version 2.0.5129.5086

Player Version 2.0.5129.5191

Hardware Mio P550 (OS 5.1.195)

 

Log file:

 

20871104140011|0.00000|0.00000|0.000|0.000|Engine Version 2.11, Player Name: Builder, Device ID: 9D2D1EFF161606070108-00022AC1FC92

20871104140011|0.00000|0.00000|0.000|0.000|ZCartridge:Start - Downloaded Sun Jun 08 18:48:03 2008

20871104140012|41.51950|-88.09534|514.764|62.992|Zone:Enter - CACHE Site Alpha

20871104140012|41.51950|-88.09534|514.764|62.992|PlayAudio - Zone Enter

20871104140012|41.51950|-88.09534|514.764|62.992|MessageBox:Show - Player has entered a zone.<BR>

<BR>

Alpha Cache Item is now visible and active to them.

20871104140015|41.51953|-88.09531|558.727|62.992|MessageBox:Callback - [button1] No script to execute

20871104140019|41.51957|-88.09531|572.178|62.992|ZCommand:exec - Alpha CACHE:Unlock

20871104140019|41.51957|-88.09531|572.178|62.992|GetInput - Alpha Question

20871104140041|41.51946|-88.09531|529.528|-1.000|Zone:Exit - CACHE Site Alpha

20871104140041|41.51946|-88.09531|529.528|-1.000|Zone:Proximity - CACHE Site Alpha

20871104140138|41.51952|-88.09555|620.407|72.835|Zone:Enter - CACHE Site Alpha

20871104140138|41.51952|-88.09555|620.407|72.835|PlayAudio - Zone Enter

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Player has entered a zone.<BR>

<BR>

Alpha Cache Item is now visible and active to them.

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

InputCrash.zip

Edited by Audion
Link to comment

Is there some intrinsic reason for the Zone to remain Active?

 

If I have some Input getting called up within a Zone, I (most of the time) make the Zone Inactive at the same time that the Input is called. I haven't had any crashes like you describe, but it's quite common to get the Input called twice (once entering the Proximity, and once leaving it).

 

Someone probably has a more elegant solution, but I tend to use blunt instruments in my Cartridges :wub:

Link to comment

This bit of code consistently crashes on a Mio P550. (attachment of the lua file at the bottom)

 

If the user enters a zone, pulls up the Unlock command and is prompted for Input and exits then re-enters the zone while the Input screen is still active, it crashes and locks up the PDA.

 

This seems like a pretty basic bit of code and necessary for even the simplest cartridge really. Surprised and annoyed that this crashes.

 

Can anyone else replicate this on other hardware or any ideas on the cause?

 

Builder Version 2.0.5129.5086

Player Version 2.0.5129.5191

Hardware Mio P550 (OS 5.1.195)

 

Log file:

 

20871104140011|0.00000|0.00000|0.000|0.000|Engine Version 2.11, Player Name: Builder, Device ID: 9D2D1EFF161606070108-00022AC1FC92

20871104140011|0.00000|0.00000|0.000|0.000|ZCartridge:Start - Downloaded Sun Jun 08 18:48:03 2008

20871104140012|41.51950|-88.09534|514.764|62.992|Zone:Enter - CACHE Site Alpha

20871104140012|41.51950|-88.09534|514.764|62.992|PlayAudio - Zone Enter

20871104140012|41.51950|-88.09534|514.764|62.992|MessageBox:Show - Player has entered a zone.<BR>

<BR>

Alpha Cache Item is now visible and active to them.

20871104140015|41.51953|-88.09531|558.727|62.992|MessageBox:Callback - [button1] No script to execute

20871104140019|41.51957|-88.09531|572.178|62.992|ZCommand:exec - Alpha CACHE:Unlock

20871104140019|41.51957|-88.09531|572.178|62.992|GetInput - Alpha Question

20871104140041|41.51946|-88.09531|529.528|-1.000|Zone:Exit - CACHE Site Alpha

20871104140041|41.51946|-88.09531|529.528|-1.000|Zone:Proximity - CACHE Site Alpha

20871104140138|41.51952|-88.09555|620.407|72.835|Zone:Enter - CACHE Site Alpha

20871104140138|41.51952|-88.09555|620.407|72.835|PlayAudio - Zone Enter

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Player has entered a zone.<BR>

<BR>

Alpha Cache Item is now visible and active to them.

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

20871104140138|41.51952|-88.09555|620.407|72.835|MessageBox:Show - Incorrect answer

20871104140138|41.51952|-88.09555|620.407|72.835|ZInput:GetInput - Alpha Question -> <cancelled>

 

Hello!

 

What you experienced sounds like a 'C stack overflow error.'

 

Here is the basic concept of a message box:

 

In typical computer systems, a message to the player halts information processing and suspends the game until the player presses a button to resume. However, in Wherigo, a message box does not pause the cartridge. Instead, the game continues to run while the message box is still displayed on the screen. Because of this, any other user interface element (e.g. Dialog, Message Box, GetInput) that is called before a message box is closed can actually overlay or "be stacked on top of" the first message box.

 

Here is what the error is:

 

A C Stack overflow happens when a message box with a callback (or button script) gets laid on top of another message box with its own callback script. The message boxes keep stacking on top of each other and eventually crash the program. This can happen if GPS reception is not optimal. For example, the signal might refresh and cause the player to unknowingly bounce in and out of a zone, triggering the on enter event over and over again.

 

In your case, it looks like you have an OnEnter message box triggering, and this being stacked on top of the input message box.

 

Here is the solution:

 

To avoid any problems, we want to make sure this chain of messages only fires once. An easy way to do this is by creating a flag variable and setting it to true when the player enters the zone.

 

Sample lua script:

function zonePrairie:OnEnter()
if   prairieentered == false then
prairieentered = true
Wherigo.MessageBox{Text=[[**You look out into several different directions.**
**It appears that you are lost.**]],Media=zmediazoneprairie,Callback=cartCalamityLineTrainHeist.MsgBoxCBFuncs.MsgBoxCB4}
end
end

 

In this case, the variable called prairieentered is false when the cartridge is started. We use an IF-THEN statement to make sure the message box string displays only if prairieentered is false. Then within the same IF-THEN condition, we set prairieentered to true. Now no matter how many times the player enters or exits the prairie, the variable will always be true and the string of messages will only fire the first time the player enters the zone.

 

By applying this method to your Wherigo cartridge, your OnEnter message box will only get triggered once, and there will be no message boxes being stacked on top of one another even if you get bumped out of the zone during an input sequence.

 

I hope this is helpful!

J2B2 B)

Edited by J2B2
Link to comment

Thanks for the responses.

 

J2B2, I think your method should work for me except I want the message box to pop upon re-entry. Just not while the Input is active. So I may be able to use your method but have it set the flag just before the Input is initiated and then reset the flag once the Input is completed.

 

I'm just somewhat surprised that something so basic and almost essential to cartridge building caused this problem.

Edited by Audion
Link to comment

Thanks for the responses.

 

J2B2, I think your method should work for me except I want the message box to pop upon re-entry. Just not while the Input is active. So I may be able to use your method but have it set the flag just before the Input is initiated and then reset the flag once the Input is completed.

 

I'm just somewhat surprised that something so basic and almost essential to cartridge building caused this problem.

 

Yes, you want to set the flag on "Unlock" since this is where GetInput is being called. Reset the flag when the player answers your question correctly(When Alphaanswer = hrml). Then place an IF-THEN for the OnEnter.

 

Good Luck!

J2B2

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...