Re: Access violation reading 0x00000010
En Thu, 28 Apr 2011 03:35:48 -0300, yuan zheng escribió: Sorry , the path is just an example. This is not the question I think. Because there is lots of api in libcommon-0.dll, and there is no fault when invoking other api, such as libcommon.SIM_start().. It's just fault when invoking this api -> SIM_init(). So I wanna which situation would lead to this error: -- WindowsError: exception: access violation reading 0x0010 -- On Thu, Apr 28, 2011 at 4:01 PM, yuan zheng wrote: > > libcommon = CDLL("c:\libcommon-0.dll", RTLD_GLOBAL) > > libcommon.SIM_init() -> This is the invoking. It's hard to guess, but if you get an access violation just from those two lines of code, I'd say the problem is inside SIM_init() itself. It may be attempting to dereference a NULL pointer: accessing a field inside a struct, or calling a virtual function from a NULL object... Also, make sure CDLL is the right choice; it implies a prototype like this: int cdecl SIM_INIT(void); -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list
Re: Access violation reading 0x00000010
I have found my question's answer. The fault is sourced from the implement of SIM_init(). Thanks a lot. thanks, yuanzheng. 2011/4/28 yuan zheng > Sorry , the path is just an example. > > This is not the question I think. Because there is lots of api > in libcommon-0.dll, and there is no fault when invoking other > api, such as libcommon.SIM_start().. It's just fault when invoking > this api -> SIM_init(). So I wanna which situation would lead to this > error: > > ------ > > WindowsError: exception: access violation reading 0x0010 > > -- > > > > thanks, > yuanzheng. > > > 2011/4/28 Chris Angelico > >> On Thu, Apr 28, 2011 at 4:01 PM, yuan zheng >> wrote: >> > >> > libcommon = CDLL("c:\libcommon-0.dll", RTLD_GLOBAL) >> > >> > libcommon.SIM_init() -> This is the invoking. >> >> When you have a backslash in a literal string, you need to double it: >> libcommon = CDLL("c:\\libcommon-0.dll", RTLD_GLOBAL) >> >> I don't know if that's your problem, but it could be! >> >> Chris Angelico >> -- >> http://mail.python.org/mailman/listinfo/python-list >> > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Access violation reading 0x00000010
Sorry , the path is just an example. This is not the question I think. Because there is lots of api in libcommon-0.dll, and there is no fault when invoking other api, such as libcommon.SIM_start().. It's just fault when invoking this api -> SIM_init(). So I wanna which situation would lead to this error: -- WindowsError: exception: access violation reading 0x0010 -- thanks, yuanzheng. 2011/4/28 Chris Angelico > On Thu, Apr 28, 2011 at 4:01 PM, yuan zheng > wrote: > > > > libcommon = CDLL("c:\libcommon-0.dll", RTLD_GLOBAL) > > > > libcommon.SIM_init() -> This is the invoking. > > When you have a backslash in a literal string, you need to double it: > libcommon = CDLL("c:\\libcommon-0.dll", RTLD_GLOBAL) > > I don't know if that's your problem, but it could be! > > Chris Angelico > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
Re: Access violation reading 0x00000010
On Thu, Apr 28, 2011 at 4:01 PM, yuan zheng wrote: > > libcommon = CDLL("c:\libcommon-0.dll", RTLD_GLOBAL) > > libcommon.SIM_init() -> This is the invoking. When you have a backslash in a literal string, you need to double it: libcommon = CDLL("c:\\libcommon-0.dll", RTLD_GLOBAL) I don't know if that's your problem, but it could be! Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list
Re: Access violation reading 0x00000010
libcommon = CDLL("c:\libcommon-0.dll", RTLD_GLOBAL) libcommon.SIM_init() -> This is the invoking. thanks, yuanzheng. 2011/4/28 Chris Angelico > On Thu, Apr 28, 2011 at 1:00 PM, yuan zheng > wrote: > > Hi, > > everyone. I have a question when I invoke an api which is included a > > library > > open by CDLL. And then it will prompt the follow error: > > How are you invoking it? > > Chris Angelico > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
Re: Access violation reading 0x00000010
On Thu, Apr 28, 2011 at 1:00 PM, yuan zheng wrote: > Hi, > everyone. I have a question when I invoke an api which is included a > library > open by CDLL. And then it will prompt the follow error: How are you invoking it? Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list
Access violation reading 0x00000010
Hi, everyone. I have a question when I invoke an api which is included a library open by CDLL. And then it will prompt the follow error: libcommon.SIM_init() WindowsError: exception: access violation reading 0x0010 What's the problem? thanks, yuanzheng. -- http://mail.python.org/mailman/listinfo/python-list