Randomly missing UI textures after asynchronous loading on Android
Hello Noesis team!
There is a problem with control textures rendering involving textures that are loaded asynchronously.
Problem:
We use class derived from Noesis::TextureProvider to asynchronously load textures. It provides a placeholder first, after load it updates the texture and size.
Some UI textures randomly keep size of a placeholder.
The issue does not reproduce consistently and is difficult to reproduce on demand.
The visual tree is created correctly, controls exist, layout is correct, but some image appear broken.
Additional observations:
1. The problem only occurs during asynchronous loading. If the TextureProvider performs synchronous loading the problem does not occur.
2. Reopening the same screen fixes the issue. After the texture has already been loaded once and the TextureProvider returns the cached texture immediately, all images render correctly. The problem only occurs during the initial asynchronous load.
3. Manually notifying the Control after the texture becomes available fixes the issue. We use Noesis::BitmapImage->SetUriSource(Noesis::Uri("")) and then Noesis::BitmapImage ->SetUriSource(actual loaded url) and it makes controls update their textures. Without this some textures may remain missing until the UI is recreated.
Hypothesis:
Based on these observations, it appears that Noesis may occasionally miss or ignore texture availability when textures become ready asynchronously after the UI has already been created.
The behavior seems to depend on timing rather than on specific texture content.
Environment:
NoesisGUI 3.2.10, Android, OpenGL ES renderer, Textures are provided through a custom asynchronous TextureProvider backed by a database.
Questions:
Is there a recommended method for asynchronously supplying textures to Noesis?
Any guidance would be greatly appreciated.
Regards,
Aleksandr.
There is a problem with control textures rendering involving textures that are loaded asynchronously.
Problem:
We use class derived from Noesis::TextureProvider to asynchronously load textures. It provides a placeholder first, after load it updates the texture and size.
Some UI textures randomly keep size of a placeholder.
The issue does not reproduce consistently and is difficult to reproduce on demand.
The visual tree is created correctly, controls exist, layout is correct, but some image appear broken.
Additional observations:
1. The problem only occurs during asynchronous loading. If the TextureProvider performs synchronous loading the problem does not occur.
2. Reopening the same screen fixes the issue. After the texture has already been loaded once and the TextureProvider returns the cached texture immediately, all images render correctly. The problem only occurs during the initial asynchronous load.
3. Manually notifying the Control after the texture becomes available fixes the issue. We use Noesis::BitmapImage->SetUriSource(Noesis::Uri("")) and then Noesis::BitmapImage ->SetUriSource(actual loaded url) and it makes controls update their textures. Without this some textures may remain missing until the UI is recreated.
Hypothesis:
Based on these observations, it appears that Noesis may occasionally miss or ignore texture availability when textures become ready asynchronously after the UI has already been created.
The behavior seems to depend on timing rather than on specific texture content.
Environment:
NoesisGUI 3.2.10, Android, OpenGL ES renderer, Textures are provided through a custom asynchronous TextureProvider backed by a database.
Questions:
Is there a recommended method for asynchronously supplying textures to Noesis?
Any guidance would be greatly appreciated.
Regards,
Aleksandr.
Re: Randomly missing UI textures after asynchronous loading on Android
I will continue the conversation in the ticket created for this (#5145).
Re: Randomly missing UI textures after asynchronous loading on Android
I ran into something very similar with a custom asynchronous texture loader. In my case, the texture itself was loaded correctly, but the UI didn't always refresh after the placeholder was replaced. Reassigning the image source or forcing a UI update fixed it every time, which sounds a lot like what you're seeing. It does seem related to the timing of when the texture becomes available rather than the texture data itself. I'm interested to hear if the Noesis team has a recommended pattern for async texture loading.Hello Noesis team!
There is a problem with control textures rendering involving textures that are loaded asynchronously.
Problem:
We use class derived from Noesis::TextureProvider to asynchronously load textures. It provides a placeholder first, after load it updates the texture and size.
Some UI textures randomly keep size of a placeholder.
The issue does not reproduce consistently and is difficult to reproduce on demand.
The visual tree is created correctly, controls exist, layout is correct, but some image appear broken.
Additional observations:
1. The problem only occurs during asynchronous loading. If the TextureProvider performs synchronous loading the problem does not occur.
2. Reopening the same screen fixes the issue. After the texture has already been loaded once and the TextureProvider returns the cached texture immediately, all images render correctly. The problem only occurs during the initial asynchronous web games load.
3. Manually notifying the Control after the texture becomes available fixes the issue. We use Noesis::BitmapImage->SetUriSource(Noesis::Uri("")) and then Noesis::BitmapImage ->SetUriSource(actual loaded url) and it makes controls update their textures. Without this some textures may remain missing until the UI is recreated.
Hypothesis:
Based on these observations, it appears that Noesis may occasionally miss or ignore texture availability when textures become ready asynchronously after the UI has already been created.
The behavior seems to depend on timing rather than on specific texture content.
Environment:
NoesisGUI 3.2.10, Android, OpenGL ES renderer, Textures are provided through a custom asynchronous TextureProvider backed by a database.
Questions:
Is there a recommended method for asynchronously supplying textures to Noesis?
Any guidance would be greatly appreciated.
Regards,
Aleksandr.
Re: Randomly missing UI textures after asynchronous loading on Android
Have you tried the suggestion in the ticket to upgrade to 3.2.13?
Who is online
Users browsing this forum: No registered users and 14 guests