Ultralight
Ultralight copied to clipboard
ulDestroyRenderer/ulCreateRenderer crashes
Attempting to call ulDestroyRenderer followed by ulCreateRenderer will crash the application somewhere in ulUpdate when trying to use the newer Renderer instance.
I see in the documentation that ulCreateRenderer should only be called once per process, which I hoped meant "only one should exist at a time" (which would be fine) and not "you can never destroy and re-create it once created".
Our application uses hot-reloading, where all libraries need to be able to be destroyed and recreated when we swap code, so this breaks us badly - is it feasible to make Ultralight able to tear down cleanly?
frame #1: 0x00007f2e21e68457 libUltralightCore.so`ultralight::ImageImpl::~ImageImpl() + 39
frame #2: 0x00007f2e1e6cc813 libWebCore.so`WebCore::ScalableImageDecoderFrame::~ScalableImageDecoderFrame() + 83
frame #3: 0x00007f2e1e6cc368 libWebCore.so`WebCore::ScalableImageDecoder::~ScalableImageDecoder() + 120
frame #4: 0x00007f2e1e6cf630 libWebCore.so`WebCore::GIFImageDecoder::~GIFImageDecoder() + 64
frame #5: 0x00007f2e1f4e110b libWebCore.so`WebCore::ImageSource::~ImageSource() + 571
frame #6: 0x00007f2e1f4a2ab4 libWebCore.so`WebCore::BitmapImage::~BitmapImage() + 164
frame #7: 0x00007f2e1f4a2b99 libWebCore.so`WebCore::BitmapImage::~BitmapImage() + 9
frame #8: 0x00007f2e1f36ad1a libWebCore.so`WebCore::CachedImage::destroyDecodedData() + 154
frame #9: 0x00007f2e1f37ffd9 libWebCore.so`WebCore::MemoryCache::pruneDeadResourcesToSize(unsigned int) + 473
frame #10: 0x00007f2e1f3e17be libWebCore.so`WebCore::releaseMemory(WTF::Critical, WTF::Synchronous, WebCore::MaintainPageCache, WebCore::MaintainMemoryCache) + 862
frame #11: 0x00007f2e228cbd65 libUltralight.so`ultralight::RendererImpl::Update() + 325
frame #12: 0x00007f2e228b51ff libUltralight.so`ulUpdate + 687