TauLabs / TauLabs

taulabs.org
Other
456 stars 392 forks source link

SystemAlarms UAVO IDs don't match #777

Closed kubark42 closed 11 years ago

kubark42 commented 11 years ago

This is a common occurrence:

[!!FATAL!!] ASSERT: "systemAlarm->getObjID() == SystemAlarms::OBJID" in file ground/gcs/src/plugins/sysalarmsmessaging/sysalarmsmessagingplugin.cpp, line 92

Not quite sure what is causing it. Depending, either GCS or the firmware needs to be made from clean in order to resolve the problem.

peabody124 commented 11 years ago

This isn't a bug. It's correctly catching that the UAVObject library (run time component) isn't matching the version that the sysalarmsmessaging was compiled against.

Make clean will fix this, as you commented.

kubark42 commented 11 years ago

It certainly feels like a bug. It crashes my GCS when I haven't updated the systemalarms UAVO, and the only solution seems to be to recompile from clean. I realize that the code line itself is doing what it's supposed to, but the bigger question is why these IDs frequently aren't aligning properly even though they're compiled from the same source.

EDIT: I should add that this is new-ish behavior. It's been going on only since a few months ago.

peabody124 commented 11 years ago

They aren't from the same source, which is why it happens. It's when part of the code was compiled with a different SystemAlarms and you change branches. That's why make clean fixes it. I'm not sure why qmake doesn't see that the systemalarms.h has changed since the previous compilation, that's the underlying cause.

It's happened since sysmessagingplugin was merged.

kubark42 commented 11 years ago

The last change to SystemAlarms UAVO was from #343, which was in mid-February. While it's plausible that I have been switching to pre-Frebruary branches, I think it's unlikely. What are other reasons why systemalarms.h would change?

It seems from what you're saying that this is indeed a manifestation of a bug.

peabody124 commented 11 years ago

Do we need to keep this open? 100% guaranteed you are swapping to some custom branch that has a difference in the system alarms (e.g. the long alarm names etc) and is fixed with a make gcs_clean

kubark42 commented 11 years ago

Still seems like a bug if qmake isn't behaving properly. Is this a Qt bug?

peabody124 commented 11 years ago

My guess is that the sysmessageplugin isn't isn't indicating it depends on the uavobjects. Check the _dependencies.pri file for that plugin. If it is indicated then yeah probably a qmake bug and not something actionable by us.

guilhermito commented 11 years ago

https://github.com/TauLabs/TauLabs/blob/next/ground/gcs/src/plugins/sysalarmsmessaging/sysalarmsmessaging_dependencies.pri

kubark42 commented 11 years ago

FIxed by https://github.com/TauLabs/TauLabs/pull/873.