# Orbiter BETA Lua development

#### BEEP

kuddel said:
Really? As copy and paste doesn't work, it's a recipe for failure
Nevertheless, I tried and it works (no crash)

This is a concern to me since punching IBM cards in the 70's so I'm used to it ( to make a lot of errors and correcting them )
I see you cannot reproduce the problem at your side.
I'm starting to think it may be a issue concerning Windows XP, which is the one I use.

kuddel said:
That simple test does not present the issue here, sorry

I think you got me wrong. What I meant is that when using the two Lua dll files in the Orbiter root folder that are received through the SVN updating to the r 73 the function vi:create_thrustergroup() works normally both using the Lua Terminal Window and when part of a vessel .cfg file. When I replace these files with the dll's that you make available here in this thread this function does not work anymore for me.

kuddel said:
I have tried your code (just called the function and also stepped through the C-code with the debugger)
PHP:
vi = vessel.get_focusinterface()
clbk_setclasscaps()
...but nothing failed / crashed. Even tried it several times (to find issues with previous created thrustergroups)

The code I enclosed is a full "vessel". It's supposed to be saved as a vesselname.cfg file in the config\vessels folder where it will appear in the Scenario Editor "new" vessels list. To me when using the dlls you make available in this thread, as adding this vessel is attempted with the vi:create_thrustergroup(..) line active in the vessel code the sim crashes. If the line is commented with the "--" the vessel can be added normally which can be verified by pressing F9 as the vessel doesn't have a mesh to be seen. Of course, the thrustergroup is not created.

Could you please check my Makeshift Targets factory as I recomended? This is a good case of a full but very simple vessel that illustrates the problem nicely. I suspect that it will work normally at your side.

kuddel said:
I would recommend to 1st try my attached DLLs and if they don't change the behavior, try a pristine Orbiter install (that fooled me, too)

Using the dll's in the LuaScript 2017-12-06(dlls).zip package the problem persists. I can solve it going back to the SVN r 73 original Lua dll's.

As the problem does not manifest itself when using the two original SVN dll's I don't think I need a new Orbiter installation to check the issue. It's probably related to a Windows XP incompatibility in the new compilations. Please check ( with Martin if needed) for this possibility. However, I'll do a new Orbiter installation ( without the 32G of textures ) and a new r73 update elsewhere in my PC (same Windows XP) and try. I'll make you know the results here.

Beep

Last edited:

#### kuddel

##### Donator
Donator
O.K. I ran your Makeshift Targets factory...
and again no CTD!
I don't think this has to do with your machine running XP, as other functions seems to work, right?
I really would recommend to try it on a clean pristine Orbiter Install.
Or you could check your PATH environment variable, 'cause some of those lousy Lua Editors around -that I've tried- did like to alter it and that gave me a hard time as well.

By the way, I hope running the included Scenario (Scenarios\Makeshift Targets\TGTs Test All .scn ...which has a ugly trailing space after "All" btw ) from your Makeshift Targets would be enough to trigger your problem, right.
If not, please give me a ZIP with only the really needed parts, with a scenario that I can run without thinking.
As you might know it is hard enough to hunt bugs, it makes things worse when you have to setup anything ...that distracts you from the main point.

---------- Post added at 00:50 ---------- Previous post was at 00:29 ----------

By the way, I'll add future "DLL- ZIPs" to the first post from now on, 'cause my upload quota is getting to its limit

#### BEEP

I've just:

1. Installed a new Orbiter from the distribution .ZIP in another folder.
2. Installed Makeshift Targets on it for testing.
3. Made a test: It ran fine.
4. Installed r 73 by copying the files from my SVN Download /Update folder. (This is not my simulation running Orbiter folder. It holds the clean SVN files only.)
5. Made a new test : everything ok!
6. Installed your Lua dlls from LuaScript 2017-12-06(dlls).zip
7. Tested again : CRASH!!!
8. Returned the two root folder SVN Lua dll's
9. Tested again : everything ran fine.

One thing that may be useful: When I first tried your dlls, some days ago, the system requested the installation of the VC++ 2015 redist package which I did. It seems that this was not necessary for the earlier SVN versions. The VC++ 2015 version I have now is (x86) 14.0.23026. (NOTE: It has been erased by the VC 2017 installation which seems to replace it)

