android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1

Appcelerator JIRA | Wilson Luu | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Steps to reproduce: 1. Launch empty Titanium project to Android Emulator 4.0 Results: StrictMode policy violation is thrown in the TiStud console: {code:xml} D/StrictMode( 77): StrictMode policy violation; ~duration=812 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=151 violation=2 D/StrictMode( 77): at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1074) D/StrictMode( 77): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:94) D/StrictMode( 77): at libcore.io.IoBridge.open(IoBridge.java:390) D/StrictMode( 77): at java.io.FileOutputStream.<init>(FileOutputStream.java:88) D/StrictMode( 77): at java.io.FileOutputStream.<init>(FileOutputStream.java:73) D/StrictMode( 77): at com.android.internal.os.AtomicFile.startWrite(AtomicFile.java:59) D/StrictMode( 77): at com.android.server.AppWidgetService.saveStateLocked(AppWidgetService.java:1181) D/StrictMode( 77): at com.android.server.AppWidgetService$2.onReceive(AppWidgetService.java:1463) D/StrictMode( 77): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728) D/StrictMode( 77): at android.os.Handler.handleCallback(Handler.java:605) D/StrictMode( 77): at android.os.Handler.dispatchMessage(Handler.java:92) D/StrictMode( 77): at android.os.Looper.loop(Looper.java:137) D/StrictMode( 77): at com.android.server.ServerThread.run(SystemServer.java:744) D/StrictMode( 77): StrictMode policy violation; ~duration=792 ms: android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1 D/StrictMode( 77): at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:1048) D/StrictMode( 77): at libcore.io.BlockGuardOs.write(BlockGuardOs.java:178) D/StrictMode( 77): at libcore.io.IoBridge.write(IoBridge.java:447) D/StrictMode( 77): at java.io.FileOutputStream.write(FileOutputStream.java:187) D/StrictMode( 77): at com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:212) D/StrictMode( 77): at com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:233) D/StrictMode( 77): at com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:183) D/StrictMode( 77): at com.android.server.AppWidgetService.writeStateToFileLocked(AppWidgetService.java:1240) D/StrictMode( 77): at com.android.server.AppWidgetService.saveStateLocked(AppWidgetService.java:1182) D/StrictMode( 77): at com.android.server.AppWidgetService$2.onReceive(AppWidgetService.java:1463) D/StrictMode( 77): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728) D/StrictMode( 77): at android.os.Handler.handleCallback(Handler.java:605) D/StrictMode( 77): at android.os.Handler.dispatchMessage(Handler.java:92) D/StrictMode( 77): at android.os.Looper.loop(Looper.java:137) {code} Expected: Should not see this error. Note: This error still persists when I launch an empty 1.7.5 Titanium project against Android Emulator 4.0

    Appcelerator JIRA | 5 years ago | Wilson Luu
    android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1
  2. 0

    Steps to reproduce: 1. Launch empty Titanium project to Android Emulator 4.0 Results: StrictMode policy violation is thrown in the TiStud console: {code:xml} D/StrictMode( 77): StrictMode policy violation; ~duration=812 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=151 violation=2 D/StrictMode( 77): at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1074) D/StrictMode( 77): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:94) D/StrictMode( 77): at libcore.io.IoBridge.open(IoBridge.java:390) D/StrictMode( 77): at java.io.FileOutputStream.<init>(FileOutputStream.java:88) D/StrictMode( 77): at java.io.FileOutputStream.<init>(FileOutputStream.java:73) D/StrictMode( 77): at com.android.internal.os.AtomicFile.startWrite(AtomicFile.java:59) D/StrictMode( 77): at com.android.server.AppWidgetService.saveStateLocked(AppWidgetService.java:1181) D/StrictMode( 77): at com.android.server.AppWidgetService$2.onReceive(AppWidgetService.java:1463) D/StrictMode( 77): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728) D/StrictMode( 77): at android.os.Handler.handleCallback(Handler.java:605) D/StrictMode( 77): at android.os.Handler.dispatchMessage(Handler.java:92) D/StrictMode( 77): at android.os.Looper.loop(Looper.java:137) D/StrictMode( 77): at com.android.server.ServerThread.run(SystemServer.java:744) D/StrictMode( 77): StrictMode policy violation; ~duration=792 ms: android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1 D/StrictMode( 77): at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:1048) D/StrictMode( 77): at libcore.io.BlockGuardOs.write(BlockGuardOs.java:178) D/StrictMode( 77): at libcore.io.IoBridge.write(IoBridge.java:447) D/StrictMode( 77): at java.io.FileOutputStream.write(FileOutputStream.java:187) D/StrictMode( 77): at com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:212) D/StrictMode( 77): at com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:233) D/StrictMode( 77): at com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:183) D/StrictMode( 77): at com.android.server.AppWidgetService.writeStateToFileLocked(AppWidgetService.java:1240) D/StrictMode( 77): at com.android.server.AppWidgetService.saveStateLocked(AppWidgetService.java:1182) D/StrictMode( 77): at com.android.server.AppWidgetService$2.onReceive(AppWidgetService.java:1463) D/StrictMode( 77): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728) D/StrictMode( 77): at android.os.Handler.handleCallback(Handler.java:605) D/StrictMode( 77): at android.os.Handler.dispatchMessage(Handler.java:92) D/StrictMode( 77): at android.os.Looper.loop(Looper.java:137) {code} Expected: Should not see this error. Note: This error still persists when I launch an empty 1.7.5 Titanium project against Android Emulator 4.0

    Appcelerator JIRA | 5 years ago | Wilson Luu
    android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1
  3. 0

    Getting Location information using latitude and longitude in android

    Stack Overflow | 3 years ago | Devrath
    android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Ice Cream Sandwich StrictMode

    Stack Overflow | 5 years ago | jlindenbaum
    android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1
  6. 0

    Post value from android to Php?

    Stack Overflow | 4 years ago | Joyson
    android.os.StrictMode$StrictModeDiskWriteViolation: policy=151 violation=1
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.os.StrictMode$StrictModeDiskWriteViolation

    policy=151 violation=1

    at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk()
  2. Android Platform
    StrictMode$AndroidBlockGuardPolicy.onWriteToDisk
    1. android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:1048)
    1 frame
  3. Android
    IoBridge.write
    1. libcore.io.BlockGuardOs.write(BlockGuardOs.java:178)
    2. libcore.io.IoBridge.write(IoBridge.java:447)
    2 frames
  4. Java RT
    FileOutputStream.write
    1. java.io.FileOutputStream.write(FileOutputStream.java:187)
    1 frame
  5. Android Platform
    FastXmlSerializer.endDocument
    1. com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:212)
    2. com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:233)
    3. com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:183)
    3 frames
  6. Android
    AppWidgetService$2.onReceive
    1. com.android.server.AppWidgetService.writeStateToFileLocked(AppWidgetService.java:1240)
    2. com.android.server.AppWidgetService.saveStateLocked(AppWidgetService.java:1182)
    3. com.android.server.AppWidgetService$2.onReceive(AppWidgetService.java:1463)
    3 frames
  7. Android Platform
    Looper.loop
    1. android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
    2. android.os.Handler.handleCallback(Handler.java:605)
    3. android.os.Handler.dispatchMessage(Handler.java:92)
    4. android.os.Looper.loop(Looper.java:137)
    4 frames