Code Monkey home page Code Monkey logo

Comments (7)

Stricted avatar Stricted commented on June 2, 2024

using MP.TextLabels.NewAsync words fine
nevertheless it shouldnt crash when using the non async method

#
# Fatal error in HandleScope::HandleScope
# Entering the V8 API without proper locking in place
#

Segmentation fault

from ragemp.net.

nick-strohm avatar nick-strohm commented on June 2, 2024

Which branch are you using? Its quite interesting because the async method uses the sync method.

from ragemp.net.

Stricted avatar Stricted commented on June 2, 2024

im using the latest release (V1.2.0) on windows

from ragemp.net.

nick-strohm avatar nick-strohm commented on June 2, 2024

Try wrapping the sync New call inside a MP.Schedule call. Rage requires mostly everything to happen in the main thread. The async method wrapps the synced method inside a MP.Schedule call.

from ragemp.net.

Stricted avatar Stricted commented on June 2, 2024

wrapping MP.Utility.Schedule around it works fine
await MP.Utility.Schedule(() => MP.TextLabels.New(player.GetPosition(), "test", 0, Color.White));

from ragemp.net.

Timschuu avatar Timschuu commented on June 2, 2024

This seems to be affecting the entire sync API, not just textlabels.

from ragemp.net.

Micky5991 avatar Micky5991 commented on June 2, 2024

To give you a general rule regarding async/sync calls:

Async API: Directly and always safely usable. Those calls are already with MP.Utility.Schedule wrapped sync API calls.
Sync API: Must be used within MP.Utility.Schedule. We offer those sync methods to reduce overhead on your side and to group batches of calls together.

See V1.2.0 changelog

from ragemp.net.

Related Issues (3)

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.