shamsdev/davinci

Random NullReferenceExceptions (on System.IO.File.WriteAllByte)

Opened this issue · 3 comments

Trying to load url based images like https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=0x538620f25d8115d310421d8443c13fafa066574c

Getting NullReferenceException

NullReferenceException: Object reference not set to an instance of an object
System.IO.File.WriteAllBytes (System.String path, System.Byte[] bytes) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Davinci+<Downloader>d__38.MoveNext () (at Assets/davinci-master/davinci-master/Davinci/Assets/Davinci/Scripts/Davinci.cs:369)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <f7f0a900fdf94a2a9316bb3d4c5aa3e8>:0)

Using latest zip download just minutes ago

In other instances, the API call succeeds with all the events logged and successful, yet no image is visible in the image component:
https://i.imgur.com/L8sn6I8.png

Tried using multiple image sources

Running on Unity 2021.1.18

Facing the same issue - WriteAllBytes call either throws a null ref exception or shows a blank/missing sprite
Screen Shot 2021-12-08 at 11 59 52 AM

I can't work on this atm, maybe @shamsdev can