Access violation reading location - VS2008 Win7 #46

Open
susmith opened this Issue Nov 2, 2012 · 2 comments

Projects

None yet

2 participants

susmith commented Nov 2, 2012

I just found that in compile time the Emokit - compiles fine in VS2008 - Windows7 for the Epoc Headset - developer edition.

But during the runtime , it throws " Access violation reading location"
the error listed follows:
.
.
First-chance exception at 0x67b730c0 in emokitd.exe: 0xC0000005: Access violation reading location 0xcdcdcdcd.
Unhandled exception at 0x67b730c0 in emokitd.exe: 0xC0000005: Access violation reading location 0xcdcdcdcd.
The program '[8020] emokitd.exe: Native' has exited with code -1073741819 (0xc0000005).
.
.
it shows the runtime error in the function -- nbytes = hid_get_feature_report(dev, buf, sizeof(buf));
int emokit_identify_device(hid_device dev) {
/
currently we check to see if the feature report matches the consumer
model and if not we assume it's a research model.*/
int nbytes=0;
int i, dev_type = EMOKIT_CONSUMER;
char buf[EMOKIT_REPORT_SIZE];
char report_consumer[] = {0x00, 0xa0, 0xff, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00};
buf[0] = EMOKIT_REPORT_ID;
nbytes = hid_get_feature_report(dev, buf, sizeof(buf));
if (nbytes != EMOKIT_REPORT_SIZE)
{
return -1;
}
for (i=0; i < nbytes; ++i) {
if (buf[i] != report_consumer[i]) {
dev_type = EMOKIT_RESEARCH;
break;
}
}
return dev_type;
}

pls help me to fix this..

Owner
qdot commented Nov 2, 2012

Ok, haven't gotten to try this on a Win7 machine yet... So, try changing EMOKIT_REPORT_SIZE to MAX_STR, see if that changes anything. I don't see why it would, but it's worth a shot.

susmith commented Nov 3, 2012

changed to EMOKIT_REPORT_SIZE to MAX_STR , but still having the same error., this time I have noticed that something goes wrong with my hidapi tool.,
it shows
"Unhandled exception at 0x5c921a9a (hidapi.dll) in emokitd.exe: 0xC0000005: Access violation reading location 0xbaadf00d."

just checking on this!!

@qdot qdot was assigned by bschumacher Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment