Closed louisportalest closed 1 year ago
@louisportalest does it work outside of radlistview?
@louisportalest does it work outside of radlistview?
Yes it works outside of radlistview. But previously it work well on radlistview, not sure why it stops working now. i try to display the error from failure event and here what it says :
Error Domain=SDWebImageErrorDomain Code=2002 "Operation cancelled by user during querying the cache" UserInfo={NSLocalizedDescription=Operation cancelled by user during querying the cache}
can't really see what s going on with this. sadly you need to investigate to see which version of which package broke it for you
I've started seeing this issue as well. I haven't been able to track down what changed to cause it.
It seems that in my case, the issue occurs on a NSImg
element that is in a Vue component that is toggled by a v-if
directive. When the Firebase auth state changes to "logged in", the v-if
expression resolves to false
and the component is destroyed. This is the action that causes the crash. Perhaps similar to the OP, where dynamic mounting and destroying of items in the RadListView
causes the crash?
If I change the v-if
to a v-show
(which keeps the component mounted but just hides it rather than destroying it), the problem goes away. I'm not sure if this is a good solution though.
@msn444 first v-if in listview template should never be done. Though it does not change the fact that you see a bug ;)
Could you try to replace with a simple ListView
and see if you still have the issue? That would help pinpoint the issue to RadListView
or the image plugin.
thanks
@farfromrefug Actually in my case there's no listview, Rad or otherwise. The problematic NSImg
was simply in a component sitting on the main page of the app, whose visibility was toggled by the Firebase login state, using the v-if
directive. Changing 'v-if' to 'v-show' solves it for me.
In another case, I have NSImg
in a component displayed in a list using v-for
. I haven't seen any problems with this method.
@msn444 OK i get it. I might have an idea. Will try a fix
@msn444 can you try 4.3.5 ?
@farfromrefug That seems to have solved it. Thanks for the ultra fast fix!
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
After i run a full clean build (ns clean), i got this error message and the app crashes whenever i scroll to a picture post with NSImg in a RadListView. Not sure why but before the clean build everything was working fine.
***** Fatal JavaScript exception - application has been terminated.
NativeScript encountered a fatal error: Uncaught TypeError: Cannot set property 'image' of null at _setNativeImage(file: node_modules/@nativescript-community/ui-image /index.ios.js:267:12) at Img.handleImageLoaded(file: node_modules/@nativescript-community /ui-image/index.ios.js:173:21)
I tried updating pod, the ui-image plugin and also nativescript, both also not working. Not sure what causing this.
Here is the code :