Git Product home page Git Product logo

Comments (9)

migueldeicaza avatar migueldeicaza commented on May 18, 2024

Please provide a stack trace

from urho.

EgorBo avatar EgorBo commented on May 18, 2024

@migueldeicaza looks like it caused by overflow of StringHash.Code field (it should be uint instead of int) because now for that specific class (ConstraintGear2D) the StringHash LookupStringHash returns hash with a negative big code.

from urho.

EgorBo avatar EgorBo commented on May 18, 2024

I've just checked - ConstraintGear2D::GetTypeStatic() returns 4159594590 (almost twice larger than Int32.MaxValue).
Same crash happens for several types (samples).

from urho.

migueldeicaza avatar migueldeicaza commented on May 18, 2024

I am confused, can you produce a small reproduction test case?

from urho.

EgorBo avatar EgorBo commented on May 18, 2024

@migueldeicaza
um...
just execute this in C#: (Samples project, Program.cs)

var valueMono = ConstraintGear2D.TypeStatic.Code;

valueMono is -135372706
same code in C++

auto valueCpp = ConstraintGear2D::GetTypeStatic();

valueCpp is 4159594590

but they should be the same. that's because of int type of Code field in StringHash instead of uint (used in C++ version).

from urho.

migueldeicaza avatar migueldeicaza commented on May 18, 2024

They are internally the same value. Both -135372706 and 4159594590 are the same bit pattern (0xf7ee605e).

So the question is: how do I reproduce the crash, not how do I reproduce the two values rendering differently.

from urho.

EgorBo avatar EgorBo commented on May 18, 2024

Oh, you are right, they are the same. let me collect the stacktrace.

from urho.

EgorBo avatar EgorBo commented on May 18, 2024

I've filed an issue - #54

from urho.

EgorBo avatar EgorBo commented on May 18, 2024

closing with #54 with fix 85b3fc0 fix is verified.

from urho.

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.