Quest keeps crashing while I try to work [SOLVED]
RobBronson
02 Aug 2016, 20:03I am currently at 7.8mb on my game and it keeps crashing while I try to work on stuff.
It is giving the following error:
(I have edited the error out as it is far too big and takes up too much space here)
I am hoping that someone can help with this problem as I have spent months on my game already and would hate for it all to be for nothing.
RobBronson
02 Aug 2016, 20:10At the time it crashed I was doing a few different things...Once trying to add an image. Once trying to set a flag. and a couple times when trying to save my work.
hegemonkhan
04 Aug 2016, 10:19Are you using the online/web version or the offline/desktop version? If you don't mind posting your game code (or if you want to keep it private than email or github or however send your game code to a mod or a user you can trust, who is good at coding), and we'll will look for coding mistakes/errors/issues for you, to get your game working again)
if you're using the offline/desktop version, then all you got to do is to right click on your game file and open it up with a text software (notepad, wordpad, notepad++, Apple: text editor, etc), highlight your entire game code (the entire contents of your game file), copy it, and then paste it here (or privately), for us to fix it up for you.
if you're using the web/online version, you'll probably have to get Alex' help in getting your game file's code if you can't download your own game and get into its game code.
RobBronson
15 Aug 2016, 18:45I have written to Alex via e-mail and sent him my game code. He has determined it is a "memory leak" and has me watching my task manager in order to find where the memory usage is going up so high.
I have narrowed it down to rising well over 200mb each time I try to insert a new image. Even before the image is picked.
(All my images are below 8kb)
Thank you for your response here hegemonkhan...If you have any ideas about what can be done to stop such a leak...it would be much appreciated.
I am awaiting a response from Alex on the question as to if this is going to make the game crash when uploaded and people play it. Or, if it is just something going on as I work on it. ( I am working offline)
If, it's only something affecting the progress of me working on it...I can deal with that. It's a pain in the ass but have found if I save and close out quest...then restart it to edit...my memory is low again.
I just truly hope I have not wasted Many months working on a game that is doomed.
hegemonkhan
15 Aug 2016, 21:27I don't know a computer/computer-systems nor graphics, very well, so Alex or others knowledgeable will be of help to you in regards to why your pics are generating a memory leak. I have no knowledge of why your pics' memory usage would be continually rising, except if you possibly have an infinite loop with your adding of pictures to your game, or maybe you got pictures (and/or thus also likely your computer) that're infected (with/having hidden/embeded malicious code: some picture/whatever file formats can contain both pixel graphics as well as strings/text, I think such as 'pdf' files, which enables people to put malicious code into the picture file): malware/virus picture files.
Does quest work fine if you don't add any pictures to your games?
Does quest work fine with (playing) someone else's game with pictures (hopefully those are assumedly-presumably non-corrupted pcitures, lol)
are you still using XP as your operating system? maybe there's the memory leak issue due to still using XP: it (your-computer) not having needed updated updates/patches/drivers/files etc.
just trying to narrow down your issue(s)' cause a bit more...
RobBronson
15 Aug 2016, 21:36By infinite loop...would using the same image in more than one area cause that?
Or...if an image should have embeded code as you mentioned...is there a way to check images for that?
hegemonkhan
15 Aug 2016, 21:54no, would not be an infinite loop, unless you got implementation code for adding those images to multiple locations in your game that is doing an infinite loop ... but an infinite loop should crash quest... I don't think it would keep quest up and ever-increasing the memory usage (aka: a memory leak), but I could be wrong, as this is way out of my league of knowledge with computers.
in simplicity, here's an example of an infinite loop (infinite loops ARE BAD! this will crash quest):
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<attr name="start" type="script">
boolean_variable = true
while (boolean_variable) {
msg ("hi")
}
</attr>
</game>
<object name="room">
<object name="player">
</object>
</object>
</asl>
// output:
//
// hi
// hi
// hi
// hi hi hi hi hi hi hi, on and on, forever.... except quest and/or your computer doesn't have infinite resources to display infinite 'hi's. While the looping is infinite, quest and/or your computer has FINITE resources (space/memory/etc), and so quest and/or your computer crashes
here's how to NOT have the infinite loop (as infinite loops ARE VERY BAD! NEVER do an infinite loop! usually there's safeguards in place to protect you, but in the early days of computers --- you could make your computer unusable/destroyed from infinite loops, I think):
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<attr name="start" type="script">
boolean_variable = true
while (boolean_variable) {
msg ("hi")
boolean_variable = false
}
</attr>
</game>
<object name="room">
<object name="player">
</object>
</object>
</asl>
// output:
//
// hi
//
// (only 1 'hi' occurs, as the condition is made false with its first, and thus, only run/execution of the 'while' Function):
//
// boolean_variable = true
// so, since the condition for the 'while' Function is TRUE, the 'while' Function's content (displaying: hi, AND changing the 'boolean_variable' Variable's Value to now being: false --- see below) is executed.
// boolean_variable = false
// but now, the 'while Function's condition is FALSE, and so its contents are not executed, and thus no second 'hi' is displayed.
to check file's contents you need to have (or create your own) a software/program that can do so... which gets into whether it's legal or not. You can of course use anti-virus/malware software to check/scan the file for any malicious code... but they may not be effective... it depends on whether it's within the file itself (which requires a program or hacking/reverse-engineering on your part, again which gets into whether it's legal or not)

Alex Warren
16 Aug 2016, 08:52HK, this is nothing to do with infinite loops. I know you're doing your best to be helpful here but sometimes I think these kinds of posts just add confusion.
Pertex
16 Aug 2016, 10:36:-)
RobBronson
22 Aug 2016, 14:57So,,,I am still wondering if this memory leak is something that is going to affect the game when it is uploaded and played or if it is only affecting me while I build it.
Any possible solution to fixing this problem would be the best...but I've found I can still make it work by saving and closing out every so often and then restarting.
I have already spent months working on this and would hate for it all to be for nothing.
The Pixie
22 Aug 2016, 15:07Quest seems to load all images in the game directory into the editor, whether they are used or not. Is the problem related to that? If you have a huge number of small images, maybe that is filling up your memory? What happens if you move the images to another directory temporarily, and then use the editor?

Alex Warren
22 Aug 2016, 15:35@RobBronson It's not going to be a problem while playing the game, it's a problem with the editor only.
RobBronson
22 Aug 2016, 22:47Thank you very much for looking into this Alex...I appreciate it very much.
@Pixie, thank you for that idea, it seems to be working. I just need to remember to move them back before playing through.