View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003906 | NoesisGUI | C++ SDK | public | 2025-01-16 12:47 | 2025-01-21 18:44 |
| Reporter | Mikhail Yanakayev | Assigned To | sfernandez | ||
| Priority | normal | Severity | crash | ||
| Status | feedback | Resolution | open | ||
| Product Version | 3.2.6 | ||||
| Summary | 0003906: Application sometimes crashed inside DynamicTextureSource callback | ||||
| Description | After DynamicTextureSource object deletion there still TextureRenderCallback can be called with garbage pointer as parameter | ||||
| Steps To Reproduce | Create DynamicTextureSource object with render callback | ||||
| Platform | Any | ||||
|
We have been discussing this and your usage of DynamicTextureSource is fundamentally wrong. The callbacks of the DynamicTextureSource source are invoked in the render-thread. You are not allowed to use objects of the main thread in these callbacks. So you can't pass "this" to the parameter and you can't use Visual in this callback. We need to understand more why you need a DynamicTextureSource and find an alternative. |
|
|
We're using animation inside the texture and have to show new state every frame, so using DynamicTexture for this |
|
|
What do you need to render inside the texture? Another XAML ? |
|
|
We need to render 3d model in a menu. For this we're using Image with DynamicTextureSource as source. Then we render that model inside the texture and show it, |
|
|
You don't need a DynamicTextureSource for that. You can render the model inside the texture and then use WrapTexture to create a Noesis::Texture given a low-level GPU texture handle. |
|
|
So after that we still can animate model and update its position every frame? Is it some sample of that? |
|
|
Using WrapTexture is the best way to achieve what you want because you are 100% in charge of creating and filling the texture per frame (not using Noesis, using your renderer). WrapTexture gives you a Noesis::Texture that wraps your low-level handle. This allows to use the texture in Noesis. Are you using our GLRenderDevice? There is not workaround for DynamicTextureSource because it was created for a different thing. You can't interact with objects belonging to the main thread inside DynamicTextureSource callbacks. |
|
|
We're using our own engine render device as base. But I understood - I'll try your method when we'll have a time. |
|
|
If you are using your own render device, then you have a custom implementation of Noesis::Texture. Just expose a way to create a Noesis::Texture given a low-level texture handle. That should work. Please, let me know if you need help with this. I am going to leave the ticket open for now. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-01-16 12:47 | Mikhail Yanakayev | New Issue | |
| 2025-01-17 22:52 | jsantos | Assigned To | => sfernandez |
| 2025-01-17 22:52 | jsantos | Status | new => assigned |
| 2025-01-17 22:52 | jsantos | Target Version | => 3.2.7 |
| 2025-01-20 12:49 | jsantos | Note Added: 0010277 | |
| 2025-01-20 12:49 | jsantos | Target Version | 3.2.7 => |
| 2025-01-20 12:49 | jsantos | Status | assigned => feedback |
| 2025-01-20 14:31 | Mikhail Yanakayev | Note Added: 0010278 | |
| 2025-01-20 14:31 | Mikhail Yanakayev | Status | feedback => assigned |
| 2025-01-20 18:02 | jsantos | Note Added: 0010279 | |
| 2025-01-20 18:02 | jsantos | Status | assigned => feedback |
| 2025-01-20 18:44 | Mikhail Yanakayev | Note Added: 0010280 | |
| 2025-01-20 18:44 | Mikhail Yanakayev | Status | feedback => assigned |
| 2025-01-20 18:53 | jsantos | Note Added: 0010281 | |
| 2025-01-20 18:53 | jsantos | Status | assigned => feedback |
| 2025-01-20 19:21 | Mikhail Yanakayev | Note Added: 0010282 | |
| 2025-01-20 19:21 | Mikhail Yanakayev | Status | feedback => assigned |
| 2025-01-21 11:46 | jsantos | Note Added: 0010283 | |
| 2025-01-21 11:46 | jsantos | Status | assigned => feedback |
| 2025-01-21 12:06 | sfernandez | Note Edited: 0010283 | |
| 2025-01-21 12:23 | Mikhail Yanakayev | Note Added: 0010284 | |
| 2025-01-21 12:23 | Mikhail Yanakayev | Status | feedback => assigned |
| 2025-01-21 18:44 | jsantos | Note Added: 0010286 | |
| 2025-01-21 18:44 | jsantos | Status | assigned => feedback |