raian / runtimeimageloader Goto Github PK
View Code? Open in Web Editor NEWLoad images and GIFs into Unreal at runtime without hitches
License: MIT License
Load images and GIFs into Unreal at runtime without hitches
License: MIT License
Assertion Failed: !bFlushing
[File:...HTTP\Private\HttpManager.cpp] [Line: 397]
Also happens with LoadGif with Synchronous checked.
I bought the plugin in the unreal marketplace but because I am making a product from source code using UE 5.1, the unreal launcher couldn't find my project so I couldn't use the "Install to Project" button. So to make it work I downloaded the main branch from this github page into my project's engine Engine/Runtime folder, compiled the engine, then the project, added the plugin to the project, added the node (connected to the Runtime Image Loader subsystem), and ran the game in standalone mode.
Loading the link to the gif from the browser, outside of Unreal, works fine so I know it's not a problem with the image itself.
Loading Asynchronously works as expected.
This is often required for gallery-type projects or when user internet connection is slow
Working on a Vtubing program and the ability to customize things like screens in a room or have animated images attached to your avatar in a packaged project is something I want to add.
Packaging for Android (ASTC) resulted in an undefined symbol error if the OculusVR plugin is disabled.
UATHelper: Packaging (Android (ASTC)): ld.lld: error: undefined symbol: FRuntimeTiffLoadHelper::FRuntimeTiffLoadHelper()
UATHelper: Packaging (Android (ASTC)): >>> referenced by RuntimeImageUtils.cpp:33 (D:/src\username\ue4\DebugRIL\Plugins\RuntimeImageLoader\Source\RuntimeImageLoader\Private\RuntimeImageUtils.cpp:33)
UATHelper: Packaging (Android (ASTC)): >>> D:/src/username/ue4/DebugRIL/Plugins/RuntimeImageLoader/Intermediate/Build/Android/UE4/Development/RuntimeImageLoader/RuntimeImageUtils.cppa7.o:(_GLOBAL__sub_I_RuntimeImageUtils.cpp)
UATHelper: Packaging (Android (ASTC)):
UATHelper: Packaging (Android (ASTC)): ld.lld: error: undefined symbol: FRuntimeTiffLoadHelper::~FRuntimeTiffLoadHelper()
UATHelper: Packaging (Android (ASTC)): >>> referenced by RuntimeImageUtils.cpp:0 (D:/src\username\ue4\DebugRIL\Plugins\RuntimeImageLoader\Source\RuntimeImageLoader\Private\RuntimeImageUtils.cpp:0)
UATHelper: Packaging (Android (ASTC)): >>> D:/src/username/ue4/DebugRIL/Plugins/RuntimeImageLoader/Intermediate/Build/Android/UE4/Development/RuntimeImageLoader/RuntimeImageUtils.cppa7.o:(_GLOBAL__sub_I_RuntimeImageUtils.cpp)
UATHelper: Packaging (Android (ASTC)): clang++: error: linker command failed with exit code 1 (use -v to see invocation)
PackagingResults: Error: undefined symbol: FRuntimeTiffLoadHelper::FRuntimeTiffLoadHelper()
PackagingResults: Error: undefined symbol: FRuntimeTiffLoadHelper::~FRuntimeTiffLoadHelper()
PackagingResults: Error: linker command failed with exit code 1 (use -v to see invocation)
I have a separate project and enabling OculusVR did not resolve the error, but so far this was how I found out that I could recreate the error from a new project.
This feedback is from Unreal marketplace.
Texture is not displayed properly because it required correctly set up TextureResource2D, which does not happen currently.
Solution: Replace TextureResource2D with custom TextureResource class
Generate cubemap texture.
Google request "unreal create cubemap runtime"
Marketplace request
Request from Marketplace
In my VR app I have a button that downloads the bytes array of an image and uses the plugin's function "LoadImageFromBytesAsync()" (from C++) to load the texture asynchronously.
The problem is that if I spam the button, my app crashes with the following error:
[...]
[2023.04.26-13.43.34:262][126]LogRuntimeImageReader: Reading image from byte array. First few bytes: 255 216 255
[2023.04.26-13.43.34:529][143]LogOutputDevice: Warning:
Script Stack (0 frames) :
[2023.04.26-13.43.34:664][143]LogAndroid: Error: === Critical error: ===
[2023.04.26-13.43.34:664][143]LogAndroid: Error:
[2023.04.26-13.43.34:664][143]LogAndroid: Error: Fatal error: [File:D:/UnrealEngineOculus/Engine/Source\Runtime/Core/Private/HAL/MallocBinned2.cpp] [Line: 1175]
[2023.04.26-13.43.34:664][143]LogAndroid: Error: FMallocBinned2 Attempt to GetAllocationSizeExternal an unrecognized block 0x3fc0000000000000
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB832C8AC libUnreal.so(0x000000000D82B8AC)![Unknown]() []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB832C758 libUnreal.so(0x000000000D82B758)!FMallocBinned2::GetAllocationSizeExternal(void*, unsigned long long&) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB839D76C libUnreal.so(0x000000000D89C76C)!FMallocPoisonProxy::Realloc(void*, unsigned long long, unsigned int) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB837B600 libUnreal.so(0x000000000D87A600)!FMemory::Realloc(void*, unsigned long long, unsigned int) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB569511C libUnreal.so(0x000000000AB9411C)!TArray<char16_t, TSizedDefaultAllocator<32> >::ResizeForCopy(int, int) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB618D3A4 libUnreal.so(0x000000000B68C3A4)![Unknown]() []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB618C2E0 libUnreal.so(0x000000000B68B2E0)!URuntimeImageLoader::Tick(float) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BBDC6D5B0 libUnreal.so(0x000000001316C5B0)!FTickableGameObject::TickObjects(UWorld*, int, bool, float) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BBCFD50AC libUnreal.so(0x00000000124D40AC)!UGameEngine::Tick(float, bool) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB5677F74 libUnreal.so(0x000000000AB76F74)!FEngineLoop::Tick() []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB566F724 libUnreal.so(0x000000000AB6E724)!AndroidMain(android_app*) []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB567E468 libUnreal.so(0x000000000AB7D468)!android_main() []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007BB56B2808 libUnreal.so(0x000000000ABB1808)![Unknown]() []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007CB0B97C48 libc.so(0x00000000000D5C48)![Unknown]() []
[2023.04.26-13.43.34:664][143]LogAndroid: Error: [Callstack] 0x0000007CB0B44FE8 libc.so(0x0000000000082FE8)![Unknown]() []
It occurs 100% times when I spam the button and sometimes it crashes even if I start the app and spawn just one image.
If I use the Sync version of that function, the problem goes away, but the app hitches again.
This problem doesn't occur in PIE (so when using Windows build).
I post below my code:
void UImageDownloader::ManageTextureBytes(TArray<uint8> Data)
{
FLatentActionInfo LatentInfo;
LatentInfo.CallbackTarget = this;
LatentInfo.ExecutionFunction = TEXT("OnImageLoaded");
LatentInfo.UUID = 123;
LatentInfo.Linkage = 0;
URuntimeImageLoader* Loader = GetOuter()->GetWorld()->GetSubsystem<URuntimeImageLoader>();
FString Error;
bool bSuccess;
Loader->LoadImageFromBytesAsync(Data, FTransformImageParams(), OutTexture, bSuccess, Error, LatentInfo, GetOuter()->GetWorld());
}
Details:
https://github.com/phoboslab/qoi
Loading GIFs (and webp) is possible at runtime but requires some work around loading and decoding data.
This problem happens in 1.2.2.
1.2.1 seems no problem, which can exit back to edit time normally.
Hello I create a system of replicated graffity with the help of your plugin to create a cache system for each graff, but I found a memoryleak in your plugin, because when I load many png then close the editor the vram is not flush so you can simply code this:
To reproduce the memory leak, so you start the game then you stop you restart.. And you can see the vram increasing without flushing. Let me know if you need more information or if I simply need to do something to handle this myself thank in advance !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.