Giter Site home page Giter Site logo

Comments (6)

SamsamTS avatar SamsamTS commented on July 17, 2024

Could prop be null in ZoneBlockDetour at Line 754?

foreach (var prop in buildingInfo.m_props)

It's the only thing I can see that would throw a NullReferenceException in SimulationStep.

from buildingthemes.

boformer avatar boformer commented on July 17, 2024

Yes, maybe m_props is null in some cases.

from buildingthemes.

SamsamTS avatar SamsamTS commented on July 17, 2024

What I had in mind is that if prop is null then it would throw an exception when you try to access m_position on the next line :

biggestPropPosZ = Mathf.Max(biggestPropPosZ, buildingInfo.m_expandFrontYard ? prop.m_position.z : -prop.m_position.z);

so maybe you should add a test, it wouldn't hurt.

if (prop != null) biggestPropPosZ = Mathf.Max(biggestPropPosZ, buildingInfo.m_expandFrontYard ? prop.m_position.z : -prop.m_position.z);

EDIT: But I guess if m_prop is null it would also throw a NullReferenceException

from buildingthemes.

boformer avatar boformer commented on July 17, 2024

I pushed a fix to master. Do you know how to enable line numbers in exceptions? That would be so helpful.

from buildingthemes.

SamsamTS avatar SamsamTS commented on July 17, 2024

The game isn't compiled in debug mode so no line numbers unfortunately. Maybe with a hacked mono VM or something.

from buildingthemes.

boformer avatar boformer commented on July 17, 2024

Nailed it down. This is the issue: Image

from buildingthemes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.