The scenario shows/tests all 37 targets of the package ( the name is ugly to combine with the meshes ) but just the TGT_Fct_1 vessel would already do for the testing. As you can see in the related file \config\vessels\TGT_Fct_1.cfg file it has the vi:create_thrustergroup() function call that interests us.

Just installed VC++ 2017 Redist 14.10.25008 (despite it was never asked for). To no avail. It didn't change anything.

It came to me that maybe you'd want to create a debug .dll version that would generate a log file for each call with relevant , useful info. If this is the case please count on me to run the test and send back the results.

Last edited:

#### kuddel

##### Donator
Donator
BEEP, thanks for your detailed checks.

I don't think a debug-build with added logging would give more information, as a crash nearly always crashes the logging, too...
The latest builds were all compiled and linked with Visual Studio 2015, with one exception being build with Visual Studio 2017.

I really checked that the build would be "sane" for XP and only needs the VC2015 runtimes.
But I will take another look into the project files (maybe I'll try building a statically linked one).
If a statically linked one works, this might lead us to the root-cause.
/Kuddel

#### kuddel

##### Donator
Donator
I've extracted just the needed parts to setup a "as simple as possible" test to run.
Just start the Test.scn scenario.

For me it works (a smokin' Factory).
Can anybody else try this simple test (with Orbiter BETA r73)?
The ZIP includes the most current build of the Lua-DLLs, too.

#### Attachments

• LuaTest_Scenario.zip
112.2 KB · Views: 13
Last edited:

#### BEEP

I tried replacing

Code:
hsmkthgrp = vi:create_thrustergroup({hsmkthr_0,hsmkthr_1},THGROUP.MAIN)

for

Code:
	htgtst = vi:get_thrustergrouphandle(THGROUP.MAIN)
hsmkthgrp = vi:create_thrustergroup({hsmkthr_0,hsmkthr_1},htgtst)

No use . The result was the same: works with r.73 SVN distribution dlls but crashes on LuaScript 2017-12-07(dlls).zip ones.

So I keep waiting for the statically linked dll's .I have a lot of hope on them.

Last edited:

#### kuddel

##### Donator
Donator
I'm still waiting for someone to give positive/negative test results for my posted test.

Here are the DLLs with statically linked VC2015 C++ runtimes.

#### Attachments

• LuaScript 2017-12-08(static-dlls).zip
593.1 KB · Views: 9

Donator
Last edited:

#### BEEP

As I said in an earlier post in this thread I already have the VC++ 2015 redist which was replaced as I installed VC++ 2017 ( so the version I have now is 14.10.25008 over the earlier 14.0.23026)

Maybe if Martin compiles it in his environment.....????

Last edited:

#### kuddel

##### Donator
Donator
To bad, I still hope that someone else can check if it works for them

As I said in an earlier post in this thread I already have the VC++ 2015 redist which was replaced as I installed VC++ 2017 ( so the version I have now is 14.10.25008 over the earlier 14.0.23026)
I doubt that that happened, usually installing another runtime does not replace any other. They usually get added to your system.
If you check your "Programs and Features", (filter by "Redistributable") you should see several versions. I for example have all these:
2005, 2008, 2010, 2012, 2013 & 2015 (as x86 and x64, though for Orbiter only the x86 versions are needed)

Maybe if Martin compiles it in his environment.....????
That of course would be the best.

But I still think that something with your system is not right, although I can only be sure if someone else tried the Lua DLLs and they do work there.

If you have the time (and disk space) I would still recommend a pristine new clear Orbiter install and check if my Lua DLLs work there.

Installing the Visual C++ Redistributable for Visual Studio 2015 (x86) you did, right?

#### BEEP

To bad, I still hope that someone else can check if it works for them

But I still think that something with your system is not right, although I can only be sure if someone else tried the Lua DLLs and they do work there.

Well, If you check the number of related uploads in OH and who is doing them you'll see that it's better to count on me regarding Lua test issues.

If you check your "Programs and Features", (filter by "Redistributable") you should see
Installing the Visual C++ Redistributable for Visual Studio 2015 (x86) you did, right?

I'm just describing the sequence of facts the way I experience them.
I do not know where to find "Programs and Features" in Windows XP I took a photo of my control panel software install/uninstall section so you can see for yourself. It seems that in some cases the program installs several versions but this didn't happen with VC 2015 which was replaced as I described earlier by the 2017 version.

One thing that confirms that 2017 is treated as a newer version of 2015 is that when I tried to install 2015 again after 2017 it was refused as installing old over new as you can see by the installation log below:

Code:
[0C58:0EE4][2017-12-17T20:07:11]i001: Burn v3.7.3813.0, Windows v5.1 (Build 2600: Service Pack 3), path: C:\Documents and Settings\Precious\Meus documentos\Downloads\Obiter Beta Textures\vc_redist.x86_2015_B.exe, cmdline: ''
[0C58:0EE4][2017-12-17T20:07:11]i000: Setting string variable 'WixBundleLog' to value 'C:\DOCUME~1\Precious\CONFIG~1\Temp\dd_vcredist_x86_20171217200711.log'
[0C58:0EE4][2017-12-17T20:07:11]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Documents and Settings\Precious\Meus documentos\Downloads\Obiter Beta Textures\vc_redist.x86_2015_B.exe'
[0C58:0EE4][2017-12-17T20:07:11]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Documents and Settings\Precious\Meus documentos\Downloads\Obiter Beta Textures\'
[0C58:0EE4][2017-12-17T20:07:12]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual C++ 2015 Redistributable (x86) - 14.0.23026'
[0C58:0EE4][2017-12-17T20:07:12]i100: Detect begin, 10 packages
[0C58:0EE4][2017-12-17T20:07:12]i000: Setting version variable 'windows_uCRT_DetectKey' to value '10.0.10586.15'
[0C58:0EE4][2017-12-17T20:07:12]i000: Setting numeric variable 'windows_uCRT_DetectKeyExists' to value 1
[0C58:0EE4][2017-12-17T20:07:12]i102: Detected related bundle: {c239cea1-d49e-4e16-8e87-8c055765f7ec}, type: Upgrade, scope: PerMachine, version: 14.10.25008.0, operation: Downgrade
[0C58:0EE4][2017-12-17T20:07:12]i108: Detected compatible package: vcRuntimeMinimum_x86, provider: Microsoft.VS.VC_RuntimeMinimumVSU_x86,v14, installed: {C6CDA568-CD91-3CA0-9EDE-DAD98A13D6E1}, version: 14.10.25008, chained: {A2563E55-3BEC-3828-8D67-E5E8B9E8B675}
[0C58:0EE4][2017-12-17T20:07:12]i103: Detected related package: {C6CDA568-CD91-3CA0-9EDE-DAD98A13D6E1}, scope: PerMachine, version: 14.10.25008.0, language: 0 operation: Downgrade
[0C58:0EE4][2017-12-17T20:07:12]i103: Detected related package: {E6222D59-608C-3018-B86B-69BD241ACDE5}, scope: PerMachine, version: 14.10.25008.0, language: 0 operation: Downgrade
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition '(windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10137.0)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: vcRuntimeMinimum_x86, state: Obsolete, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: vcRuntimeAdditional_x86, state: Obsolete, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: Windows81_x86, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: Windows81_x64, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: Windows8_x86, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: Windows8_x64, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: Windows7_MSU_x86, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: Windows7_MSU_x64, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: WindowsVista_MSU_x86, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i101: Detected package: WindowsVista_MSU_x64, state: Present, cached: None
[0C58:0EE4][2017-12-17T20:07:12]i052: Condition 'VersionNT >= v6.0 OR (VersionNT = v5.1 AND ServicePackLevel >= 2) OR (VersionNT = v5.2 AND ServicePackLevel >= 1)' evaluates to true.
[0C58:0EE4][2017-12-17T20:07:12]i199: Detect complete, result: 0x0
[0C58:0460][2017-12-17T20:07:18]e000: Error 0x80070666: Cannot install a product when a newer version is installed.

What I can do is uninstall every VC Redist and install them all again. I'm afraid for what may happen regarding SW that is working fine so far.

If you have the time (and disk space) I would still recommend a pristine new clear Orbiter install and check if my Lua DLLs work there.

As I told you in an earlier post I already did it before (and I still have this basic Orbiter install) with the earlier dlls you provided but not with the new statically linked dll's which I tested only in my main Orbiter install but I'll try ASAP.

However my hopes and the better testing strategy now IMHO is to have Martin compilating your sources in his environment. Remember that his versions have been ( and still are) working for me so far which should stand on the behalf of my OS installation.

Thanks for your attention and please be patient with me. I have long hours and many thousands of Lua code lines invested in this hobby.

#### kuddel

##### Donator
Donator
Well, If you check the number of related uploads in OH and who is doing them you'll see that it's better to count on me regarding Lua test issues.

I'm just describing the sequence of facts the way I experience them.
I do not know where to find "Programs and Features" in Windows XP I took a photo of my control panel software install/uninstall section so you can see for yourself. It seems that in some cases the program installs several versions but this didn't happen with VC 2015 which was replaced as I described earlier by the 2017 version.

One thing that confirms that 2017 is treated as a newer version of 2015 is that when I tried to install 2015 again after 2017 it was refused as installing old over new as you can see by the installation log below:

Code:
...
[0C58:0EE4][2017-12-17T20:07:12]i199: Detect complete, result: 0x0
[0C58:0460][2017-12-17T20:07:18]e000: Error 0x80070666: Cannot install a product when a newer version is installed.
That is strange, but that's something that happens sometimes.

What I can do is uninstall every VC Redist and install them all again. I'm afraid for what may happen regarding SW that is working fine so far.
I'm 100% with you here. I would resit on doing so, too!

What you might try is AIO runtimes which helped me once I had similar issues.

That tool worked fine with me, but I am not sure how well it behaves on XP.

As I told you in an earlier post I already did it before (and I still have this basic Orbiter install) with the earlier dlls you provided but not with the new statically linked dll's which I tested only in my main Orbiter install but I'll try ASAP.

However my hopes and the better testing strategy now IMHO is to have Martin compilating your sources in his environment. Remember that his versions have been ( and still are) working for me so far which should stand on the behalf of my OS installation.

Thanks for your attention and please be patient with me. I have long hours and many thousands of Lua code lines invested in this hobby.

I am still hoping that this issue can be solved by tweaking the build-setup.

By the way: Did you say, you have Visual Studio 2017 installed? In that case you can build the DLLs yourself on your machine. Any exception during a debug run in Visual Studio might shed some light into this issue.

#### BEEP

This was quite expected but I had to do it anyway.

Procedure: Testing v:create_thrustergroup(...) for statically linked Lua dll package within a "pristine" Obiter installation . Lua vessel .cfg used in test.

1. With r.73 distribution dlls : Works fine.
2. With new statically linked dlls : CRASHES. :-(

#### BEEP

Kuddel,

I'm thinking that maybe we'd better change the structure of this Lua section to work more like what's done in 'Site Support', keeping your Lua updates in this thread as sticky and specific for this purpose and having issues like v:create_thrustergroup(....) in their own separate threads under the categories 'Bugs','Tasks', 'Features', 'Discussions', 'Questions', 'Feedback'.

What do you think?

#### kuddel

##### Donator
Donator
I don't mind.

As it seems that we two are the only ones that reads this, we can also handle it here

But do whatever feels right to you. We can always change if that new scheme doesn't work.

BTW: I'm 4 weeks off on holidays, so my responses might be less frequent during that time.

#### llarian

##### Well-known member
kuddel, you two are most definitely not the only two reading this thread. I suppose there are several like myself who are presently lurking, just soaking the education in.

Please keep up the excellent work.

Seconded !!!!!
Mk2

#### Face

##### Well-known member
Orbiter Contributor
Beta Tester
Can you guys give a minimal test for your beta DLL problem? I could try out some things on my end and perhaps give a confirmation one or the other way. As I've observed in the TransX development thread, the new beta seems to break binary compatibility a bit, so some addons need a recompile.

#### kuddel

##### Donator
Donator
Can you guys give a minimal test for your beta DLL problem? I could try out some things on my end and perhaps give a confirmation one or the other way. As I've observed in the TransX development thread, the new beta seems to break binary compatibility a bit, so some addons need a recompile.

The pack of Post 45 should be self-contained. So all should be set up to run a simple test.

The sources (in case you really have to / want to debug) are in the first post.

Kuddel

Last edited:

#### BEEP

Friends,

Some serious personal problems will have me away fom simulation dreams for the time being so I'll not be around frequently and, unfortunately, won't be capable of following and cooperating with this development as I'd like.

I'm much concerned with and fond of this project and as soon as I'm able to interact again I'll post here.

Beep

Replies
0
Views
976
Replies
3
Views
2K
Replies
0
Views
768
Replies
1
Views
2K