Companion9x - compiled version crashes
Companion9x - compiled version crashes
I'm working on a little project which requires a few mods to Companion9x. When I build for Windows in VC++10 with the environment set up exactly according to the Wiki, the application crashes when I click on the "Simulate" button (void ModelEdit::on_pushButton_clicked). However the "Simulate Tx" button (void MdiChild::on_SimulateTxButton_clicked) & the "Simulate Model" menu option (void ModelsListWidget::simulate) work fine. I should point at that this is with no code changes made.
Debugging info hasn't helped much, so it's likely something in my environment. Any suggestions?
Debugging info hasn't helped much, so it's likely something in my environment. Any suggestions?
Re: Companion9x - compiled version crashes
Is it with current svn?
A bug was discovered 2 days ago when Bertrand set up a new environment and had a problem nobody had before, which would cause something similar (and crashes everytime a firmware file was loaded...)
Was fixed in r2278
A bug was discovered 2 days ago when Bertrand set up a new environment and had a problem nobody had before, which would cause something similar (and crashes everytime a firmware file was loaded...)
Was fixed in r2278
Re: Companion9x - compiled version crashes
I just tried a fresh svn checkout & build of r2278, but the same happens, only crashes from the model editing dialog. I even tried copying all the DLLs from the current working release 1.48 (r2275) version. Strange...
Re: Companion9x - compiled version crashes
Hmm can't reproduce...
What firmware type and options do you have selected? Does it happen with a new document and newly created model or with a specific eeprom?
What firmware type and options do you have selected? Does it happen with a new document and newly created model or with a specific eeprom?
Re: Companion9x - compiled version crashes
So far, I've always used a new document & newly created model. Changing eeprom, firmware type & options don't seem to make a difference either, but I haven't methodically tested all combinations (yet). I'm compiling the Mac version right now to see if it happens, but I doubt it will.
This reminds me why I stopped developing software for Windows...
This reminds me why I stopped developing software for Windows...
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Companion9x - compiled version crashes
May I ask you which QT version are you using ??
Re: Companion9x - compiled version crashes
4.8.0. I may have tried 4.8.4 at one point, but not sure anymore as I've tried so many thingsRomolo wrote:May I ask you which QT version are you using ??
Re: Companion9x - compiled version crashes
Just created a new dev environment on a Windows XP VM, set up exactly as in the Wiki with Qt4.8.0, Xerces 3.1.1, XSD 3.3.0, pThreads 2.8.0, NSIS 2.46 & SDL 1.2.15.
c9x compiles fine, but behaves in the same way: crashes clicking the Simulate button in ModelEdit. I'm going to upgrade Qt to 4.8.4 too see if it makes a difference.
Can someone check their versions of the dependencies? Maybe one of the newer versions cause problems.
c9x compiles fine, but behaves in the same way: crashes clicking the Simulate button in ModelEdit. I'm going to upgrade Qt to 4.8.4 too see if it makes a difference.
Can someone check their versions of the dependencies? Maybe one of the newer versions cause problems.
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Companion9x - compiled version crashes
which firmware have you selected ?
Re: Companion9x - compiled version crashes
As far as I know all my versions are the ones in the guide. I did not take newer ones when there were some.mbanzi wrote:Can someone check their versions of the dependencies? Maybe one of the newer versions cause problems.
Re: Companion9x - compiled version crashes
I've been using "OpenTx for 9x board", but this does not appear to make a difference.Romolo wrote:which firmware have you selected ?
The debugging process is very slow, as every compile takes about 30 minutes on the VM! I have narrowed it down to:
Code: Select all
void ModelEdit::launchSimulation()
{
if (GetEepromInterface()->getSimulator()) {
RadioData simuData = radioData;
simuData.models[id_model] = g_model;
if (GetEepromInterface()->getCapability(SimulatorType)==1) {
xsimulatorDialog sd(this);
sd.loadParams(simuData, id_model);
sd.exec();
} else {
simulatorDialog sd(this);
sd.loadParams(simuData, id_model);
sd.exec();
}
}
else {
QMessageBox::warning(NULL,
QObject::tr("Warning"),
QObject::tr("Simulator for this firmware is not yet available"));
}
}
Code: Select all
void ModelEdit::launchSimulation()
{
if (GetEepromInterface()->getSimulator()) {
if (GetEepromInterface()->getCapability(SimulatorType)==1) {
xsimulatorDialog sd(this);
sd.loadParams(radioData, id_model);
sd.exec();
} else {
simulatorDialog sd(this);
sd.loadParams(radioData, id_model);
sd.exec();
}
}
else {
QMessageBox::warning(NULL,
QObject::tr("Warning"),
QObject::tr("Simulator for this firmware is not yet available"));
}
}
Re: Companion9x - compiled version crashes
Thanks Kilrah! I notice the release version actually has QT 4.8.2 DLLs, but I've tried 4.8.0, 4.8.2 & 4.8.4 with no difference.Kilrah wrote:As far as I know all my versions are the ones in the guide. I did not take newer ones when there were some.
Re: Companion9x - compiled version crashes
Appears to be related to this line:
c9x crashes the moment simuData is accessed. I've been looking at the RadioData class definition in eeprominterface.h, but nothing's jumping out. Any idea why a copy of radioData is being used here?
Code: Select all
RadioData simuData = radioData;
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Companion9x - compiled version crashes
It's needed as we pass the a copy of the eeprom to the simulator
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Companion9x - compiled version crashes
Stack overflow.mbanzi wrote:Appears to be related to this line:
c9x crashes the moment simuData is accessed. I've been looking at the RadioData class definition in eeprominterface.h, but nothing's jumping out. Any idea why a copy of radioData is being used here?Code: Select all
RadioData simuData = radioData;
Try this:
RadioData *simuData = new RadioData();
*simuData = radioData;
And add a couple of * where it is used!
Bertrand
Re: Companion9x - compiled version crashes
Yep, I was seeing Stack Overflow in the debugger too. Do you mean:bertrand35 wrote: Stack overflow.
Try this:
RadioData *simuData = new RadioData();
*simuData = radioData;
And add a couple of * where it is used!
Bertrand
simuData.models[id_model] = g_model;
becomes
**simuData->models[id_model] = g_model;
I get "illegal indirection" errors then. If I change the code to get rid of the errors, I get the Stack Overflow again...
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Companion9x - compiled version crashes
You wont need the ** for:
**simuData->models[id_model] = g_model;
just
simuData->models[id_model] = g_model;
Mike.
**simuData->models[id_model] = g_model;
just
simuData->models[id_model] = g_model;
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Companion9x - compiled version crashes
Thanks Mike. This is what worked, no more stack overflow crashes!!MikeB wrote:You wont need the ** for:
**simuData->models[id_model] = g_model;
just
simuData->models[id_model] = g_model;
Mike.
Code: Select all
RadioData *simuData = new RadioData();
*simuData = radioData;
simuData->models[id_model] = g_model;
.
.
sd.loadParams(*simuData, id_model);
- ShowMaster
- Posts: 4327
- Joined: Thu Dec 29, 2011 3:44 am
- Country: -
- Location: Los Angeles, CA USA
Re: Companion9x - compiled version crashes
What is the ppmus option in c9x Taranis FW download option.
Ppm in US?
Thanks
Ppm in US?
Thanks
Re: Companion9x - compiled version crashes
instead of showing the weight percentage in the limits menu, it shows microseconds.. so for a servo center point it will display 1500uS instead of 0%
João
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- ShowMaster
- Posts: 4327
- Joined: Thu Dec 29, 2011 3:44 am
- Country: -
- Location: Los Angeles, CA USA
Re: Companion9x - compiled version crashes
Good to know. What do I want to display?
Based of the default I would use %?
Based of the default I would use %?
Re: Companion9x - compiled version crashes
-100% = 988uS
0% = 1500uS
100% = 2012uS
Also we are going way off topic here
This should be in another thread..
João
0% = 1500uS
100% = 2012uS
Also we are going way off topic here
This should be in another thread..
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: Companion9x - compiled version crashes
Most likely yes. That's how all other radios work.