Resource icon

Other evoHUD 1.5.0

Login or Register an account to download this content
Thanks kenken. Checking now and will feedback shortly.

Just trying to add the ability to change font size dynamically (from options chosen in GUI).

In initialise a few fonts are defined as follows:
Code:
smallFont <- addFont("C:\\Windows\\Fonts\\arialbd.ttf", 12.0);
  • If I try to redefine that anywhere outside of the initialise loop I get a full game crash (not responding). I can redefine inside initialise but that is no use as only called once.
  • If I try to define a new font (rather than re-define a font) outside of initialise that also crashes completely with not responding.
I have an idea for a work around (define a range of font sizes in initialise and then change which one is referenced) but I wondered if you had any thoughts on what I am doing wrong or if I am trying to do something I should not.
 
Last edited:
Ok the import now fails rather than just doing nothing if there are any 8.3 files. I have wrapped in a try / catch and the exception thrown is "import failed".

Nothing shown in debugview.
 
Thanks kenken. Checking now and will feedback shortly.

Just trying to add the ability to change font size dynamically (from options chosen in GUI).

In initialise a few fonts are defined as follows:
Code:
smallFont <- addFont("C:\\Windows\\Fonts\\arialbd.ttf", 12.0);
  • If I try to redefine that anywhere outside of the initialise loop I get a full game crash (not responding). I can redefine inside initialise but that is no use as only called once.
  • If I try to define a new font (rather than re-define a font) outside of initialise that also crashes completely with not responding.
I have an idea for a work around (define a range of font sizes in initialise and then change which one is referenced) but I wondered if you had any thoughts on what I am doing wrong or if I am trying to do something I should not.
Because dynamic font change is out of consideration. Besides, imgui doesn't support it.
Ok the import now fails rather than just doing nothing if there are any 8.3 files. I have wrapped in a try / catch and the exception thrown is "import failed".

Nothing shown in debugview.
Nothing shown in debugview is odd. Just in case, I compiled with different SDK version. Please try it.
https://www.mediafire.com/file/ucmp77m8w2i3v58/evoHUD-testdll5.7z

By the way, I'll prepare for 1.5.0RC. This means no more new functions or features for 1.5.0 release. But it doesn't affect your development because bug fix is always applied regardless status is code freeze.
 
Because dynamic font change is out of consideration. Besides, imgui doesn't support it.
No problem. already worked around this.
Nothing shown in debugview is odd.
I have a filter applied so only entries with "evoHUD" will show up in debugview. I'll try again with the test build and let you know.
By the way, I'll prepare for 1.5.0RC. This means no more new functions or features for 1.5.0 release. But it doesn't affect your development because bug fix is always applied regardless status is code freeze.
No problem. Sounds good.
 
Just thought I may not have been very clear. I do get entries in debug view from evoHUD loading etc. I just get nothing extra logged when the import fails.

Just tested with your test build with SDK 8.1 and 10.
 
That's odd. Should output like this.
Code:
25    4.660747    6300    AMS.exe    evoHUD DX9: load squirrel functions.
26    4.662811    6300    AMS.exe  
27    4.662811    6300    AMS.exe    AN ERROR HAS OCCURRED [import failed.]
28    4.662856    6300    AMS.exe  
29    4.662856    6300    AMS.exe    CALLSTACK
30    4.662905    6300    AMS.exe    *FUNCTION [main()] C:\Program Files (x86)\Steam\steamapps\common\Automobilista\evoHUD.nut line [4]
31    4.662949    6300    AMS.exe  
32    4.662949    6300    AMS.exe    LOCALS
33    4.662994    6300    AMS.exe    [vargv] ARRAY
34    4.663038    6300    AMS.exe    [this] TABLE
35    4.663109    6300    AMS.exe    evoHUD DX9: evoHUD.nut is loaded.

I can't reproduce this bug. If file name is longer than 8.3 and function name is same as file name, does import success?
 
This is 1.5.0RC1. Please report anything unusual or odd behavior.

isKeyDown, isKeyPressed and isKeyReleased are now obsolete. These won't be removed in 1.5.0 release, but I recommend to update your nut with new input handling API as early as possible.

changelog since 1.4.0-release:
  • added Direct Input controller support
  • added textWrapped, searchFile, getVersion, button and combo API functions
  • added DB_RacePitSpeed and DB_NormalPitSpeed
  • fixed track map not loading on some track
  • fixed driver name with "(AI)" prefix
  • fixed not loading DBInfo on some track and vehicle
  • fixed potential errors.
Download link: https://www.mediafire.com/file/v1x330u3sm4b9p3/evoHUD-1.5.0RC1.7z
 
if filename is longer or shorter than 8.3 then it loads. Maybe I am not using debug view properly. Let me play around with the options.

I just had an idea that may be the cause of some people getting crashes.

My game completely hands with end task if I do the loading of the fonts wrong in the initialise section.

The paths to the fonts are hard coded.

Maybe people do not have the fonts in that path or they have windows installed to something other than C: drive.
 
Ok it was because I had the import wrapped in a try catch which caught the error and prevented anything in debug view.

Here is my log. I renamed just one file back to 8.3 and I get a lot of errors as you can see. My import is inside the render but wrapped inside an if loop that should prevent the import occurring more than once.

Further to the theory the addFont calls in initialise could be the cause of the full game crashes some are experiencing.

I changed one of the calls to:
Code:
mediumFont = addFont("D:\\Windows\\Fonts\\arialbd.ttf", 18.0);

I do have a D: drive but windows is on C: and that path is invalid.

As soon as I go out on track the game hesitates for 3 or 4 secs then I get a not responding message followed by being able to close it.
 
