In summary, I'm trying to pass data from an input device to the game logic.
It is a large block of data, so I am trying to pass by a pointer; a shared_ptr to be exact. What I have works. Mostly. During runtime it chokes in the delegate function that receives the data. I get:
Here is what I have so far...
Display All
Can you please tell me what I am doing wrong? Is there a better way to pass a pointer to data through the events?
Thanks for your advice!
It is a large block of data, so I am trying to pass by a pointer; a shared_ptr to be exact. What I have works. Mostly. During runtime it chokes in the delegate function that receives the data. I get:
Debug Assertion Failed!
blah blah blah
Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
blah blah blah
(Press Retry to debug the application)
Here is what I have so far...
Source Code
- //relevant Controller Code
- IHand *ihand = 0;
- QueryHandData(ihand)
- shared_ptr<IHand> ishared_hand;
- ishared_hand.reset(ihand);
- //send hand detected event with data to BaseGameLogic
- shared_ptr<EvtData_Hand_Controller> pHandEvent(GCC_NEW EvtData_Hand_Controller(ishared_hand, hand_event_trigger));
- IEventManager::Get()->VQueueEvent(pHandEvent);
Source Code
Can you please tell me what I am doing wrong? Is there a better way to pass a pointer to data through the events?
Thanks for your advice!
-Troy
The post was edited 7 times, last by jacktc ().