Page 1 of 1

lua_edu_tools fails to load

Posted: 16.04.2010, 03:53
by vania
Hello there,

I'm running an HP Pavilion AMD 64 X2 Dual Core Processor (VISTA 32 bit). I have Celestia160-ED running however the lua_edu_tools fail to show up on the screen in both windowed mode or any other mode. I have downloaded Lua_Edu_Tools_1.2beta7 and installed it but that has not changed anything.

I'm sending you the info from my log file + some screen shoots (since I could not get the error messages on the screen (SHIFT + ~) to show up in the log file)

Error getting joystick caps.
Couldn't load localized resources: locale\res_LANGUAGE.dll
lua_edu_tools
Error opening solar system catalog.
Initializing ARB vertex programs . . .
Loading ARB vertex program: shaders/diffuse_arb.vp
Loading ARB vertex program: shaders/specular_arb.vp
Loading ARB vertex program: shaders/haze_arb.vp
Loading ARB vertex program: shaders/bumpdiffuse_arb.vp
Loading ARB vertex program: shaders/bumphaze_arb.vp
Loading ARB vertex program: shaders/shadowtex_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff_arb.vp
Loading ARB vertex program: shaders/rings_arb.vp
Loading ARB vertex program: shaders/ringshadow_arb.vp
Loading ARB vertex program: shaders/night_arb.vp
Loading ARB vertex program: shaders/glossmap_arb.vp
Loading ARB vertex program: shaders/diffuse2_arb.vp
Loading ARB vertex program: shaders/haze2_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff2_arb.vp
Loading ARB vertex program: shaders/specular2_arb.vp
Loading ARB vertex program: shaders/night2_arb.vp
Loading ARB vertex program: shaders/star_arb.vp
Loading ARB vertex program: shaders/multishadow_arb.vp
Loading ARB vertex program: shaders/texphong_arb.vp
Loading ARB vertex program: shaders/texphong_alpha_arb.vp
Loading ARB vertex program: shaders/ell_galaxy_arb.vp
All ARB vertex programs loaded successfully.
Initializing NV fragment programs . . .
Loading NV fragment program: shaders/shadow_on_rings_nv.fp
Loading NV fragment program: shaders/eclipse1_nv.fp
Loading NV fragment program: shaders/eclipse2_nv.fp
Loading NV fragment program: shaders/diffuse_nv.fp
Loading NV fragment program: shaders/bumpdiffuse_nv.fp
Loading NV fragment program: shaders/texphong_nv.fp
Loading NV fragment program: shaders/texphong_alpha_nv.fp
All NV fragment programs loaded successfully.

one.jpg


two.jpg


Any help much appreciated!

Vania

Re: lua_edu_tools fails to load

Posted: 16.04.2010, 19:17
by Vincent
Vania,

Whereas the standard version of the Lua Edu Tools works like a charm,
many users have reported the same problem as yours with Celestia-ED.
The problem is that all the lua tools and the Celestia addons are loading
at the same time at Celestia start up. Since celestia-ED includes several
big addons, the Lua Tools can't be correctly loaded.

I've been working on this, and should provide a fix quite soon. It will mainly
consists in splitting up the loading process into several phases and delaying
it so that the toolbox is loaded only once Celestia has started rendering.

Re: lua_edu_tools fails to load

Posted: 16.04.2010, 21:23
by jogad
Hi,

I had the same problem with the standard version of Celestia 1.6 and no additional Celestia add-ons

luaTools205.png

The problem occurs rarely at first launch of celestia. Generaly resarting Celsestia solves this issue.

EDIT
No additional addons is not absolutely true. I load also my own Slideshow plugin and I had to modify it for a faster loading.
Maybe there is a limit to the reasonnable number of plugins to load with the Lua Tools :?

Re: lua_edu_tools fails to load

Posted: 16.04.2010, 22:37
by Fenerit
Try to erase the "locale" dir and do comment the config.lua string:
language = "system_default" then restart

Re: lua_edu_tools fails to load

Posted: 17.04.2010, 17:28
by Vincent
I've optimized the Lua Edu Tools loading process in two ways:
- The loading of lua tools only starts once all Celestia data files
and addons have been loaded.
- Control is returned to Celestia after the loading of each lua tool.

Here's roughly how the loading process works at Celestia start up:
    - Load Celestia datas and addons...
    - Return control to Celestia.
    - Initialize loading of the Lua Edu Tools...
    - Return control to Celestia.
    - Load lua tool # 1...
    - Return control to Celestia.
    - Load lua tool # 2...
    - Return control to Celestia.
    - Load lua tool # n ...
    - Return control to Celestia.
    - Display toolbox.
    - Return control to Celestia.
    - ...

That should fix many of the reported loading issues.

You can test this fix by replacing the following files with the attached version:
    - lua_edu_tools.lua
    - utils/toolbox.lua
    - utils/screenbox.lua

Re: lua_edu_tools fails to load

Posted: 18.04.2010, 01:27
by vania
Hey Vincent,

Thanks for the fix it worked! Now the lua edu tools are loading.

Cheers,
Vania

Re: lua_edu_tools fails to load

Posted: 18.04.2010, 07:44
by jogad
Hello,

Very good :D

The lua tools are now very robust.

Even if a plugin causes an erroror or a timeout (accidentaly of course :wink: ),the other plugins are loaded anyway :!:
But their boxes are not draw properly and there is no more way to swicth them on or off.

Code: Select all

toolset =
    {
        "timeBox",
        "lightBox",
        "magnitudeBox",
        "galaxyLightBox",
        "renderBox",
        "obsModeBox",
        "solarSystemBox",
        "fovBox",
        "addsBox",
        "infoBox",
        "coordinatesBox",
        "distanceBox",
   "devtools",  --       <== causes timeout error (infinite loop)
   "slideshow",
        "magnificationBox",
        "HRBox",
        "KeplerParamBox",
   "cmod_tracer",
        --"virtualPadBox",
        "compassBox",
    }

