-
- Mikhail Yanakayev
- Posts: 15
- Joined:
DynamicTextureSource crash in callback after deletion
Hello,
We're using class inherited from DynamicTextureSource with callback on texture rendering. Problem is after this class deletion callback can still be called with garbage pointer inside second parameter. What's right procedure of deletion such classes with proper callback call cancellation?
Code below:
Thanks!
We're using class inherited from DynamicTextureSource with callback on texture rendering. Problem is after this class deletion callback can still be called with garbage pointer inside second parameter. What's right procedure of deletion such classes with proper callback call cancellation?
Code below:
Code: Select all
MyDynamicTextureSource::MyDynamicTextureSource(uint32_t width, uint32_t height) :
Noesis::DynamicTextureSource(width, height, &DynamicTextureSourceCallback, this),
{
}
MyDynamicTextureSource::~MyDynamicTextureSource()
{
}
Noesis::Texture* MyTextureSource::DynamicTextureSourceCallback(Noesis::RenderDevice* device, void* user)
{
DragonDynamicTextureSource* source = (DragonDynamicTextureSource*)user;
Noesis::Visual* visual = Noesis::DynamicCast<Noesis::Visual*>(source->GetNodeParent()); //crash here
MyRender(visual);
}
Re: DynamicTextureSource crash in callback after deletion
Could you please create a ticket for this? This was partially fixed in the Studio branch but we do still need a better solution.
-
- Mikhail Yanakayev
- Posts: 15
- Joined:
Re: DynamicTextureSource crash in callback after deletion
Sure. Ticked has been created:
https://www.noesisengine.com/bugs/view.php?id=3906
Is there a chance that crash will not occur in 3.2.7 version? Or some workaround already exists maybe?
https://www.noesisengine.com/bugs/view.php?id=3906
Is there a chance that crash will not occur in 3.2.7 version? Or some workaround already exists maybe?
Re: DynamicTextureSource crash in callback after deletion
Let's continue the conversation in the created ticket. Your usage of DynamicTextureSource is not correct and we need to find an alternative.
Who is online
Users browsing this forum: No registered users and 8 guests