Vessel Mars 2020 Rover and Mars Helicopter Scout

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
Have you ever run this in debugger?
I immediately get an exeption:
Unhandled exception at 0x75F9A6E2 in orbiter.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0096D384.
at line 837 (MARSROVER2020.cpp)!

I don't have all the meshes, so I just created dummy ones for the missing ones (copterstoredNEW and coptercase), but that is not relevant for the exeption. Found' ...Found'em in the previous ZIP ;)

The 5th argument (&COPTERPARENT) to AddAnimationComponent is causing the exception.
When I just omit it, like so:
C++:
    COPTERPARENT = AddAnimationComponent(anim_copterdeploy, .5, 1.0, copter_anim[2]); // , &COPTERPARENT);
The module runs.
If it behaves as you'd expect is another question ;)

I would strongly recommend to develop in debug mode!
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
Thanks.
so I ran in with no code changes in debug mode:
932RZGD.jpg

and it loaded:
8VxA0E9.jpg



this line:COPTERPARENT = AddAnimationComponent(anim_copterdeploy, .5, 1, copter_anim[2],&COPTERPARENT);//COPTERBODY

rotates the copterbody mesh 90 degrees.
static UINT COPTERBODY[47] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,45,46,31,43,44 };//COPTERMESH copter_anim[2] = new MGROUP_ROTATE(1, COPTERBODY, 47, _V(-.0187794, .7054401, -0.23251), _V(0, 0, 1), (float)(-90 * RAD));

mesh_MSL = AddMesh(oapiLoadMeshGlobal("MARS2020/NEWROVER2020")); SetMeshVisibilityMode(mesh_MSL, MESHVIS_ALWAYS); //Main ship mesh COPTER = AddMesh(oapiLoadMeshGlobal("MARS2020/copterstoredNEW"));// mesh0 SetMeshVisibilityMode(COPTER, MESHVIS_ALWAYS); COPTERcase = AddMesh(oapiLoadMeshGlobal("MARS2020/coptercase"));// mesh0 SetMeshVisibilityMode(COPTERcase, MESHVIS_ALWAYS);

the copter being mesh #1


so not sure what is going on.

How did you get the line number from the exeption?
I immediately get an exeption:
at line 837 (MARSROVER2020.cpp)!

Attached is the dll with that line commented out. But now the stored copter mesh will not rotate 90 degrees.

But when I run it just freezes
0Qsm9Bz.jpg
 

Attachments

  • marsroverdlltest3.zip
    93.4 KB · Views: 3

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
Hello,
are you sure that you are running the shown code in debugger?
I am asking as it can be quite a challenge to make Visual Studio do that...(output directory, build directory, linker-output-file etc. ...)

I believe that you are running a different kind of module (DLL).
Could you please provide your solution file, your project file and any user file (that might contain the Debugger option)?

Something like these:
  • Marsrover2020.sln
  • Marsrover2020.vcxproj.user
  • Marsrover2020.vcxproj

I believe you are using Visual Studio 2019, don't you?
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
@gattispilot : One question, do you have an github account?
I am asking as I have "cleaned up" the project a bit[1] and could make a github repository from it where you can have full access to.
I would move the ownership to you of course as it's your code!

Having one place with everything needed to build the addon also helps a lot when asking for help (everyone can get all the needed code from one place instead of "collecting" all the ZIPs from this thread).

Would you mind if I proceed in uploading the project to github? It's still your choice 👍

