Earlier today I was playing on my survival Realm and I spotted a creeper in the spawn river, I then ran the command /give @p diamond_sword but the game crashed and it didn't give me the sword, at first I thought it was the texture pack so I turned off the texture pack and then logged onto my Realm and ran the command again but the same thing happened, so then I turn the resorce pack back on and then change the UI to Pocket and ran the command again, it functioned the way it should, then I swiched back to the Classic UI and tried giving other things, went to other worlds, tried using /give to give me items, I even tested the diamond sword but the game didn't crash, I then went to another Xbox Live account that I added to the Realm and ran the command and the same thing happened, I didn't test it on a different device, so I'm sure it only affects the device I'm running
[EDIT 1] It only works when giving yourself one through the same account, I tried two different accounts on at the same time, and I didn't have this issue
Cannot reproduce this on LG Nexus 5, Android 6.0.1