Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random issue with AddSlider #57

Closed
Tunertron opened this issue Jul 23, 2018 · 10 comments
Closed

Random issue with AddSlider #57

Tunertron opened this issue Jul 23, 2018 · 10 comments

Comments

@Tunertron
Copy link

Tunertron commented Jul 23, 2018

Info

  • OS version/build: Windows 10 27244.165
  • Architecture: 64 bit
  • MSCLoader version: v0.43
  • Type of issue: bug/crash/suggestion (remove unnecessary)

Description

Mods using Slider settings sometimes, when exiting the game back to the spinning car screen, appear to attempt to load with the wrong type. (Including the font slider for the console.) Issue does not affect all sliders at once just one or more seemingly randomly.

Attachments

output_log.txt
20180723043556_1

@piotrulos
Copy link
Owner

Maybe something wrong in code? For some reason it try to load values as Single instead of int.

@Tunertron
Copy link
Author

Yeah, I added those extra error prints into the affected function to see what it was doing. I only really noticed it since I put some sliders into my my own mod settings but the first error I noticed was actually for the font size slider in ModConsole. Maybe it's deserialising the saved settings incorrectly?

It seems a bit hit and miss whether the VS debugger connects correctly. Do I need to run the "debug.bat" against the modloader.pdb?

@piotrulos
Copy link
Owner

Yes, you need run debug.bat each time you compile your mod. But you can use "post-build script" to make this script automatic. (as written here)

I actually never hit that bug, but it doesn't mean that it didn't exists. And since this is random it will be harder to catch. Maybe some other mod messing with this? Try disable other mods and see if this will still happen.

@Tunertron
Copy link
Author

I'll have a play about with the code and hopefully get back to you with a fix.

@piotrulos
Copy link
Owner

I'll check also if there is fix needed to mod loader, maybe something is not unloading correctly when going back to menu.
Meanwhile you should try to use int cast before value, maybe it will force code to use int.
for example: (int)100

@piotrulos
Copy link
Owner

I see how to fix that on mod loader level, I need to add Single as potential int value.
It actually never happens to float because foats have "f" at the end of value.
But int was detected as int or double, looks like you hit thrid posibility that int value can be detected as Single.

@piotrulos
Copy link
Owner

Try this MSCLoader.dll file MSCLoader.zip and test if this will fix that problem

@Tunertron
Copy link
Author

Yay! I think I'll need to do some casts on the values in my mod to get everything working 100% but the MSCLoader side is working great, many thanks.

@Tunertron
Copy link
Author

BTW... can I package the experimental MSCLoader with my mod?

@piotrulos
Copy link
Owner

No need, I will package normal release soon. I just want to release also an updater so I'm doing some final testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants