Log in

View Full Version : HALP! Very basic but strange bug with YSNO & Crash


mantari
November 15th, 2007, 02:53 AM
I have had a crashing problem with a very simple event. I have reduced the code involved to something very small:

<font class="small">Code:</font><hr /><pre>
FLAG event always
KEYS unstablestar5

STAR 0
NOFL binary1 binary2 blhole
STRN Omni
FLAG nearby
END STAR

CONDITION 0
TYPE explore
STR0 0
END CONDITION

PAGE 0
REQ0 0
DISP 1
ACTN popup
GFXP misc/nova.jpg
MUSC misc/nova_loop.ogg
TITL Alien Probe
TEXT Your crew encounters an alien probe of unknown origin which asks you a number of questions related to mathematics and science, but it says it will self-destruct if it does not recieve the answers within 24 hours!&lt;BR&gt;&lt;BR&gt;Do you transmit the data?
YSNO 1 2
END PAGE

PAGE 1
NOVA 0 5 5 exo_neutron devastated
ACTN endquest
END PAGE

PAGE 2
ACTN endquest
END PAGE
</pre><hr />

Try it. Answer "no", it goes to the planet. Answer "yes", it crashes to the desktop. The stderr.txt just says "Fatal signal: Segmentation Fault (SDL Parachute Deployed)".

Remove only the GFXP line and the desktop crash remains.
Remove only the MUSC line and the desktop crash remains.
Remove both lines, and the problem disappears.
Move the GFXP line BEFORE the YSNO line, and it doesn't crash anymore. But the image is placed on top of the text!

I've gone through approx 40 combinations trying to get this to work. I'm at my wit's end. <font color="red">HALP!</font>

sgqwonkian
November 15th, 2007, 01:01 PM
Does this problem happen if you give it something more to do on PAGE 2? Like, does it still crash if PAGE 2 also displays some text or a picture?

mantari
November 15th, 2007, 04:54 PM
Good question. Many of my test cases involved mixing in text, when I eventually realized that the presence of text has nothing to do with it.
But I just made the following example (by stealing the Underdelve code from Even Weirder Worlds):

If I answer yes, or I answer no, the result is the same. Crash to desktop.
BTW... this code is generic enough that it can be placed into any mod, if you want to try it out.
I removed all my custom images and OGG files and what not.

<font class="small">Code:</font><hr /><pre>
FLAG always
KEYS unstablestar5

STAR 0
NOFL binary1 binary2 blhole
STRN Omni
FLAG nearby
END STAR

CONDITION 0
TYPE explore
STR0 0
END CONDITION

PAGE 0
REQ0 0
DISP 1
ACTN popup
GFXP misc/nova.jpg
MUSC misc/nova_loop.ogg
TITL Alien Probe
TEXT Your crew encounters an alien probe of unknown...
YSNO 1 2
END PAGE

PAGE 1
NOVA 0 5 5 exo_neutron devastated
ACTN popup endquest
TITL Play it Safe
GFXP misc/nova.jpg
TEXT You decide not to risk the lives of your crew...
MUSC misc/nova_loop.ogg
SCOR 100 exploring
SVAR udcrew neverwent
ACTN endquest
END PAGE

PAGE 2
ACTN popup endquest
TITL Play it Safe
GFXP misc/nova.jpg
TEXT You decide not to risk the lives of your crew...
MUSC misc/nova_loop.ogg
SCOR 100 exploring
SVAR udcrew neverwent
ACTN endquest
NOVA 0 5 5 exo_neutron devastated
END PAGE
</pre><hr />

mantari
November 15th, 2007, 04:59 PM
NOTE: It also seems a bit unstable. From the code, above, I just removed the NOVA statement from page 1.

So then, it worked when I said 'YES'. [new game] Then it worked when I said 'NO'. [new game] 'YES' worked again. [new game] 'NO' crashed to the desktop.

UPDATE: I did a new game (again, with the change of the NOVA statement removed from page 1). Yes and no worked several times, no problems.
I thought I was going crazy.

So I quit Weird Worlds and started the program again.
I went to the star and said 'NO'. Crash to desktop.

Phlagm
November 16th, 2007, 10:37 PM
I have had nothing but problems when trying to do anything substantial in a YSNO or GOTO page. I try not to use them except to display text. It's sad too, because I wanted to make some Away Mission quests, but because you can't do YSNO in a planet exploration window, they break the mood to begin with, and then when most commands fail to work reliably, that was the death knell.

mantari
November 17th, 2007, 12:30 AM
Ditto on also having problems with GOTO on working with anything but multi-page text.

Hey Fingers, your thoughts?

sgqwonkian
December 10th, 2007, 02:31 PM
I've recently been working on a couple of medium-deep quests with YSNO and GOTOs and have had no troubles (beyond the TIME bug and bug with using a single code more than once in a page mentioned elsewhere).

I'm curious where you're putting the other commands in the GOTO pages...

I've been doing
DISP
ACTN
GFXP
TITL
TEXT
MUSC
other misc commands
GOTO
END PAGE
in that order without a hitch. Is that the order you've been using?

sgqwonkian
December 11th, 2007, 10:21 PM
Sure, I had to brag.
Like an hour after that post I started hitting major bug-snags.

The ones using the codes listed there are still functioning fine,
but some others are wrecking my brain.