Page 3 of 3
Re: Error reading message!
Posted: Mon Jun 03, 2013 9:54 am
by Gertjan van Schijndel
The error looks to be a crash. You should configure your system to create a crashdump and not an error dialog, if you are not working on your development machine.
The heartbeat to the event and data managers are handled by the driver framework, you do not need to worry about that. A heartbeat to the device should be managed yourself, but there are some classes available to help you with this like 'AliveTimer'.
Re: Error reading message!
Posted: Thu Jun 06, 2013 1:09 pm
by CyaNn
Well. I have tried to debug. But the problem came visibly from multiple access due to thread architecture.
The toDp is encapsulated on a mutex (declared static) but I have a question.
Can I have access to a sub-layer synchronisation resource (mutex or another) ? To be sure to sync with all other processes !
Re: Error reading message!
Posted: Mon Jun 10, 2013 11:16 am
by CyaNn
Well, I have just found where came from my mistake.
I imagined fixe the problem of multi-tread by using a QMutex but the message acquisition was still in another thread than the main one.
To fix it I have created a QQueue with messages. Threads enqueue and workproc dequeue and store in db. It's work great now.
Thanks a lot for your various supports. B) B) B) B)
Another question (simpler this time) : how to detect if driver in on the active chain to desactivate the communication ?
Thanks a lot in advance.
Best
Yann :woohoo:
Re: Error reading message!
Posted: Tue Jul 16, 2013 3:49 pm
by leoknipp
Hello,
I had a look at the additional question but I didn't understand it.
What is meant with "active chain"?
Which communication shall be deactivated?
Best Regards
Leopold Knipp
Senior Support Specialist
Re: Error reading message!
Posted: Wed Jul 17, 2013 5:47 pm
by Gertjan van Schijndel
I think he wants to disable the communication on the passive server.
You can check if your are on the active server with 'Resources::isRedActive()' or use the redundant system messages as shown below:
Code: Select all
void YourDrvManager::SysMsg &sysMsg)
{
// Always call the baseclass
DrvManager::doReceive(sysMsg);
switch (sysMsg.getSysMagType())
{
case REDUNDANCY_SYS_MSG:
{
// The messages come from Data und Event. Ignore Data,
// only use the status of the Event manager
if (sysMsg.getSource() != Manager::eventId)
break;
// A Redu-SysMsg has multiple subtypes.
// REDUNDANCY_SYS_MSG has the subtype RedundancySubType
switch ((RedundancySubType)sysMsg.getSysMsgSubType())
{
case REDUNDANCY_ACTIVE: // Here we become aktive
break;
case REDUNDANCY_PASSIVE : // Here we become passive
break;
}
}
}
}
Re: Error reading message!
Posted: Mon Aug 05, 2013 2:50 pm
by CyaNn
Hello.
Yes ! that's exactly what I was looking for.
Thanks a lot and I wish you a pleasant afternoon.
Yann
Re: Error reading message!
Posted: Tue Aug 13, 2013 5:31 am
by CyaNn
Another little problem.
Driver crashes again with a new message :
PVSS00TCPComm2:R6025
PVSS00TCPComm2:- pure virtual function call
:unsure: :unsure: :unsure: :unsure:
Please can you indicate me what does it mean ?
Thank you in advance
Best regards
Yann
Re: Error reading message!
Posted: Mon Aug 19, 2013 12:36 pm
by mpoint
If a method is declared like "virtual void foo() = 0;", then it is a pure virtual function, meaning that you cannot instantiate a type that has such methods, and you have to override these methods in a derived class. In the vtable of the type, the MSVC compiler directs the slots of pure virtual methods to the built-in __purecall() function, which generates this error. See this link for a more detailed explanation:
http://blogs.msdn.com/b/oldnewthing/arc ... 22037.aspx
One possible cause is that you call a pure virtual method in a constructor or destructor. My suggestion is to attach a debugger and check which method was called when this happened.
Re: Error reading message!
Posted: Mon Aug 19, 2013 3:34 pm
by CyaNn
Thanks Marcus.
The difficulty to debug it that this error not append with regularity.
I am suspecting that a thread try to access to derived object constructor that is not totally created....
Thanks again, I will study this problem soon.
