Sorry, forgot to CC: tech-talk
> > Hi Mark
> > What is your EPICS_HOST_ARCH set to? I wonder if pollEventId_ has got corrupt, are you able to step into the epicsEventSignal() or epicsEventWaitWithTimeout() function?
> > Ultimately you will get to osdEvent.c in epics base where there is a HANDLE object inside the structure and you could see if that looks valid. I note that pollEventId_ is next
> > to a pAxes_ pointer in the controller header, so maybe there is an overwrite being caused if it turns out pollEventId_ is corrupt?
> Thanks for the quick response. EPICS_HOST_ARCH win32-x86. The FlexMotion library is only available for 32 bit, not 64.
> I checked some more:
> - Had a breakpoint in the my constructor. Jotted down the value the this pointer and the one from pollEventId at the end of the
> constructor of my asynMotorConttroller derives class.
> - Set a breakpoint in the poller thread function of asynMotorController. All pointers in a happy state. At this stage all motors had been
> created. I would expect problems here already when pAxes had overrun. With the call to epicsEventSignal() everything goes wrong.
> In order to debug into epicsEventSignal() I need to recompile EPICS base with debug support.
Sorry, I missed the "my" in front of "this" and thought that pollEventId was corrupt rather than "this". It would be worth compiling everything involved with an EPICS_HOST_ARCH of win32-x86-debug as that gives much more useful debugger information; also you can sometimes get issues on Windows with mixing release and debug code as the debug and non-debug C libraries keep different heap lists so if memory is allocated by one library and freed by another unpredictable things can happen. Was the EPICS base you are currently using originally built with the same compiler you used for building asyn and motor?
From: email@example.com <firstname.lastname@example.org> On Behalf Of Mark Rivers via Tech-talk
Sent: 31 July 2019 17:20
To: Koennecke Mark (PSI) <email@example.com>
Subject: Re: Pointer corruption on Windows
asyn 4-25 is almost 5 years old. Could you try updating to a more recent version?
From: firstname.lastname@example.org <email@example.com> on behalf of Koennecke Mark (PSI) via Tech-talk <firstname.lastname@example.org>
Sent: Wednesday, July 31, 2019 2:41 AM
Subject: Pointer corruption on Windows
I am trying to write a motor record driver for the PXI7344 motor controller from National Instruments and I am experiencing a weird pointer corruption problem.
First the environment:
- Windows 10, PSI computer security wants that
- MS Visual Studio 2010, I have to interface with the NI FlexMotion library which is EOL and from
I am using the asynMotorController. What I see in my debugger is that everything is fine with my pointer until epicsEventSignal(pollEventId_) is called in asynMotorController::wakeupPoller().
After that call my this pointer is corrupted and everything goes downhill from then. I tried to override wakeupPoller() to an empty method in order to get more information but then I get the pointer corruption on the call to epicsEventWaitWithTimeout(pollEventId_, timeout) in
Any ideas what could be wrong here?
- Re: Pointer corruption on Windows Koennecke Mark (PSI) via Tech-talk
- Pointer corruption on Windows Koennecke Mark (PSI) via Tech-talk
- Re: Pointer corruption on Windows Mark Rivers via Tech-talk
- Navigate by Date:
Re: Problem with ADURL reading .jpg image from server Wlodek, Jakub via Tech-talk
RE: [motorPIGCS2] can't turn on servo state of PI E-712 Chiang, Liang-Chih [江良志] via Tech-talk
- Navigate by Thread:
Re: Pointer corruption on Windows Mark Rivers via Tech-talk
Re: Pointer corruption on Windows Koennecke Mark (PSI) via Tech-talk