Issue 108: fastCodeAt + deserialize
Status:  Fixed
Owner:
Closed:  Aug 2011
Project Member Reported by gameh...@gmail.com, Mar 16, 2011
Hi,
 
For the "out of bounds" issue, I tried to modify Unserializer.hx source
replacing
 
inline function get(p) : Int {
return StringTools.fastCodeAt(buf, p);
}
 
by
 
inline function get(p) : Int {
return buf.charCodeAt(p);
}
 
and now it's working.
 
Should I report the issue to the bug tracker ?
I'll try to make a short example to easily reproduce.
 
Cheers
Julien
 
2011/3/3 Julien CASTETS <castetsjulien@gmail.com>
 
> Hi,
>  
>  
> After a successful port from flash to nme (under windows) I'd like to run
> my app on iPhone (ios 4.2)
>  
>  
> First problem comes with socket in the simulator (I'm using haxe.remoting)
> :
>  
> *Detected an attempt to call a symbol in system libraries that is not
> present on the iPhone:*
>  
> *fcntl$UNIX2003 called from function _ZL10socket_newP6_value in image
> xxxxxxxxx.*
>  
> *If you are encountering this problem running a simulator binary within
> gdb, make sure you 'set start-with-shell off' first.*
>  
>  
> Don't understand the *set start-with-shell off *thing, I tried to put that
> in my .gdbinit with no luck
>  
> *
> *
>  
> Then I tried on the device and it works! (Not text rendering, but I should
> mess with that later ^^)
>  
>  
> Until I made the first click/touch :
>  
> *
> *
>  
> *Called from IPhoneMain_obj::main, IPhoneMain.hx 29*
>  
> *Called from Lib_obj::create, /usr/lib/haxe/lib/nme/2,0,1/nme/Lib.hx 29*
>  
> *Called from CFunction*
>  
> *Called from Stage_obj::nmeProcessStageEvent,
> /usr/lib/haxe/lib/nme/2,0,1/nme/display/Stage.hx 614*
>  
> *Called from Stage_obj::nmeDoProcessStageEvent,
> /usr/lib/haxe/lib/nme/2,0,1/nme/display/Stage.hx 554*
>  
> *Called from Stage_obj::nmeOnMouse,
> /usr/lib/haxe/lib/nme/2,0,1/nme/display/Stage.hx 296*
>  
> *Called from DisplayObject_obj::nmeFireEvent,
> /usr/lib/haxe/lib/nme/2,0,1/nme/display/DisplayObject.hx 438*
>  
> *Called from EventDispatcher_obj::dispatchEvent,
> /usr/lib/haxe/lib/nme/2,0,1/nme/events/EventDispatcher.hx 84*
>  
> *Called from Listener_obj::dispatchEvent,
> /usr/lib/haxe/lib/nme/2,0,1/nme/events/EventDispatcher.hx 29*
>  
> *Called from HomeWnd_obj::OnThemeClick,
> ../../../Client/Home/src/HomeWnd.hx 145*
>  
> *Called from Async_IGameSvc_obj::SelectTheme,
> ../../../Client/Client_Common/client/services/Proxies.hx 9*
>  
> *Called from HttpAsyncConnection_obj::call,
> /usr/lib/haxe/std/haxe/remoting/HttpAsyncConnection.hx 73*
>  
> *Called from Http_obj::request,
> /usr/lib/haxe/std/haxe/remoting/HttpAsyncConnection.hx 64*
>  
> *Called from Unserializer_obj::unserialize,
> /usr/lib/haxe/std/haxe/Unserializer.hx 166*
>  
> *Called from Unserializer_obj::readDigits,
> /usr/lib/haxe/std/haxe/Unserializer.hx 99*
>  
> *Critical Error: cca - Out Of Bounds*
>  
> *
> *
>  
> It fails on deserializing an 'Int'
>  
>  
> Note that in this state, the app had already retrieved a lot of data using
> the remoting.
>  
>  
>  
> I'll try to investigate more on that but I'm not able to break in HXCPP
> code from xcode. If someone knows I would be happy.
>  
>  
> Cheers
>  
> Thank you for all your great work !
>  
> Julien
>  
Aug 10, 2011
Project Member #1 gameh...@gmail.com
I have changed the bounds checking and think this should be fixed now.
Status: Fixed