Windows error 0x0000008C, 140

Detailed Error Information

JOIN_TO_SUBST[1]

MessageThe system tried to join a drive to a directory on a substituted drive.
Declared inwinerror.h

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

HRESULT analysis[2]

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[2][1]
DescriptionThe default facility code.[2][1]
Error Code140 (0x008c)

Possible solutions

1

CriticalSection Crash while calling GetPrinterDataFromPort

c++
winapi
printing
crash
windbg

It looks to me that your critical section is already been deleted by some other thread using DeleteCriticalSection API. Due to this your current thread(where program is crashing) is trying to call EnterCriticalSection to the already deleted one or may be this critical section is not been initialized by InitializeCriticalSection From the log(!cs)

DebugInfo          = 0x00104290
Critical section   = 0x00365db0 (+0x365DB0)
LOCKED
LockCount          = 0x1
OwningThread       = 0x00000000
RecursionCount     = 0x0
LockSemaphore      = 0xAA8
SpinCount          = 0x00000000

WARNING: critical section DebugInfo = 0x00000000 doesn't point back
to the DebugInfo found in the active critical sections list = 0x00104290.
The critical section was probably reused without calling DeleteCriticalSection
answered on Stack Overflow Mar 21, 2014 by Mantosh Kumar
0

Memory Exception using XMFLOAT3 & XMVECTOR

c++
direct3d
memory-alignment
directxmath

I know my error!! I was giving an invalid pointer to my class that uses that code :D Fixed it

answered on Stack Overflow Sep 30, 2014 by Rakete1111
0

DWARF - How to find the prologue end/epilogue start addresses of functions in a given binary?

c
assembly
objdump
dwarf
readelf

Try

readelf -wi

And look for DW_AT_low_pc and DW_AT_high_pc for the subroutine you are looking at.

The DWARF spec says:

A subroutine entry may have either a DW_AT_low_pc and DW_AT_high_pc pair of attributes or a DW_AT_ranges attribute whose values encode the contiguous or non-contiguous address ranges, respectively, of the machine instructions generated for the subroutine (see Section 2.17).

If I remember correctly, the DW_AT_low_pc is the address immediately after the prologue and DW_AT_high_pc is the last address before the epilogue.

Don't worry about the opcodes being 'special' that just means that they don't take arguments to save space in the encoded line number program.

answered on Stack Overflow Sep 28, 2014 by Torleif
0

Stream from IP Camera very jittery on VLC

c++
algorithm
h.264
live555

Because read is a blocking call, you should either manage non-blocking read or use a thread. But your kernel module doesn't seems to implement select/poll callback.

Then a first step could be to call the read outside from the live555 mainloop using an additionnal thread like this :

#include "DeviceSource.hh"
#include <GroupsockHelper.hh> // for "gettimeofday()"
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>

static uint8_t buf[131072];
int upp_stream; 
EventTriggerId DeviceSource::eventTriggerId = 0;
unsigned DeviceSource::referenceCount = 0;
pthread_t thid;
bool stop = false;

static void* thread(void* clientData) 
{
    DeviceSource* This = ((DeviceSource*)clientData);
    while (!stop) 
    {
        if (This->isCurrentlyAwaitingData())
        {
            ::read(upp_stream, buf, sizeof(buf));
            This->envir().taskScheduler().triggerEvent(DeviceSource::eventTriggerId, This);
        }
    }
    return NULL;
}

DeviceSource* DeviceSource::createNew(UsageEnvironment& env) { return new DeviceSource(env); }
DeviceSource::DeviceSource(UsageEnvironment& env):FramedSource(env) 
{ 
    if (referenceCount == 0) 
    {
        upp_stream = open("/dev/upp",O_RDWR);
        pthread_create(&thid, NULL, thread, this);
        eventTriggerId = envir().taskScheduler().createEventTrigger(deliverFrame0);
    }
    ++referenceCount;
}

DeviceSource::~DeviceSource(void) {
    --referenceCount;
    if (referenceCount == 0) 
    {
        stop=true;
        pthread_join(thid, NULL);

        envir().taskScheduler().deleteEventTrigger(eventTriggerId);
        eventTriggerId = 0;
        ::close(upp_stream);
    }
}

void DeviceSource::doGetNextFrame() {}

void DeviceSource::deliverFrame0(void* clientData) { ((DeviceSource*)clientData)->deliverFrame(); }
void DeviceSource::deliverFrame() 
{
    if (!isCurrentlyAwaitingData()) return; // we're not ready for the data yet
    //Bitwise Shift hex from buf[12] to buf[15] to get data count  
    unsigned int data_count2 = (buf[12] << 24)|(buf[13]<<16)|(buf[14]<<8)|buf[15];

    u_int8_t* newFrameDataStart = (uint8_t*)buf;
    unsigned newFrameSize = sizeof(buf);//f_size; 
    // Deliver the data here:
    if (newFrameSize > fMaxSize) 
    {
        fFrameSize = fMaxSize;
        fNumTruncatedBytes = newFrameSize - fMaxSize;
    }   
    else 
    {
        fFrameSize = newFrameSize;
    }
    gettimeofday(&fPresentationTime, NULL); //chk this 
    memmove(fTo, newFrameDataStart, fFrameSize);
    FramedSource::afterGetting(this);
}

As you notice this simple sample doesnot read frame in background. This needs to implement a FIFO between the two threads.

UPDATE
It could be build using :

CPPFLAGS=-pthread LDFLAGS=-pthread make
answered on Stack Overflow Feb 1, 2015 by mpromonet • edited Feb 15, 2015 by mpromonet
0

uPP Device Driver is dropping data from buffer

c
multithreading
arm
linux-device-driver
omap

In case you would like to submit the driver to upstream (which actually a right way to go), you probably may contact with TI guys who are working with DaVinci boards. I assume you already googled the link DaVinci Wiki.

Regarding to your driver it's hard to check due to its code style. Moreover you may check modern kernel APIs for stuff you are trying to program manually (voltage regulators, clocks, pin control, and so on). For many basic devices there are already drivers and setup. Also you have to describe you board configuration in device tree. Usually it means to create an additional (to the common) piece of configuration and put it under arch/arm/boot/dts/. There you may find da850 predefined data bases.

answered on Stack Overflow Jan 7, 2015 by 0andriy

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0