Box2D Forums

It is currently Fri May 24, 2013 9:14 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Dec 16, 2010 9:01 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
Jon wrote:
One of my testers is running into this. This is an outlier case (1 out of about 100 active testers), but I do see a lot of occurrences of this on Google but no proposed solutions when it happens.

Code:
RangeError: Error #1506: The specified range is invalid.
at cmodule.Box2D::FSM__start/work()
at cmodule.Box2D::CRunner/work()
at cmodule.Box2D::CLibInit/init()
at Box2DAS.Common::b2Base$/initialize()[/Users/jon/Desktop/app/sandbox/enginef/Box2DAS/Box2DAS/Common/b2Base.as:32]
at app.api.engine::GameState/create()[/Users/jon/Desktop/app/sandbox/enginef/root/app/api/engine/GameState.as:180]
at org.flixel::FlxGame/switchState()[/Users/jon/Desktop/app/sandbox/enginef/flixel/org/flixel/FlxGame.as:188]
at org.flixel::FlxGame/create()[/Users/jon/Desktop/app/sandbox/enginef/flixel/org/flixel/FlxGame.as:485]


Any ideas?

(The Jon is *not* me. It's a coincidence that the tester has the same name.)


found that quote on the big wck thread, didn't see a reply to it.

i have run into this error lately as well. at first i created a fresh fla and pasted the game back into it. and it fixed it. but now that its on the server its back, only my tests show it every time.

the error happens for me as soon as the game gotoAndStop's on a level.
Quote:
RangeError: Error #1506: The specified range is invalid.
at cmodule.Box2D::FSM__start/work()
at cmodule.Box2D::CRunner/work()
at cmodule.Box2D::CLibInit/init()
at Box2DAS.Common::b2Base$/initialize()
at Box2DAS.Dynamics::b2World()
at wck::World/create()
at misc::Entity/ensureCreated()
at wck::BodyShape/create()
at misc::Entity/ensureCreated()


also if your testers are just running the swf/html then "The Jon" is you, file locations in errors are based on the File locations of whom ever published the fla.
not that it's relevant, could save you from chasing your tail a bit though i guess.

i hope mayobutter might have some insight on what could cause this.


Top
 Profile  
 
PostPosted: Thu Dec 16, 2010 9:29 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
looks like b2Base initialize() is as close as flash gets to the error:

i put traces in the function like so.
Code:
public static function initialize(defs:Boolean = true):void {
   trace("initialize");
   trace("initialized: "+initialized);
   if(initialized) {
      return;
   }
   initialized = true;
   loader = new CLibInit();
   trace("loader: "+loader);
   lib = loader.init();
   trace("lib: "+lib);
   mem = new MemUser();
   trace("mem: "+mem);
   bytes = gstate.ds;
   trace("bytes: "+bytes);
   trace("defs: "+defs);
   if(defs) {
      trace("b2Def: "+b2Def);
      b2Def.initialize();
   }
}


locally (which doesn't give me the error) i got:
initialize
initialized: false
loader: [object CLibInit]
lib: [object Object]
mem: [object MemUser]
bytes:
defs: true
b2Def: [class b2Def]

on the server i get:
initialize
initialized: false
loader: [object CLibInit]
*INSERT ERROR HERE*


so the error happens some where in lib = loader.init();
i will start looking into that assuming its actionscript and not c++


Top
 Profile  
 
PostPosted: Thu Dec 16, 2010 9:33 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
loader is an instance of CLibInit which i don't see in the WCK folders, please advise.


Top
 Profile  
 
PostPosted: Thu Dec 16, 2010 10:09 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
narrowing it down, it only happens for me when wrapped in html currently
in fact i just tried the auto publish html and it's fine, so something in my clients html breaks it.

that makes it a wck/alchemy error caused by an html error..... ??
oh well

if i find something specific about the html that causes the problem i will post it, but im not really an html person. perhaps its wrapping it in another swf.


Top
 Profile  
 
PostPosted: Thu Dec 16, 2010 10:29 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
looks like my cs4 game is being loaded by a cs5 swf

i tried publishing my game in cs5, it has an error w/o output or compile error.
i will restart my system to see the error, i have a feeling it has to do with World being part of cs5. although i thought i grabbed the lasted WCK from getHub....


Top
 Profile  
 
PostPosted: Thu Dec 16, 2010 11:05 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
last time i said WCK didn't work well with CS5 mayobutter said i was using a really old version.
my current practice is to grab the latest version from gethub
https://github.com/jesses/wck/archives/master

if thats not the latest version, do i need to keep its SVN up to date to make sure i have the latest version?


Top
 Profile  
 
PostPosted: Thu Dec 16, 2010 5:22 pm 
Offline

Joined: Fri Dec 14, 2007 8:07 pm
Posts: 913
CLibInit is defined in the Box2D.swc. If you want to learn more check out the alchemy docs. It's how you setup everything in the C++ realm.

Ha, I never even noticed that download button. I've always used git to checkout / checkin. The download link is the latest version though. What I had to do to get everything CS5 compatible is check every "World" reference to "wck.World". You may still have references to just plain "World" in your own code, but that would result in a compile time error.


Top
 Profile  
 
PostPosted: Fri Dec 17, 2010 8:37 pm 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
the shell fla must be corrupted
created a new fla in cs5, copied frames, copied library, made all publish settings identical, new fla doesn't create the glitch.

yay for cs5 corrupted files, any idea how to look at the xml or byte code behind a cs5 fla file? i've heard its possible.


Top
 Profile  
 
PostPosted: Sat Dec 18, 2010 7:49 am 
Offline

Joined: Fri Dec 14, 2007 8:07 pm
Posts: 913
Yeah, CS5 has a new format that saves everything as XML. I had to fix a project that Flash could no longer open by saving it as XML and manually fixing it.


Top
 Profile  
 
PostPosted: Sat Dec 18, 2010 8:27 am 
Offline

Joined: Tue Feb 24, 2009 4:10 pm
Posts: 564
Location: Michigan
thanks, i overlooked a publish setting.
it was set to FlashPlayer9 needed to be FlashPlayer10

save as xfl seems very helpful thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group