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

Null pointer access error (Outdated versions shipped with Turbo and MP4) #2

Open
Fort-TM opened this issue Nov 13, 2024 · 0 comments
Open

Comments

@Fort-TM
Copy link

Fort-TM commented Nov 13, 2024

Issue

When opening the editor on MP4, I got a null pointer access error

[   ScriptRuntime] [ERROR] [14:24:09] [Plugin_EditorDeveloper]  Script exception: Null pointer access
[   ScriptRuntime] [ERROR] [14:24:09] [Plugin_EditorDeveloper]    C:/Program Files (x86)/Steam/steamapps/common/ManiaPlanet_TMCanyon/Openplanet/Scripts/Plugin_EditorDeveloper.as (line 41, column 2)
[   ScriptRuntime] [ERROR] [14:24:09] [Plugin_EditorDeveloper]      #0  void OnEditorOpen(CGameCtnEditorFree@ editor) (C:/Program Files (x86)/Steam/steamapps/common/ManiaPlanet_TMCanyon/Openplanet/Scripts/Plugin_EditorDeveloper.as line 43)
[   ScriptRuntime] [ERROR] [14:24:09] [Plugin_EditorDeveloper]      #1  void Main() (C:/Program Files (x86)/Steam/steamapps/common/ManiaPlanet_TMCanyon/Openplanet/Scripts/Plugin_EditorDeveloper.as line 89)

Explanation

When following the path and checking the file, the error seems to happen here

auto frameDeveloperTools = cast<CControlContainer>(FindControl(root, "FrameDeveloperTools"));
frameDeveloperTools.Show();

for (uint i = 0; i < frameDeveloperTools.Childs.Length; i++) {
    frameDeveloperTools.Childs[i].Show();
}

The plugin shipped with OP seems to be outdated compared to the version in this repository, since the latter checks if the variable is null beforehand

editordeveloper/Main.as

Lines 43 to 46 in 84dd045

if (Setting_NadeoDeveloperTools) {
auto frameDeveloperTools = cast<CControlContainer>(FindControl(root, "FrameDeveloperTools"));
if (frameDeveloperTools !is null) {
frameDeveloperTools.Show();

Just in case, I decided to also check the versions shipped with TM2020 and Turbo. TM2020 is up-to-date, while the version shipped with Turbo seems to be more outdated than MP4's

Ideally, the plugin shipped with Openplanet for Turbo and MP4 should be updated, if it's compatible.

Additional information

  • MP4 Openplanet version: 1.27.2
  • Turbo Openplanet version: 1.27.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant