[Xposed General] judy2291:
I have decided to learn to write modules for xposed framework. I have written this code

package de.robv.android.xposed.mods.mainPK;

import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;

public class main implements IXposedHookLoadPackage {
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
XposedBridge.log("TestMod: " + lpparam.packageName);
}
}

However the code dose not work and when I look into the logcat I see this error

E/Xposed ( 606): java.lang.NullPointerException: src == null
E/Xposed ( 606):	at java.lang.System.arraycopy(System.java:192)
E/Xposed ( 606):	at java.lang.String._getChars(String.java:825)
E/Xposed ( 606):	at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:148)
E/Xposed ( 606):	at java.lang.StringBuilder.append(StringBuilder.java:216)
E/Xposed ( 606):	at de.robv.android.xposed.mods.mainPK.main.handleLoadPackage(main.java:9)
E/Xposed ( 606):	at de.robv.android.xposed.IXposedHookLoadPackage$Wrapper.handleLoadPackage(IXposedHookLoadPackage.java:34)
E/Xposed ( 606):	at de.robv.android.xposed.callbacks.XC_LoadPackage.call(XC_LoadPackage.java:61)
E/Xposed ( 606):	at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:106)
E/Xposed ( 606):	at de.robv.android.xposed.XposedBridge$4.afterHookedMethod(XposedBridge.java:285)
E/Xposed ( 606):	at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:752)
E/Xposed ( 606):	at android.app.LoadedApk.<init>(<Xposed>)
E/Xposed ( 606):	at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1795)
E/Xposed ( 606):	at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1757)
E/Xposed ( 606):	at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1729)
E/Xposed ( 606):	at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2204)
E/Xposed ( 606):	at android.app.ContextImpl.createPackageContext(ContextImpl.java:2185)
E/Xposed ( 606):	at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:677)
E/Xposed ( 606):	at android.app.ActivityThread.installProvider(ActivityThread.java:5012)
E/Xposed ( 606):	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4634)
E/Xposed ( 606):	at android.app.ActivityThread.installSystemProviders(ActivityThread.java:5220)
E/Xposed ( 606):	at com.android.server.am.ActivityManagerService.installSystemProviders(ActivityManagerService.java:10016)
E/Xposed ( 606):	at com.android.server.SystemServer.startOtherServices(SystemServer.java:492)
E/Xposed ( 606):	at com.android.server.SystemServer.run(SystemServer.java:285)
E/Xposed ( 606):	at com.android.server.SystemServer.main(SystemServer.java:186)
E/Xposed ( 606):	at java.lang.reflect.Method.invoke(Native Method)
E/Xposed ( 606):	at java.lang.reflect.Method.invoke(Method.java:372)
E/Xposed ( 606):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/Xposed ( 606):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
E/Xposed ( 606):	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:134)

I use cyanogenmod 12.1 5.1.1