Fix Trigger Builder Msg ID crash and Frame Sender not triggering on receipt of specific message ID

- Fixed null pointer crash when accessing DBC message signals in Trigger Builder
- Fixed Frame Sender window not properly triggering on incoming frames with specific message IDs
- Added proper signal null checks and ID trigger condition handling
- Incremented version to 242
This commit is contained in:
chriskinal
2025-09-22 19:55:24 -05:00
parent bd1d7d7508
commit bbe11d1f06
3 changed files with 87 additions and 27 deletions
+15 -7
View File
@@ -9,6 +9,9 @@ TriggerDialog::TriggerDialog(QList<Trigger> trigs, QWidget *parent) :
ui->setupUi(this);
triggers.clear();
triggers.append(trigs); //make sure it's just a clone of the existing triggers
// Set wider minimum width for Msg ID combo box to accommodate extended IDs
ui->cmMsgID->setMinimumWidth(250);
//if there are no triggers then create a default one
if (triggers.count() == 0)
@@ -184,15 +187,20 @@ void TriggerDialog::regenerateCurrentListItem()
//the right message. Should at least search by message name instead
//if possible.
DBC_MESSAGE *msg = dbcHandler->findMessage(trig.ID);
int numSigs = msg->sigHandler->getCount();
for (int s = 0; s < numSigs; s++)
if (msg)
{
DBC_SIGNAL *sig = msg->sigHandler->findSignalByIdx(s);
entries.append(sig->name);
int numSigs = msg->sigHandler->getCount();
for (int s = 0; s < numSigs; s++)
{
DBC_SIGNAL *sig = msg->sigHandler->findSignalByIdx(s);
if (sig)
{
entries.append(sig->name);
}
}
entries.sort();
ui->cmSignal->addItems(entries);
}
entries.sort();
ui->cmSignal->addItems(entries);
}
}