-------------------------------------------------------------------------------------------------------
-- Define whether the features are enabled or not when Celestia starts.
-------------------------------------------------------------------------------------------------------
enable_info = true
enable_coordinates = true
enable_magnification = false
enable_HR = true
enable_Kepler_param = true
enable_virtual_pad = true
enable_compass = true

As you can see all plugins are active
mixAll.jpg


But a little problem remains:
mixTool.png


:mrgreen:

Re: lua_edu_tools fails to load

Posted: 18.04.2010, 08:38
by Vincent
vania wrote:Thanks for the fix it worked! Now the lua edu tools are loading.
jogad wrote:Very good :D

The lua tools are now very robust.
This is good news!


jogad wrote:Even if a plugin causes an erroror or a timeout (accidentaly of course :wink: ),the other plugins are loaded anyway :!:
But their boxes are not draw properly and there is no more way to swicth them on or off.
Jo?l, could you please provide your "devtools" so that I can test it on my system?

Re: lua_edu_tools fails to load

Posted: 18.04.2010, 19:48
by jogad
The devtool is just a base to make new addons as discussed here:
viewtopic.php?f=6&t=15864#p122312
There is no special problem with it

I have just added a line

Code: Select all

while true do a=a end
at the end of devtools.lua to cause a timeout :twisted: and test your patch.

Re: lua_edu_tools fails to load

Posted: 19.04.2010, 07:42
by Vincent
Jo?l,

I think I've managed to work around your devil tool issue. :twisted:
With the attached fix, the console log reports the devtools loading failure,
and then, the loading process goes on until its completion.
LET.png


Eventually, the toolbox is displayed with no problem.

Re: lua_edu_tools fails to load

Posted: 19.04.2010, 21:01
by jogad
Hi,

Your first patch was quite perfect :D . It lets identify the bad plugin that must be removed or corrected anyway.
Your second plugin is a progress but at cost of lot new lines of code and is not so perfect :oops:

errtools.png

You can see here what happen when resizing the windows.

I suggest that you ignore that and come back to your first patch wich is very useful. :)

The aim is not to run bad plugins. Just identifying them is enough.
If only one plugin is so stupid to cause a timeout of fail in any fashion, we must correct it and not your Lua Tools.

sorry for having bothered you with that :oops:

Re: lua_edu_tools fails to load

Posted: 20.04.2010, 21:06
by vania
Hi Vincent,

Thanks again for the fix, however it seems that the Addon Visibility setting box does not show up for some reason on my screen (see the image that I'm sending). I'm running LUA EDU 1.2 with files that you have provided for fixing the loading problem. Is there a reason for this? How do I switch on this feature?

Thanks,
Vania

img1.jpg

Re: lua_edu_tools fails to load

Posted: 21.04.2010, 05:41
by jogad
Hello,

Of course I let Vincent solve the problem :wink:

But this is a good illustration of what I tried to say before
jogad wrote:Your first patch was quite perfect :D .
...
I suggest that you come back to your first patch wich is very useful :)

Let me explain why (just my opinion) the first patch is very different and better than the second.
In the first case all the plugins or addon are correct. If they don't run, it is a bug lua_edu_tools and therefore the bug must be fixed in lua_edu_tools.

By cons in the second case it is a bug in one of the plugins and therefore this plugin itself must be corrected.
Otherwise we end up with a heavy code for lua_edu_tools which only serves to hide an error that is not corrected.
The worst offender is that the plugin has run until the error that it caused and that can lead to other difficult to detect errors.

The first patch perfectly does its job, which is to run all the necessary plugins. And moreover it allows the easy location of the incorrect plugin.

Of course, just my opinion.

:arrow: In the case of Vania's problem we see immediately that the problem arise when loading the addons box.
but there are other problems and the log is not complete. The timeout message is send after the first problem.

Vania, I think that showing the previous lines of the log would be useful :idea: (pgUP key)

Cheers.

Re: lua_edu_tools fails to load

Posted: 21.04.2010, 09:28
by Vincent
Jo?l,

Thanks for testing both versions of the fix.
It looks like Vania is still using the first fix, though...
With the second one, the console log would report "failed to load addsBox",
and the final message wouldn't be "Lua Edu Tools successfully loaded".


Vania,

Jo?l is right, we'd need to read also the previous line of the log to track the problem.
I guess that one of your addons from the adds list is causing the problem, though.
You should be able to track the culprit by disabling all addons from the adds list in
config.lua, and then enabling successsively one addon at a time:

Code: Select all

-------------------------------------------------------------------------------------------------------
-- Define the list of elements that are included in the 'Addon Visibility' setting window.
-- To remove an element, just add a comment mark '--' before its name.
-------------------------------------------------------------------------------------------------------
adds =
    {
        "Asteroid_Belt",
        --"Large_Scale_Universe",
        --"Galactic_Center",
        --"Dying_Sun",
        --"Atmosphere_Composition",
        --"Political_Borders",
        --"Meteorite_Impacts",
        --"Earth_Volcanoes",
        --"Earthquakes",
    }

Re: lua_edu_tools fails to load

Posted: 21.04.2010, 18:40
by vania
Hi Vincent,

Yes I was using the first patch (fix) you provided. I'll test the addson using the config.lua file as you've explained. In the mean time I send you the sequence of errors I got. Thanks again

Vania

Re: lua_edu_tools fails to load

Posted: 22.04.2010, 07:53
by Vincent
Vania,

The console log shows a Timeout error when trying to load the addons box.
As suggested above, one of your addons is probably responsible for the problem.