mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Put some debugging in to track down a streaming crash.
This commit is contained in:
parent
fecf7ba5ed
commit
5af52df558
2 changed files with 12 additions and 1 deletions
|
@ -223,7 +223,11 @@ void MetavoxelSession::update() {
|
|||
_sender->getData().writeDelta(sendRecord->getData(), sendRecord->getLOD(), out, _lod);
|
||||
out.flush();
|
||||
int end = _sequencer.getOutputStream().getUnderlying().device()->pos();
|
||||
QDebug debug = qDebug() << "from" << sendRecord->getLOD().position.x << sendRecord->getLOD().position.y << sendRecord->getLOD().position.z << "to" <<
|
||||
_lod.position.x << _lod.position.y << _lod.position.z << _lodPacketNumber << (_sequencer.getOutgoingPacketNumber() + 1);
|
||||
if (end > _sequencer.getMaxPacketSize()) {
|
||||
debug << "reliable" << (_reliableDeltaID + 1);
|
||||
|
||||
// we need to send the delta on the reliable channel
|
||||
_reliableDeltaChannel = _sequencer.getReliableOutputChannel(RELIABLE_DELTA_CHANNEL_INDEX);
|
||||
_reliableDeltaChannel->startMessage();
|
||||
|
@ -242,6 +246,7 @@ void MetavoxelSession::update() {
|
|||
_sequencer.endPacket();
|
||||
|
||||
} else {
|
||||
debug << "unreliable";
|
||||
_sequencer.endPacket();
|
||||
}
|
||||
|
||||
|
|
|
@ -297,7 +297,10 @@ void MetavoxelClient::writeUpdateMessage(Bitstream& out) {
|
|||
void MetavoxelClient::handleMessage(const QVariant& message, Bitstream& in) {
|
||||
int userType = message.userType();
|
||||
if (userType == MetavoxelDeltaMessage::Type) {
|
||||
if (_reliableDeltaChannel) {
|
||||
if (_reliableDeltaChannel) {
|
||||
qDebug() << "from" << _remoteDataLOD.position.x << _remoteDataLOD.position.y << _remoteDataLOD.position.z <<
|
||||
"to" << _reliableDeltaLOD.position.x << _reliableDeltaLOD.position.y << _reliableDeltaLOD.position.z <<
|
||||
_sequencer.getIncomingPacketNumber() << "reliable" << _reliableDeltaID;
|
||||
MetavoxelData reference = _remoteData;
|
||||
MetavoxelLOD referenceLOD = _remoteDataLOD;
|
||||
_remoteData.readDelta(reference, referenceLOD, in, _remoteDataLOD = _reliableDeltaLOD);
|
||||
|
@ -307,6 +310,9 @@ void MetavoxelClient::handleMessage(const QVariant& message, Bitstream& in) {
|
|||
|
||||
} else {
|
||||
PacketRecord* receiveRecord = getLastAcknowledgedReceiveRecord();
|
||||
qDebug() << "from" << receiveRecord->getLOD().position.x << receiveRecord->getLOD().position.y << receiveRecord->getLOD().position.z <<
|
||||
"to" << getLastAcknowledgedSendRecord()->getLOD().position.x << getLastAcknowledgedSendRecord()->getLOD().position.y << getLastAcknowledgedSendRecord()->getLOD().position.z <<
|
||||
_sequencer.getIncomingPacketNumber() << "unreliable";
|
||||
_remoteData.readDelta(receiveRecord->getData(), receiveRecord->getLOD(), in,
|
||||
_remoteDataLOD = getLastAcknowledgedSendRecord()->getLOD());
|
||||
in.reset();
|
||||
|
|
Loading…
Reference in a new issue