Comments (7)
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.
Which branch are you using? Its quite interesting because the async method uses the sync method.
from ragemp.net.
im using the latest release (V1.2.0) on windows
from ragemp.net.
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.
wrapping MP.Utility.Schedule
around it works fine
await MP.Utility.Schedule(() => MP.TextLabels.New(player.GetPosition(), "test", 0, Color.White));
from ragemp.net.
This seems to be affecting the entire sync API, not just textlabels.
from ragemp.net.
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.
from ragemp.net.
Related Issues (3)
- IResource.OnStopAsync never called HOT 3
- Typo in native? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ragemp.net.