Windows error 0x0000003C, 60

Detailed Error Information

BAD_REM_ADAP[1]

MessageThe remote adapter is not compatible.
Declared inwinerror.h

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

INTERRUPT_UNWIND_ATTEMPTED[2]

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

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 Code60 (0x003c)

Possible solutions

6

Building Self-Referencing Tuples

python
tuples
ctypes
creation
self-reference

AFAICT, the reason you are seeing problems is because PyTuple_SetItem fails if the refcount of the tuple isn't exactly one. This is to prevent the function from being used if the tuple has already been used elsewhere. I'm not sure why you get an access violation from that, but it may be because the exception thrown by PyTuple_SetItem isn't properly dealt with. Furthermore, the reason why the array seems to mutate to some other object is because PyTuple_SetItem DECREF's the tuple on each failure; after two failures, the refcount is zero so the object is freed (and some other object apparently ends up in the same memory location).

Using the pythonapi object in ctypes is the preferred way to get access to the Python DLL, as it handles Python exceptions properly and is guaranteed to use the correct calling convention.

I don't have a Windows machine handy to test this out, but the following works fine on Mac OS X (both Python 2.7.3 and 3.2.2):

import ctypes

def self_reference(array, index):
    # Sanity check. We can't let PyTuple_SetItem fail, or it will Py_DECREF
    # the object and destroy it.
    if not isinstance(array, tuple):
        raise TypeError("array must be a tuple")

    if not 0 <= index < len(array):
        raise IndexError("tuple assignment index out of range")

    arrayobj = ctypes.py_object(array)

    # Need to drop the refcount to 1 in order to use PyTuple_SetItem.
    # Needless to say, this is incredibly dangerous.
    refcnt = ctypes.pythonapi.Py_DecRef(arrayobj)
    for i in range(refcnt-1):
        ctypes.pythonapi.Py_DecRef(arrayobj)

    try:
        ret = ctypes.pythonapi.PyTuple_SetItem(arrayobj, ctypes.c_ssize_t(index), arrayobj)
        if ret != 0:
            raise RuntimeError("PyTuple_SetItem failed")
    except:
        raise SystemError("FATAL: PyTuple_SetItem failed: tuple probably unusable")

    # Restore refcount and add one more for the new self-reference
    for i in range(refcnt+1):
        ctypes.pythonapi.Py_IncRef(arrayobj)

Result:

>>> x = (1,2,3,4,5)
>>> self_reference(x, 1)
>>> import pprint
>>> pprint.pprint(x)
(1, <Recursion on tuple with id=4299516720>, 3, 4, 5)
answered on Stack Overflow Aug 22, 2012 by nneonneo
6

Building Self-Referencing Tuples

python
tuples
ctypes
creation
self-reference

Thanks to nneonneo's help, I settled on the following implementation of the self_reference method.

import ctypes

ob_refcnt_p = ctypes.POINTER(ctypes.c_ssize_t)

class GIL:
    acquire = staticmethod(ctypes.pythonapi.PyGILState_Ensure)
    release = staticmethod(ctypes.pythonapi.PyGILState_Release)

class Ref:
    dec = staticmethod(ctypes.pythonapi.Py_DecRef)
    inc = staticmethod(ctypes.pythonapi.Py_IncRef)

class Tuple:
    setitem = staticmethod(ctypes.pythonapi.PyTuple_SetItem)
    @classmethod
    def self_reference(cls, array, index):
        if not isinstance(array, tuple):
            raise TypeError('array must be a tuple')
        if not isinstance(index, int):
            raise TypeError('index must be an int')
        if not 0 <= index < len(array):
            raise ValueError('index is out of range')
        GIL.acquire()
        try:
            obj = ctypes.py_object(array)
            ob_refcnt = ctypes.cast(id(array), ob_refcnt_p).contents.value
            for _ in range(ob_refcnt - 1):
                Ref.dec(obj)
            if cls.setitem(obj, ctypes.c_ssize_t(index), obj):
                raise SystemError('PyTuple_SetItem was not successful')
            for _ in range(ob_refcnt):
                Ref.inc(obj)
        finally:
            GIL.release()

To use the method, follow the example shown down below for creating your own self-referencing tuples.

>>> array = tuple(range(5))
>>> Tuple.self_reference(array, 1)
>>> array
(0, (...), 2, 3, 4)
>>> Tuple.self_reference(array, 3)
>>> array
(0, (...), 2, (...), 4)
>>> 
answered on Stack Overflow Aug 23, 2012 by Noctis Skytower • edited Aug 23, 2012 by Noctis Skytower
3

