ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

[Serious Bug Found] Events can be started by the stop task..

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

[Serious Bug Found] Events can be started by the stop task..

Postby DazaKiwi » Tue Jun 25, 2019 12:08 am

I have an event that is triggered by two tasks and another to stop it. It is set to repeat and when active is suppose to trickle down the life support oxygen- only when the life support sys has not been repaired. When it does get repaired a task runs that is suppose to stop this event from running. BUY it keeps running regardless. Is this because i have checked Repeat?

I thought the task that stops the even will do that regardless of Repeat being ticked and when triggered to run again by one of the other tasks it will go back to running and repeat once a turn- which will be trickling down the oxygen supply.

*Update: so Denk did a demo regarding this issue i had and discovered this bug, where the task that stops an event actually can start it (if the task hasn't been started). I changed the title of this thread to highlight this issue as it could really mess up a project or just get confused and think it is something else going on when they run into this problem.
Last edited by DazaKiwi on Tue Jun 25, 2019 11:52 am, edited 2 times in total.
User avatar
DazaKiwi
 
Posts: 619
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Reapeating event wont stop even with a stop task?

Postby Denk » Tue Jun 25, 2019 11:02 am

I made a small test-file to test how ADRIFT behaves:
EventRepeating.taf
(14.96 KiB) Downloaded 3 times

You can type START and STOP to control the event, and you type TEST to get the value of the test variable, which only increases when the event is running.
(note I also made a task START2 because you mentioned that you had two tasks, which would start the event)

It seems that if the event has never been running, a stop-task wil cause the event to run! This must be regarded as a bug in ADRIFT. But if the event is started correctly with START, you will get the correct behaviour of START and STOP.

Here is a transcript from the test-file, which demonstrates the right behaviour as well as the bug:
adrift Code: Select all
> restart
Untitled
 
 
Living Room
Nothing special.  
 
> test
Variable test is now: 0.
 
> test
Variable test is now: 0.
 
> test
Variable test is now: 0.
 
@ The variable is not increasing, i.e. the event is not running.
> start
Event should start
 
> test
Variable test is now: 0.
 
> test
Variable test is now: 1.
 
> test
Variable test is now: 2.
 
> test
Variable test is now: 3.
 
@ typing START started event.
> stop
Event should stop.
 
> test
Variable test is now: 4.
 
> test
Variable test is now: 4.
 
> test
Variable test is now: 4.
 
@ typing STOP stopped the event
> stop
Event should stop.
 
> test
Variable test is now: 4.
 
> test
Variable test is now: 4.
 
@ typing STOP again did not start the event. I.e. it behaves as expected
@ but before the event has run the first time, STOP will cause the event to start! :
> restart
Untitled
 
 
Living Room
Nothing special.  
 
> test
Variable test is now: 0.
 
> test
Variable test is now: 0.
 
> stop
Event should stop.
 
> test
Variable test is now: 0.
 
> test
Variable test is now: 1.
 
> test
Variable test is now: 2.
 
@ as seen above, STOP makes the event start, which must be regarded as a bug in ADRIFT.
 

This is a serious bug. Thus we should make a bug-report.

You can probably make a workaround for this bug, by ensuring that the stop-task never runs before a start-task has run.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 207
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: [Serious Bug Found] Events can be started by the stop ta

Postby Denk » Tue Jun 25, 2019 12:12 pm

A workaround has been found for this bug. Idea by DazaKiwi:

Make a system task run immediately as the game begins. This system task starts the event. The event then calls a stop task after zero turns, which stops the event. With this method the event has already run once and so the bug will not appear.

The method is implemented in this demo:
EventWorkaround.taf
(15.04 KiB) Downloaded 3 times
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 207
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: [Serious Bug Found] Events can be started by the stop ta

Postby P/o Prune » Tue Jun 25, 2019 5:35 pm

Please report this bug.
Although I have no idea when/if Campbell will ever return, it is still important that bugs are reported.... Miracels can happen you know. :angel:
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 54Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4361
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: [Serious Bug Found] Events can be started by the stop ta

Postby rotter » Tue Jun 25, 2019 8:11 pm

P/o Prune wrote:Please report this bug.
Although I have no idea when/if Campbell will ever return, it is still important that bugs are reported.... Miracles can happen you know. :angel:


Yes, report the bug. Doubt it will ever get fixed but we can live in hope.
Currently working on "The Blank Wall" in ADRIFT 5 and "Again and Again" in Inform 7.
Delron, the home of Otter Interactive Fiction.
User avatar
rotter
 
Posts: 1394
Joined: Sat May 08, 2004 12:12 am
Location: UK
Points: 15

Re: [Serious Bug Found] Events can be started by the stop ta

Postby Denk » Wed Jun 26, 2019 10:14 am

I have now reported the bug in the Bugs and Enhancement List: http://www.adrift.co/bug/19205
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 207
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests