Null object updateworld()?

BlitzMax Modules Forums/MiniB3D/Null object updateworld()?

Im getting an attemted to access null object error on updateworld. What generally could be causing this?

No idea. Code sample?

Here is the exact error: Unhandled Exception:Attempt to access field or method of Null object

theres way to much code to post (im converting one of my b3d programs) unfortunately im getting the problem on updateworld. It runs fine without it (except for the collisions & anim of course).

Heres the collisions:

Function init_collisiondata()
	ClearCollisions
	Collisions C_BULLET,C_ship,2,1
	Collisions C_BULLET,C_LEVEL,2,1
	Collisions C_BULLET,C_WATER,2,1
	Collisions C_BULLET,C_MONSTER,1,1
	Collisions C_MONSTER,C_MONSTER,1,2
	Collisions C_MONSTER,C_PLAYER,1,2
	Collisions C_MONSTER,C_SHIP,2,2
	Collisions C_MONSTER,C_LEVEL,2,2
	
	Collisions C_PLAYER,C_PLAYER,1,2
	Collisions C_PLAYER,C_SHIP,2,2
	Collisions C_PLAYER,C_LEVEL,2,2
	Collisions C_PLAYER,C_MONSTER,1,2
	Collisions c_ship,c_ship,2,2
	Collisions C_shadow,C_LEVEL,2,1
	Collisions C_BONUS,C_LEVEL,2,1
	Collisions C_SHIP,C_LEVEL,2,1
	Collisions C_Collector,C_Bonus,1,1
End Function

Main loop:
		Repeat

			'Frame counter
			framecounter=framecounter+1
			If MilliSecs() => basetime+1000
				basetime=MilliSecs()
				FPS=framecounter
				framecounter=0
			EndIf 	
			spritetext(0,50,"FPS "+fps,P.camera,1)
	
			'sound buffers
			If sndbuffer_explosion>0 sndbuffer_explosion=sndbuffer_explosion-1


			'game updates	
			limitfps()
			UpdateEmitters()
			UpdateParticles()
			If endlevel=0 UpdatePlayers()
			Update_bonuses()
			Updatemonsters(level,p.pivot)
			UpdateFlares(p.camera)
			Updatebullets(p.camera)
			updateripples()
			updateexplosion()
			
			If endlevel=0 updateship()
			updatemagnetring()
			updatebloodbomb()
			If endlevel=-1 updategameover(p.camera)
			If endlevel=1 updatelevelcomplete(p.camera)

			updateredout()
					
			UpdateWorld
			
			dl_update()

			updateradar(p.pivot)


			updatehud(p1lives,p1score,p:player)
			updatewaterfog(p.camera,p.underwatersprite)
			
			PositionEntity sky,p.x,p.y-100,p.z
			Updatelensflare(p.camera)
			Updatecubemaps(p.camera)
			RenderWorld 
			
			updatespritetext()
				
			'Text 0,0,"SCORE="+Str(score)+" p1p.lives="+Str(p1p.lives)+" Pacfuel="+Str(p.pakfuel)+" Shipfuel="+Str(p.shipfuel)
			Flip 
					

		Until  endlevel>9 Or KeyDown(KEY_ESCAPE)




Ive no idea what could be causing it.

ok i narrowed it down to the collision assignments. If i comment out all the collisions that reference non existant object types it works :/

I managed to get 2 of the collision systems working but it is very slow with more than one assignment.

-player to terrain is smooth enough
-bonus to terrain as well is really slow theres mabe 10-20 bonuses all with sphere to mesh.

Does the slowdown have something to do with the fact i am using integers as handles for everything?