Why this thread raise exception?

multithreading
delphi
delphi-xe7

You should create thread object with
th := TURLDownload.Create('jgvjk', 'ngkj', 'jkgfjk');

Another issues:

In your thread body you call VCL window using showmessage('Reached'); without synchronization. You should not work with VCL staff without some kind of synchronization - use Synchronize or Queue.

reintroduce is not needed for non-virtual constructor

inherited does nothing in Execute

answered on Stack Overflow Apr 17, 2016 by MBo • edited Apr 17, 2016 by MBo
3

Why don't you get full stack traces when enabling the user mode stack trace?

debugging
windbg
gflags

On 32-bit Windows the system uses EBP chain to take a stack trace. You need to disable FPO optimization (/Oy-). On 64-bit Windows you will get a good stack trace even with optimization.

answered on Stack Overflow Sep 8, 2011 by John
2

NativeVTK has stopped

android
c++
vtk

It is an issue in that version of VTK with some OpenGL ES 2.0 devices. You can switch to ES 3.0 and the issue should go away. I have also created a topic to fix the issue for ES 2.0 moving forward here

https://gitlab.kitware.com/vtk/vtk/merge_requests/855

answered on Stack Overflow Oct 30, 2015 by Ken Martin
2

Change display format of DirectX "Object Table"

visual-studio-2012
hlsl
directx-11

You need to change the format through the Graphics Object Table (menu Debug > Graphics > Object Table).

Select your index buffer in the table and then change its format using the Buffer Format combo box at the top of the Graphics Object Table.

answered on Stack Overflow Jul 27, 2013 by AkisK
1

Building Self-Referencing Tuples

python
tuples
ctypes
creation
self-reference

Technically, you could wrap the reference to the tuple inside a mutable object.

>>> c = ([],)
>>> c[0].append(c)
>>> c
([(...)],)
>>> c[0]
[([...],)]
>>> 
answered on Stack Overflow Aug 22, 2012 by Nick ODell
1

Building Self-Referencing Tuples

python
tuples
ctypes
creation
self-reference

Immutability should not prevent an object from referencing itself. This is easy to do in Haskell because it has lazy evaluation. Here is an imitation that does that by using a thunk:

>>> def self_ref_tuple():
    a = (1, 2, lambda: a)
    return a

>>> ft = self_ref_tuple()
>>> ft
(1, 2, <function <lambda> at 0x02A7C330>)
>>> ft[2]()
(1, 2, <function <lambda> at 0x02A7C330>)
>>> ft[2]() is ft
True

This is not a complete answer, just preliminary. Am working out to see if there's another way to make this possible.

answered on Stack Overflow Aug 22, 2012 by Claudiu
1

Resources$NotFoundException in a simple calculator app

java
android
xml
eclipse
logcat

When calling set text on a TextView, and you want to set the text to a string, rather than a reference to a line in string.xml, you must make sure the type you're putting in there is a String.

Edit all you're onClick method to append a + "" to the end. That will turn the int to a string. Example:

resLabel.setText(((int) (n1-n2)) + "");

Hope this solves your problems :)

answered on Stack Overflow Sep 25, 2013 by Gil Moshayof
1

GraphicsMagick - Identify and remove attached color profile

imagemagick
imagemagick-convert
graphicsmagick
color-profile
gm identify -verbose *.tif | egrep -a '^Image|Profile-'

This will print all matching filenames, followed by the profiles for those files that have them. This would at least let you scan a directory at a time and try to figure out why some files are problematic.

answered on Stack Overflow Oct 8, 2015 by John Vinopal
1

setting up gptimer1 on omap4460

c
assembly
arm
cortex-a8
omap

Have you checked that the timer-module is powered and that the clock to the timer-module has been enabled? The selection of clock source is made at the power, reset, and clock management (PRCM) module (Chapter 3 of the TRM).

If you haven't enabled power and configured a clock-source to your timer peripheral block in the PRCM module the timer will simply do nothing.

answered on Stack Overflow Mar 12, 2014 by Nils Pipenbrinck
1

setting up gptimer1 on omap4460

c
assembly
arm
cortex-a8
omap

i finally get the right initialization sequence, but forget to post back my code.

This is how i initialize gptimer1, hope it may help

