KLWP File system issue

If I try to use a path to an image as the bitmap, using options like manually setting the entire path, using the $tu(rndimg) function, or even broadcasting the file path through a variable from tasker, it does not show up.

Only when I manually select an image through the image picker (which involves using the android file picker) does the image show up.

All permissions have been granted to the apps, running OxygenOS 14 (Android 14). KLWP v 3.77.

EDIT: I tried to assign a global variable to the tasker variable, and set my image bitmap to the global variable, and the app crashed. Here is the log:

FATAL EXCEPTION: main
Process: org.kustom.wallpaper:editor, PID: 24991
java.lang.NullPointerException
at org.kustom.lib.render.GlobalVar.D(Unknown Source:59)
at org.kustom.lib.render.GlobalVar.C(Unknown Source:14)
at org.kustom.lib.render.GlobalsLayerModule.n(Unknown Source:19)
at org.kustom.lib.render.RenderModule.getGlobalValue(Unknown Source:23)
at org.kustom.lib.render.RenderModule.getValue(Unknown Source:46)
at org.kustom.lib.render.RenderModule.getString(SourceFile:1)
at org.kustom.lib.render.RootLayerModule.invalidateContentRequest(Unknown Source:78)
at org.kustom.lib.render.RootLayerModule.onDataChanged(Unknown Source:92)
at org.kustom.lib.render.RenderModule.dataChanged(Unknown Source:234)
at org.kustom.lib.render.RenderModule.onGlobalChanged(Unknown Source:73)
at org.kustom.lib.render.LayerModule.onGlobalChanged(Unknown Source:0)
at org.kustom.lib.render.GlobalsLayerModule.onGlobalChanged(Unknown Source:0)
at org.kustom.lib.render.FlowsLayerModule.onGlobalChanged(Unknown Source:5)
at org.kustom.lib.render.RenderModule.setGlobal(Unknown Source:13)
at org.kustom.lib.editor.settings.BasePrefFragment.J3(Unknown Source:4)
at org.kustom.lib.editor.preference.v.n(Unknown Source:10)
at org.kustom.lib.editor.preference.v.c(Unknown Source:0)
at org.kustom.lib.editor.preference.u.onClick(Unknown Source:4)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1318)
at android.widget.AdapterView.performItemClick(AdapterView.java:352)
at android.widget.AbsListView.performItemClick(AbsListView.java:1277)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3294)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:255)
at android.os.Looper.loop(Looper.java:364)
at android.app.ActivityThread.main(ActivityThread.java:8979)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1053)

EDIT 2: Using flows, I was able to access the image and the image is getting rendered in the editor, however it does not show up on my homescreen when the wallpaper is applied.

1 Like

You are probably expecting the same issue I am now: Sudden "permission denied" errors on file accesses

Hmm. it seems on android 12 it seems to work fine on mine $tu(rndimg,1,"/storage/emulated/0/DCIM/Camera")$ it did give me valid path without crashing though i’m on klwp 3.75b410013. did you try restart app(force-stop then open and apply wall again) ?

Android 12 would work fine, but I’m on Android 14 :cry:

Might be, I haven’t checked the log activity that deeply, only checked it for the app crash, which I posed above.

Could be an access issue. Can you move the file you’re trying to access inside the Kustom folder and see if it’ll work that way?

1 Like

I’m really sorry, Ace. This picture you have is quite distressing for me.

One solution, how can i remove it from my side? Is this possible?

Yes, that worked, slightly.

What I ended up doing was indeed moving the photos inside the Kustom folder, which KLWP already had access to. Even after that sometimes there were issues, and if I sent the full file path via tasker, klwp was still not able to access the file (even though the file was inside the kustom folder).

I ended up using the pick images action in flow to first set a global text variable with a content uri type path to the image in the kustom folder, noted the exact content uri path, and then dynamically passed only the final value of the path (the actual name of the file and extension).

Essentially I hardcoded the bitmap value to this:

content://com.android.externalstorage.documents/tree/primary%3ADocuments%2FKustom%2Fbackgrounds/document/primary%3ADocuments%2FKustom%2Fbackgrounds%2F$br(tasker, wallpaperHome)$

I tried this and it didn’t work for me, with or without parallel rendering.
this is what I’m trying to use
file:///storage/emulated/0/Kustom/Wallpaper/$tu(seq,5,1,6)$.jpg
I’ve also tried without the tu sequence.

Try just the following:

/Kustom/Wallpaper/$tu(seq,5,1,6)$.jpg

That worked perfectly thank you.