Update Multistage2015 Update to OpenOrbiter2024

Hello Multistage2015 friends,
I've been working on fixing the INI parser since last week. I'd also like to let you know that I implemented SimpleINI to resolve the incompatibility issues with the C++ STL and Win32 API functions (such as GetPrivateProfileString).

It's taking me quite a while to get it right, and I still can't get the meshes to load correctly. But I'll keep you posted.
 
Hi friends,
I'm still working on Multistage 2015/2025...

Here's one of my findings:
It turns out that out-of-index accesses are still occurring, so I have to review all the arrays one by one. It's a very large project with over 10,000 SLOC. So it's going to take me a while to find the elusive error, but in the meantime, I'm going to "modernize" everything with std::array and accessing those arrays with .at(index) so that errors can be found more easily at runtime.

As soon as I have a build ready, I'll let you know so you can help me with testing. In the meantime, I'm going to upload my (partial) improvements back to the GitHub repository.
 
Thank you again for taking care of this essential module. :hailprobe:

I've started adapting my Ariane 5 rockets for O2024.

I think this will make a good test platform for this module.
I'll be happy if I can help you. :salute:

Thank you so much for your kind words.
Right now, I'm nearing line 2000 of code in the Multistage2015.cpp file, and I'm also excited to see this module finally working. I'm spending 4 hours a day just on this project because I think it's going to work this time.

The main bottleneck I've had since starting this recompile is that there was an out-of-index access in the core Multistage module. This means that the code would say "Okay, here are 10 rockets," and then another module would ask for access to rocket number 11. Which obviously doesn't exist, and that's where the problem lay. However, applying .at() to access indexes (correct me if I'm wrong) would prevent an out-of-index access and would scream at me in the debugger where the error is.
 
Well, friends, I've finished tweaking Multistage2015.cpp, fixing array index errors and confusing indentation.
It took me a while because it was 4,625 lines and I had a lot of work IRL.

I'm already updating the GitHub repository to reflect the changes.

I'll continue with the other files later.
 
Here are some of my latest results.
I managed to adapt the parser, replacing GetPrivateProfileString with SimpleINI, and using the C++ STL (especially std::strings and std::filesystem::path) to prevent mysterious buffer overflows.
1.jpeg
2.jpeg
As you can see, I still need to find the boosters and the adapter, otherwise SLS will never take off, but at least I no longer have CTDs!!!

I even tested the HUD, and it seems to be working correctly; that is, it doesn't produce CTDs.

I also need to test the MultistageMFD.

I'll upload the new code to the GitHub repository today, and if possible, I'll publish a .zip package with Multistage2015 for OpenOrbiter 2024 so you can try it out. I think (and I hope I'm not wrong) that the most problematic issues (which were the segfaults and CTDs) have been resolved.
 
Hello Multistage friends!

I have another update on my attempt to port Multistage 2015 to OpenOrbiter 2024.

First, I want to apologize for the delay. I'm doing this in my spare time; I'm a very slow programmer and not very good at it, as you'll soon see... It turns out that the #define STRICT or #define ORBITER_MODULE declarations were missing from all the project files. It took me almost a year to realize this error.
picard.jpg

Therefore, after declaring them, the project with Fred18's original code started working almost perfectly. I say almost because I still need to fix Complex Flight, but I think it works perfectly with Complex Flight disabled... it would need more extensive testing.

So, the entire SimpleINI implementation and the C++ STL I had implemented were discarded. The solution was simpler than that.

I also correctly initialized the variables in their respective constructors because they were causing undefined behavior.

So I believe that with your help, dear community, we'll have a Multistage2025 release very soon!

Since I can't test it myself due to time constraints, I'm making the beta release available for you to try. Please don't hesitate to let me know about any bugs, no matter how small or large.

-------EDIT-------
GitHub repo updated: https://github.com/MatiasSaibene/Multistage2015_for_OpenOrbiter
 

Attachments

Last edited:
Glad your still working on this, and happy to hear your making progress, it's all part of the learning process:)
Did a quick test, still getting the booster and the jettison issues.
Tested it in O16 and it works fine.
 
Glad your still working on this, and happy to hear your making progress, it's all part of the learning process:)
Did a quick test, still getting the booster and the jettison issues.
Tested it in O16 and it works fine.
Does the problem occur when you have Complex Flight disabled?
 
Does the problem occur when you have Complex Flight disabled?
Yes.
I tested with Complex Flight enabled and it's the same but on last manual booster jettison I get a CTD. Explosion works great, no CTD.
 
Yes.
I tested with Complex Flight enabled and it's the same but on last manual booster jettison I get a CTD. Explosion works great, no CTD.
Tomorrow I'll investigate Jettison and Complex Flight again. I'm sure there's an uninitialized variable I forgot to initialize.
 
Great, Does this fix the booster issue?
I suppose so, or at least that was the intention.
Anyway, I have to keep testing. Now I'm adding std::array (again) very carefully; that is, I make a change and compile to see what happens.
 
Hi Matias

I haven't had time to test your new module yet (thanks a lot !), but I'll do it this week.

However, I just tested "Boom.dll" (with line "35=Explode()" in a guidance.txt file).

Before, we had a CTD... Now, it works fine ! (y)

It's a good start !
 
Back
Top