Page 1 of 1

Why is there a crash?

Posted: Sat May 07, 2011 2:13 pm
by jesperbrannmark
Hi.
I try the following code, all good in interpeter as well as compiled for windows.
When i compile and move it to a USB stick or any other computer than mine - crash.... (so it works from the intepeter, but not compiled when in a different folder - if i get it right).
I dont want to post as bug because i have no clue on whats going on.

Code: Select all

aa.s="&session=mmc5f5ncvl9k180sh6d1vfl9m5&clientip=193.141.113.81"
Global NewMap tempmapz.s()  
For b.b=1 To CountString(aa.s,"&") + 1
  MessageRequester("b.b",Str(b.b)+" of "+Str(CountString(aa.s,"&") + 1))
  c.s=StringField(aa.s,b.b,"&")  
  tempmapz(URLDecoder(Left(c.s,Len(Right(c.s,FindString(c.s,"=",1)))-1)))=URLDecoder(Right(c.s,Len(c.s)-Len(Right(c.s,FindString(c.s,"=",1)))))
Next  
MessageRequester("DONE","DONE")
The workaround would be: (but the one above should still not crash like that - right?

Code: Select all

aa.s="&session=mmc5f5ncvl9k180sh6d1vfl9m5&clientip=193.141.113.81"
Global NewMap tempmapz.s()  
For b.b=1 To CountString(aa.s,"&") + 1
  MessageRequester("b.b",Str(b.b)+" of "+Str(CountString(aa.s,"&") + 1))
  c.s=StringField(aa.s,b.b,"&")  
  z.s=URLDecoder(Left(c.s,Len(Right(c.s,FindString(c.s,"=",1)))-1))
  x.s=URLDecoder(Right(c.s,Len(c.s)-Len(Right(c.s,FindString(c.s,"=",1)))))
  tempmapz(z.s)=x.s
Next  
MessageRequester("DONE","DONE")

Re: Why is there a crash?

Posted: Sat May 07, 2011 11:23 pm
by Rook Zimbabwe
you tried to pass too much into the statement... program crashes to let you know you need to change the process! :D

Re: Why is there a crash?

Posted: Sun May 08, 2011 8:38 am
by jesperbrannmark
yes i am aware it wasnt the most beatiful written code. but that doesnt change the fact that it works fine when compile and run - but crashes when compiled as binary.... (took me a day to figure out which line of code was the problem). and it doesnt crash on everything passed like that - i've plocked out where the crash occurs.
If it is a crash - it should be a crash regardsless - and if it is not it should not be a crash.
Also it works fine on Windows and i can also give you a aa.s that doesnt crash...
Confusing....