glitchassassin / screeps-cartographer

Cartographer is an advanced (and open source) movement library for Screeps
29 stars 8 forks source link

Serialization errors #46

Closed glitchassassin closed 1 year ago

glitchassassin commented 1 year ago

Seeing serialization errors like this on screepsplus server0:

!!! RangeError: [utf15][RangeError]: x out of bounds: -20476                                            
        at assert (main:5211:30)                                                                        
        at num_to_code_point (main:5216:9)                                                              
        at Codec.encode (main:5402:32)                                                                  
        at packPos (main:5576:30)                                                                       
        at main:5632:46                                                                                 
        at Array.map (<anonymous>)                                                                   
        at packPosList (main:5632:20)                                                                   
        at Object.serialize (main:5868:16)                                                              
        at Object.set (main:5500:28) 

Let's do some more thorough testing with a wide range of room positions to make sure packing works as intended

glitchassassin commented 1 year ago

Issue with signed vs. unsigned bit shifts. Should be fixed in 1.6.2