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

After changing language, next login makes entire screen black #1032

Open
2 of 5 tasks
lucasoares opened this issue Jan 9, 2025 · 4 comments
Open
2 of 5 tasks

After changing language, next login makes entire screen black #1032

lucasoares opened this issue Jan 9, 2025 · 4 comments
Labels
Priority: Medium This issue may be impactful and needs some attention. Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@lucasoares
Copy link
Contributor

lucasoares commented Jan 9, 2025

Priority

Medium

Area

  • Data
  • Source
  • Docker
  • Other

What happened?

I changed the language and when I logged into a server, the entire screen was black. I had to reopen OTClient to use it:

image

No errors in the console:

image

What OS are you seeing the problem on?

Windows

  • Used the OTClient on the main branch

Code of Conduct

  • I agree to follow this project's Code of Conduct
@lucasoares lucasoares added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jan 9, 2025
@github-actions github-actions bot added Priority: Medium This issue may be impactful and needs some attention. Status: Pending Test This PR or Issue requires more testing labels Jan 9, 2025
@InnerCircleTFS
Copy link
Contributor

https://github.com/mehah/otclient/blob/main/modules/client_locales/locales.lua#L64

the problem is g_modules.reloadModules().
when they added the new tibia 13 layout.
they didn't care about reload all modules with g_modules.reloadModules() (onInit(), onGameStart() ), (it is rarely used. )

@lucasoares
Copy link
Contributor Author

https://github.com/mehah/otclient/blob/main/modules/client_locales/locales.lua#L64

the problem is g_modules.reloadModules(). when they added the new tibia 13 layout. they didn't care about reload all modules with g_modules.reloadModules() (onInit(), onGameStart() ), (it is rarely used. )

I think this may be affecting other systems:

  • Updater
  • Auto reload (many modules doesn't reloads after editing files)

@kokekanon
Copy link
Collaborator

kokekanon commented Jan 15, 2025

about your comment

I think this may be affecting other systems:

  • Updater

Could you provide an example of how to reproduce the update error when executing g_modules.reloadModules()(updater.lua#L164)?

I was testing and updater works with init.lua, modules.lua/.otui, spr/dat . The only thing that didn't work was that it didn't reload the textures(example updating background.png).

I got it to work by adding this g_textures.clearCache() here:

https://github.com/mehah/otclient/blob/main/modules/updater/updater.lua#L164

about sound:

And yes , the music is activated, but the settings in client_options are read correctly
I guess it's a problem of g_sounds, not client_options

about this issues

I noticed that if you use g_modules.reloadModules() before logging in, it works correctly(update behavior), but if you login and then exec g_modules.reloadModules() whether logged in or not, the screen turns black.

I'm assuming it's a cpp issue because I placed the current .exe in data/modules of release 3.5, and I also get a black screen.
it must be something inside game_interface, because if I make reloadable :false in interface.otmod. in online ,g_modules.reloadModules() works correctly.

@lucasoares
Copy link
Contributor Author

lucasoares commented Jan 15, 2025

about your comment

I think this may be affecting other systems:

  • Updater

Could you provide an example of how to reproduce the update error when executing g_modules.reloadModules()

I see.. I will add this information about g_textures.clearCache() on the correct issue (#1044). Thanks for that.

I'm testing it more to know which modules don't reload correctly. I think this issue (#1032) must focus on fixing the reload system to ensure the screen is not black after changing the language. For now, in my own version, I changed to always restart the client after changing the language (sad fix).

About the updater, let's focus first on the sound system being enabled after enabling the updater on its own issue (#1043). I will rename it.

Any other modules with problems using updater, I will create a new issue for it individually, so we can be more productive.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be impactful and needs some attention. Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants