Yay!! more random crashing!

BlitzMax Forums/BlitzMax Programming/Yay!! more random crashing!

plash(Posted 2008) [#1]
This is directly related to my other questions about using Google to translate words.
In this case I made a program that displays the whole Greek alphabet, and translates words ENG>GRC and GRC>ENG (Grescaro).

Anywho, when you try to translate a word or phrase a number of times (never seen any greater or lower than 18 on Windows, and it varies on Linux), no matter which direction (eng>grc or grc>eng) it will crash at COMPLETELY RANDOM places.

The test code is stripped out of Grescaro's, the last test I did on Linux gave me 12 tries, and it crashed at line 50:
Local url:String = "ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=" + word + "&langpair=" + langpair.Replace("|", "%7C")

with "Unhandled Exception:appstub.linux signal handler 11".

The code:


I originally didnt use everything against a single JSONReader instance, at first I was just creating one each time the user tried to translate a word.

NOTE: The Greek translation was formatted for use on a wxFrame, so it probably wont look correct in your console.


plash(Posted 2008) [#2]
OK, I was able to translate a phrase upto 20 times in Grescaro, but after all the tests (using the code I posted) I can only get to 12 tries, and it's only crashing on line 50... (LINUX - Ubuntu 8.04)


Brucey(Posted 2008) [#3]
Good grief, you've been ripping code out of everywhere :-p


Brucey(Posted 2008) [#4]
I got to 12 here :-)


plash(Posted 2008) [#5]
Good grief, you've been ripping code out of everywhere :-p
:D

In Grescaro it was crashing on all sorts of areas, like creating the JSONReader/parsing the string, and performing a Left operation..


Brucey(Posted 2008) [#6]
Holds up hand in shame...

My glue was broken... turns out it was crashing as soon as GC kicked in... all this C++ stack/heap/pointer stuff breaks my head.

Get an update from SVN, build mods, and see how it goes now.


Sorry.


plash(Posted 2008) [#7]
all this C++ stack/heap/pointer stuff breaks my head.
I can't even look at C++ code without asking "who's the fellow who scribbled this nonsense!?"

Get an update from SVN, build mods, and see how it goes now.
Coolio, working on it..


Brucey(Posted 2008) [#8]
Anyhoo... shouldn't you be working on the Form Designer? I was hanging out for that for another project of mine ;-)


plash(Posted 2008) [#9]
Works! Thanks again..

Anyhoo... shouldn't you be working on the Form Designer? I was hanging out for that for another project of mine ;-)
Keke, right away! - what might this project be?


Brucey(Posted 2008) [#10]
what might this project be?

Just a personal one for me and some friends... given that I've ripped audio and logos from goodness knows where, it can't really be anything but :-)

But it does let me bring together lots of different modules, and play around with things I might not normally delve into - like a flash-like timeline thing for feeding together moving text and images to a soundtrack...
...and messing around with MiniB3D for nice visual effects.

Well, you gotta have your fun somewhere :-)


plash(Posted 2008) [#11]
Well, you gotta have your fun somewhere :-)
Indeed!