Windows error 0x0000015C, 348

Detailed Error Information

MARKED_TO_DISALLOW_WRITES[1]

MessageThe requested operation failed because the file stream is marked to disallow writes.
Declared inwinerror.h

This appears to be a raw Win32 error. More information may be available in error 0x8007015C.

PDC_WATCHDOG_TIMEOUT_LIVEDUMP[2]

This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x15C: PDC_WATCHDOG_TIMEOUT_LIVEDUMP.

HRESULT analysis[3]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.
FlagsSeveritySuccess

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[3][1]
DescriptionThe default facility code.[3][1]
Error Code348 (0x015c)

Possible solutions

1

Application crashes because of ImageAdapter/Gridview

java
android
gridview
crash

This is because, you are not using the Lazy loading of images properly.

The correct way would be:

public View getView(int position, View convertView, ViewGroup parent) {

    LayoutInflater inflater = (LayoutInflater) context
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    View gridView;

     ImageView imageView;

     String button;

    if (convertView == null) {

            gridView = new View(context);

            // get layout from mobile.xml
            gridView = inflater.inflate(R.layout.mobile, null);

            // set image based on selected text
            imageView = (ImageView) gridView
                    .findViewById(R.id.grid_item_image);    
        } else {
            gridView = (View) convertView;
        }
        button = buttonValues[position];

        if (button.equals("homework")) {
                imageView.setImageResource(R.drawable.button_homework);
            } else if (button.equals("schedule")) {
                imageView.setImageResource(R.drawable.button_schedule);
            } else if(button.equals("planner")) {
                imageView.setImageResource(R.drawable.button_planner);
            }else{
                imageView.setImageResource(R.drawable.button_settings);
            }

    return gridView;
}

EDIT: Now replace your getView() with this getView().

Even this is not the best way. You should create a Holder which will hold your views properly.

To best understand how to reuse the garbage collected views, please see this: http://android.amberfog.com/?p=296

As you are facing OOME, you may also consider my answer on same type of question. bitmap size exceeds Vm budget error android

Thank you.

answered on Stack Overflow Feb 14, 2013 by Shrikant • edited May 23, 2017 by Community
0

Application crashes because of ImageAdapter/Gridview

java
android
gridview
crash

If you are using ics with version 4.1.2 or higher, your problem may be related to the problem states at this site.

It is explained there that the latest versions of android have a different kind of a garbage collector and it handles the big data in a different way. I had the same problem and solved by using smaller images. I whish this solves your issue.

answered on Stack Overflow Jun 29, 2013 by Bahadir Tasdemir

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2
  3. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0