[1] unified all the namings (mars2020rover, marsrover2020, marsrover2020new etc. pp. to just Marsrover2020 ;) )
and a little sub-directory reorganizing to keep the files better organized...​
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
By the way (as a side-note):
Can anyone help me with my TortoiseGit setup? I am currently constantly asked for the login/password 3 times!
Shouldn't there be a simple solution to store those credentials in TortoiseGit?
All this ssh, sshagent, key-pair mumbojumbo is driving me nuts :(
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
Thank. So I went to link and invite and get a 404 error page not found
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
Hmm maybe it's because the repository is private?! I'll make it public, maybe that helps.
I have no idea how those invitations on github work...
It just says: "Awaiting GATTISPILOT’s response"
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
Here is my solution file. Yes VS 2019 and I got the page
 

Attachments

  • MARSROVERSOLUTION.zip
    21.6 KB · Views: 3

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
Added some files. Not sure how to add more folders like for the copter?
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
Saw your commits....why are you adding those xxxNEW.msh / newxxx.msh ... files again? All the files should not have any NEW in it (It is very confusing and not consistent! Sometimes the NEW is a prefix, sometimes it's a postfix and sometimes it was even a "inbetween-fix" ...)
This makes it almost impossible to actually see any changes.
Now we have copterstoredNEW.msh and CopterStored.msh, which one is used?
Same with newrover2020.MSH, why did you delete Rover2020.msh (at least there is only one file left ;) ) ?
And what is MARSSCOUT1.msh doin' in the root directory?

None of the other files have been changed. So the project is now in a complete not-sensible state.

Is there any specific reason why the "not-NEW-containing" names are not O.K.?
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
Just to be clear: I don't want to take the fun out of you, programming.
It just makes it harder to reproduce any errors. For getting help, it's best to keep the hurdles for others to a minimum 👍
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
These are the meshes:
mesh_MSL = AddMesh(oapiLoadMeshGlobal("MARS2020/NEWROVER2020"));
SetMeshVisibilityMode(mesh_MSL, MESHVIS_ALWAYS); //Main ship mesh

COPTER = AddMesh(oapiLoadMeshGlobal("MARS2020/copterstoredNEW"));// mesh0
SetMeshVisibilityMode(COPTER, MESHVIS_ALWAYS);

COPTERcase = AddMesh(oapiLoadMeshGlobal("MARS2020/coptercase"));// mesh0
SetMeshVisibilityMode(COPTERcase, MESHVIS_ALWAYS);

I couldn't figure out how to add a folder for the MArscout1.msh That is the newest mesh for the copter.

New copter meshes were needed as changes were made. I guess the new ones could just be renamed?

Also a config/vessel folder for the Coptercase landed and copter itself.
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
Hmm I guess you use github only via the web frontend to upload files.

I did expect that you've used it as version-control service (which it basically is ;) ).
Have you experience in any version-control? SVN for example can easily used with github.

So if you are more a fan of TortioisSVN for example (I am!) you could use that to do the job.
If it comes to the github web-frontend...it is limited in a way.

But if you have no experience in using version-control, that's fine. My approach to "our problem" was not the right one then.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
Have you experience in any version-control? SVN for example can easily used with github.
No. I am familiar with TortioisSVN.

Really there are 3 vessels, the rover, copter, and copter case. Copter case is just a cfg. The rover is a dll and the copter is a VB.

aTATCHED IS A ZIP WITH CPP,H, MESH,TEXTURES,.....Renamed the meshes rover2020,......
 

Attachments

  • MARSROVERSETUP.zip
    5.3 MB · Views: 2

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,786
Reaction score
290
Points
83
O.K. Still I find it odd that again we have many files/directories with NEW added to their names.
And why is the scenario called MARSROVER2030TEST1.scn ?
..and having all those unnecessary other vessels in it
...AND referencing to rover:MARSROVER2020new ?

And the source files are back in their original (exception-ing) state, too.

See, just to compare your latest ZIP contents with the repository makes it a very hard job to do.
I doubt that the solution-files will even run the correct module in debugging!
I can only encourage you to keep consistent with your files. Making changes to them is no big deal when they are versioned, you can always revert back - never any good reason to make a copy and call it sameNEW.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,892
Reaction score
1,101
Points
203
Location
Dallas, TX
Is there a tutorial for setting up a version control? I wonder why I get no issues?
 
Top