Ok it was because I had the import wrapped in a try catch which caught the error and prevented anything in debug view.

Here is my log. I renamed just one file back to 8.3 and I get a lot of errors as you can see. My import is inside the render but wrapped inside an if loop that should prevent the import occurring more than once.

Further to the theory the addFont calls in initialise could be the cause of the full game crashes some are experiencing.

I changed one of the calls to:
Code:
mediumFont = addFont("D:\\Windows\\Fonts\\arialbd.ttf", 18.0);

I do have a D: drive but windows is on C: and that path is invalid.

As soon as I go out on track the game hesitates for 3 or 4 secs then I get a not responding message followed by being able to close it.
I'm not sure but it seems trackMap.nut import failed. Probably, function keeps alive since first loaded function is still in the memory. However, at this point, stack is destroyed. As the result, the list of nut files shows odd result. This is completely speculation but you need to check all nut files. There must be something wrong in the files.

By the way, this log is quite mess. Lots of errors. Is this normal?
 
That log was with jkust one of the 5 problem files (out of 16) renamed to 8.3 format (trackmap.nut). All other widgets were not 8.3.

No evoHUD errors logged if I have no files in 8.3 format. If I have just one then you have the log that demonstrates it already.

I have tried removing all widgets except for just one of the files that have problems and it still happens.

I have tried removing all files. Rename one of the files that normally loads fine to 8.3 format and it fails.

I will move the import loop to the initialisation area and out of the render so that they only import once and see what happens. Depending on outcome of this I will also try and create a very simple evoHUD.nut "master" file to load just one widget that is 8.3 format and see if I still get the issue.

The fact that renaming a file (and changing nothing in the file) can cause the import to crash does not make sense to me. Especially as the crash is not 100% all the time. Every now and again it will load.

I'll get back to you with my experiments with a very simple evoHUD.nut but it will be probably 24 hours at least.
 
Where can I see laps or time of the race remaining? Or how do I enable it?

Not possible with the default evoHUD. You might try my edited layout .nut which does include a widget with this information displayed. You can get it in this post:

http://www.racedepartment.com/threads/evohud.137118/page-14#post-2576853

Speaking of which, I'll soon upload a new version, but I need to test it a bit more. Sadly the widget in question had a bug where the race time remaining was hidden in some of the races where it should've been displayed. Also I've added the option to toggle the leaderboard widget to another version (actually I made that version default, but that can be easily changed) that kinda sorta stands in as a relative timing widget in that it always shows the player and the nearest (in position, not in distance) cars in front and behind, plus it should show the gaps between the cars instead of the gap from the race leader. It's sadly the best I'll be able to do I think, I'm simply not a coder :( Looks like this:

automobilista_relative.png
 
I'm trying to remember who reported crashing when using evoHUD.

@Christo Nieuwoudt which drive letter do you have windows installed on?

What is the folder? C:/windows or something else.

Just been looking at this post earlier. This matches with my theory that those that can't run evoHUD have windows installed on a driveother than C: or in a folder other than "Windows" or both.

@kenken can you think of a way of getting the windows path from say %systemroot% environmental variable into the squirrel nut?

I just tried:
Code:
mediumFont = addFont("%systemroot%\\Fonts\\aria
And that did not work unfortunately.
 
Last edited:
I can modify to use system directory if path is relative path. But considering CTD timing, I doubt this is cure.
I think at least some of the crashes we are getting reported maybe because the fonts can not load. If I specify an missing font (wrong path) then everything is fine until I click play to go on track and the whole game crashes with CTD. This is identical to what some of the crashes are reporting I think (although I am not keeping track of the reports).

Not sure about using system directory if a relative path is specified. People may want to include opensource fonts with their widget. These can be loaded with addfont and a relative path at the moment from within the AMS directory. Is it possible to make squirrel aware of the %systemroot% environment variable so that all options with fonts are available (loading from windows or loading from path relative to game root).

In fact I was thinking of switching to GNU Free Font and putting the files in evoHUD\Fonts.

There is also a huge range of fonts here all on the Open Font Licenese:
https://fonts.google.com/

I can then load the font with:
Code:
mediumFont = addFont("fonts\\FreeSans.ttf", 18.0), // first font to be loaded is the default

This makes the hud not dependant on anything outside of the AMS folder.

I'll test that testdll6.7 now. Are these modified code relating to the import issue and 8.3 files?

Edit: If you want to filter AMS process only, try to use debugview++. https://github.com/CobaltFusion/DebugViewPP
Using it already as I saw your log had a process name field so went looking for improved debugview :D

Thanks
 
Last edited:
With latest test build 6.7. Here is the log.

I moved the import routing into the initialise function that is called once on game launch. There was no other location that any import was attempted.

Here is the code I used in the initialise function:
Code:
local widgetFiles = searchFile("widgets", "*.nut");
foreach(widgetFile in widgetFiles) {
    import("widgets\\"+widgetFile);
}

I tried with just one file (tireInfo.nut - 8.3 format name) in the widgets folder. It failed.

If I change the import to hard coded path (not within a dynamic loop) then it works:
Code:
import("widgets\\tireInfo.nut");

Very strange one this. Maybe we have to give up and just tell the user (probably a widget creator) that they must not have file named 8.3 format. I am already detecting the failed import and using a regexp to check the filename for 8.3 format and alerting the user to the issue.
 

Latest News

Do you prefer licensed hardware?

  • Yes for me it is vital

  • Yes, but only if it's a manufacturer I like

  • Yes, but only if the price is right

  • No, a generic wheel is fine

  • No, I would be ok with a replica


Results are only viewable after voting.
Back
Top