[Samsung Galaxy S Duos] billysam:
As I mentioned It's random,

Same zip file,

flashed on stock deodexed rom, works

flashed on other device and Rom, works

flashed on regular and physical build of cm11 build for s7562,

Same file

first flash worked without error, second flash also, third time, caused app data loss.

(on enforcing mode, it caused apps and data wiped, gone from the system, although I could still see the apk in root/data/app no data/data/ files. try to reinstall, it couldn't access data and no apps could be installed again, permissive mode solved this issue.)

An example of my updater script

run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
delete("/system/media/bootanimation.zip");
delete("/data/local/bootanimation.zip");
ui_print(" || ");
ui_print(" || ");
package_extract_dir("system", "/system");
set_perm(0, 0, 0755, "/system/media/bootanimation.zip");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "umount", "/system");

I was surprised to see that cm11 rom zip(unchanged) file didn't flash one time.

mount: failed to mount /dev/block/mmcblk0p16 at /system: Device or resource busy
minzip: Extracted file "/system/etc/install-cm-recovery.sh"
minzip: Extracted file "/system/recovery-from-boot.p"
minzip: Extracted file "/system/addon.d/50-cm.sh"
minzip: Extracted file "/system/addon.d/blacklist"
minzip: Can't create containing directory for "/system/app/Apollo.apk": Invalid argument
symlink(): created [/system/bin]
symlink(): created [/system/fonts]
symlink(): created [/system/xbin]
failed to mkdir /system/lib/libGLESv3.so: Invalid argument
symlink: failed to symlink /system/lib/libGLESv3.so to libGLESv2.so: making parents failed
symlink: failed to symlink /system/lib/libGLESv3.so to libGLESv2.so: No such file or directory
script aborted: symlink: some symlinks failed
symlink: some symlinks failed
E:Error executing updater binary in zip '/sdcard/7562/Roms/cm-11-20160305-UNOFFICIAL-kylessopen.zip'
Error flashing zip '/sdcard/7562/Roms/cm-11-20160305-UNOFFICIAL-kylessopen.zip'

(Solved by wiping system data cache, and reboot recovery, flashed it again, worked.)

I mentioned zramoff and 01backgroundwriteout exactly for the same reason, it cannot affect anything, it's irrelevant here. I even exclude the point of any other tweaks, forget putting anything or changing anything at all. just pushed bootanimation zip in a workable flashable file. no wipe scripts there in updater script. I even gone through the logcat and recovery.log files. couldn't find anything there that initiated a data wipe.

the problem is I can't even reproduce that situation again myself, it just happens randomly, I have been trying from yesterday and before too(almost a week now), flashing same sets of zip file, just to get hold of it again. but in permissive mode it hardly occurs. just once till now.

it's like catching a ghost, so I guess, I will stop at permissive mode, it works great. no complaints here guys.

I have achieved a lot of modification and done testing to the latest cm11 build. so will not bother more for this.

maybe it's just my device getting frustrated by all the experiments I am doing with it.

Sorry to bother you guys, with this.