/* clocks timer1 block */
    *(volatile unsigned int *)CM_WKUP_CLKSTCTRL |= 0x00000003;

    *(volatile unsigned int *)CM_WKUP_GPTIMER1_CLKCTRL &= ~0x01000000;
    *(volatile unsigned int *)CM_WKUP_GPTIMER1_CLKCTRL |= 0x00000002;

   /* enables for forwarding pending interrupts from distributor
      to Cpu interfaces */
    *(volatile unsigned int *)(GICD_BASE + GICD_CTLR ) |= 0x00000003;

    /* set the priority of the interrupt */
    *(volatile unsigned int *)(GICD_BASE + GICD_IPRIORITYR_IRQ37 ) |= 0x00000200;
    /* set enable bit of IRQ37 */
    *(volatile unsigned int *)(GICD_BASE + GICD_ISENABLER37) |= 0x00000002;

    /* enables signaling interrupt by the cpu interface to the connected processor*/
    *(volatile unsigned int *)(GICC_BASE + GICC_CTLR ) |= 0x00000003;

    /* interrupt priority mask */
    *(volatile unsigned int *)(GICC_BASE + GICC_PMR ) = 0x00000080;

    /* forward the interrupt only to the processor which request the interrupt */
    *(volatile unsigned int *)(GICD_BASE + GICD_SGIR) |= 0x02000000;

    /* software reset */
    *(volatile unsigned int *)GPT1MS_TIOCP_CFG |= 0x00000002;

    /* RESET & Power settings*/
    /* wait until reset release */
    while( (*(volatile unsigned int *)GPT_TISTAT & 0x00000001) == 0)
        waitingtime++;
    /*GPT1MS_TIOCP_CFG [0]AUTOIDLE =0x0 : L4 clock free-running*/
    *(volatile unsigned int *)GPT1MS_TIOCP_CFG &= ~(0x1 << 0);
    /* idle mode equals to no-idle mode */
    *(volatile unsigned int *)GPT1MS_TIOCP_CFG |= 0x00000008;
    /*Functional clock is maintained during wake-up period */
    *(volatile unsigned int *)GPT1MS_TIOCP_CFG |= 0x00000300;
    /*NO Wake-up line assertion GPT1MS_TIOCP_CFG[2]ENAWAKEUP=0x0*/
    *(volatile unsigned int *)GPT1MS_TIOCP_CFG &= ~(0x1 << 2) ;
    /*GPT1MS_TIOCP_CFG [5]EMUFREE =0x1 : Timer counter free running in emulation*/
    *(volatile unsigned int *)GPT1MS_TIOCP_CFG |= (0x1 << 5);

    /* Enable wake-up interrupt events */
    *(volatile unsigned int *)GPT_TWER |= 0x00000007;
    /* Posted mode active */
    *(volatile unsigned int *)GPT_TSICR |= 0x00000004;
    /* enable autoreload */
    *(volatile unsigned int *)GPT_TCLR |= 0x00000002;

    /* set prescale clock timer value (PTV) to 1 */
    /* set PREscaler =128
and thus FCLK=38.4 MHz / 128 = 300 KHz << OCPCLK=38.4 / 4 = 9.6 MHz */
    *(volatile unsigned int *)GPT_TCLR |= 0x00000018;
    /* enable prescaler */
    *(volatile unsigned int *)GPT_TCLR |= 0x00000020;
    /* Overflow interrupt enable */
    *(volatile unsigned int *)GPT_TIER |= 0x00000007;

    /* Load timer counter value */
    *(volatile unsigned int *)GPT_TCRR = 0xFD000000;

    /* load value */
    *(volatile unsigned int *)GPT_TLDR = 0xFFE00000;


    *(volatile unsigned int *)GPT_TPIR = 232000;
    /* negative increment value */
    *(volatile int *)GPT_TNIR = 0xFFF44800;

    /* we position the timer1 handler */
     irq_table_function[GPT1_IRQ] = timer1handler;

    /* enable timer1 */
    *(volatile unsigned int *)GPT_TCLR |= 0x00000001;

Best regards,

Rony

answered on Stack Overflow Mar 13, 2014 by bonpiedlaroute • edited May 8, 2014 by bonpiedlaroute
1

Inneractive Ads cause a lot of App crashes (Windows Phone)

windows-phone-7
windows-phone-8
windows-phone
ads

First, contact InnerActive telling them to fix their software. It's their responsibility.

Meanwhile, if you know how to reproduce the problem, you can try following. Subscribe for all unhandled exceptions (start with Application.UnhandledException, also there're AppDomain.UnhandledException and TaskScheduler.UnobservedTaskException), in the handler search for “Inneractive.Ad.InneractiveAdControl” in the Exception.StackTrace, if found — ignore the exception, and optionally hide or reload the inneractive banner.

answered on Stack Overflow Jan 22, 2014 by Soonts
0

Program crash on deque from queue

c++
crash
queue

I think the problem probably is that dequeue is freeing the actual items, because the tmpList is making a shallow copy of the Songlist.

class Queue
{
    private:
        Node *first;
        Node *last;
        int nodes;

This means that the delete n; in dequeue is a mistake. The temporary is simply an object, which has copied int nodes, and first and last pointers. Destroying the data that is pointed to, is the error each node is still retained for use in the main Song list. That's consistent with the symptoms you described, where it works first time and then crashes as soon as you do anything once the playlist is finished.

If you may reduce the Songlist, by calling dequeue on it, then dequeue as it stands needs a flag to make the delete n; conditional. There's a destructor on Queue that you wrote, which tears down a Queue if it goes out of scope, or is passed to delete operator. Fortunately when the tmp list goes out of scope that list is empty, so it doesn't damage the Songlist.

I'm sure the problem was specified, to demonstrate some common issues. The enqueue both storing the Item & adding it to list, rather than seperating storage & queuing concepts, leads to confusion.

The right fix, depends on whether you have reason to suspect you OUGHT to have made a deep copy of the Queue object by a constructor, despite it being less efficient, with Songlist being subject to items dequeued, or if Songlist gets destroyed in one go.

answered on Stack Overflow May 31, 2014 by Rob11311 • edited May 31, 2014 by Rob11311
0

Resources$NotFoundException in a simple calculator app

java
android
xml
eclipse
logcat

Can you please highlight the java line no. 69 so the error will be more clear.

Mostly the error is in

 resLabel.setText((int) (n1-n2)); 

You can only set a String variable to the label. Please check that.

answered on Stack Overflow Sep 25, 2013 by Droid
0

When bind view model attribute to a input textbox, it crashes in IE

javascript
asp.net-mvc
asp.net-mvc-4
knockout.js
internet-explorer-8

Assuming that you are getting some results back of type Stakeholder and storing them in searchResults -

<table data-bind="with: searchResults">
    <th><tr>
        <td>Name</td>
        <td>Org Name</td>
    </tr></th>
    <tr data-bind="foreach: stakeholder">
        <td data-bind="text: name"></td>
        <td>
            <input type="text" data-bind="value: orgName" />
        </td>
    </tr>
</table>

Works in IE8. But since your searchResults is a KO.observableArray() I assume that you need to foreach your searchResults, but without a better picture of what you are doing it's hard to tell, here that is anyway.

<table>
    <th><tr>
        <td>Name</td>
        <td>Org Name</td>
    </tr></th>
    <tr data-bind="foreach: searchResults">
        <td data-bind="text: name"></td>
        <td>
            <input type="text" data-bind="value: orgName" />
        </td>
    </tr>
</table>

I also can't tell what orgName is or how it is being passed to the constructor of the Stakeholder, if it is a KO.observable then remove it as a parameter and use orgName(), if it is a parameter being passed in then move it up to the parent function and rename it to ensure it isn't a circular reference.

var Stakeholder = (function (organizationName) {
    var self = this;
    function Stakeholder() {
        this.orgName = ko.observable(self.organizationName);
    };
    return Stakeholder;
})();

Last, not sure what the 'blah' element is at the bottom, maybe just a copy pasta typo?

answered on Stack Overflow Jun 10, 2013 by PW Kad
0

Publishing Flash to iOS app crashes when more than 45 swfs included

ios
flash
flash-cs6

Again, I'm not totally sure this was a RAM issue however I converted my swfs to swcs. When I attempted to recompile, I received a useable error message telling me that I had insufficient jvm memory. I then bumped up the memory via the jvm.ini file, restarted Flash, then recompiled my app successfully. I hope this helps another developer.

answered on Stack Overflow Jul 9, 2013 by Jason
0

Sort of an event driver

c
linux
linux-kernel
linux-device-driver
raspberry-pi3

tamano or number of elements is declared but never defined in main().

fwrite(escribe ,sizeof(char) ,tamano , archivo);
answered on Stack Overflow Jul 17, 2017 by atomSmasher

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