Bug - Fixed java.lang.NullPointerException error

taltamir

Member
I am getting a pretty weird error.

debug log
View attachment DEBUG_20200908.txt

The CLI message is
Code:
[COLOR=blue]Current settings for greygoo:[/COLOR]
[COLOR=blue]greygoo_guildUnlock     = true[/COLOR]
^unlock your class guild
[COLOR=blue]greygoo_bakeryHardcoreUnlock     = true[/COLOR]
^unlock madness bakery if in hardcore
[COLOR=blue]greygoo_bakerySoftcoreUnlock     = true[/COLOR]
^unlock madness bakery if not in hardcore
[COLOR=blue]greygoo_fortuneHardcore     = true[/COLOR]
^consume fortune cookie and lucky lindy in hardcore
[COLOR=blue]greygoo_fortuneSoftcore     = true[/COLOR]
^consume fortune cookie and lucky lindy not in hardcore
[COLOR=blue]greygoo_fightGoo     = true[/COLOR]
^fight the goo monsters

[COLOR=blue]You can     make changes to these settings by typing:[/COLOR]
[COLOR=blue]set     [setting_name] = [target][/COLOR]

Unexpected error, debug log     printed.
[COLOR=red]Script execution aborted     (java.lang.NullPointerException): (greygoo.ash, line 68)
[/COLOR]


The line it is referring to is
Code:
void greygoo_settings_print()
{
    //print current settings status
    print();
    print("Current settings for greygoo:", "blue");
    tt_printSetting("greygoo_guildUnlock", "unlock your class guild");
    tt_printSetting("greygoo_bakeryHardcoreUnlock", "unlock madness bakery if in hardcore");
    tt_printSetting("greygoo_bakerySoftcoreUnlock", "unlock madness bakery if not in hardcore");
    tt_printSetting("greygoo_fortuneHardcore", "consume fortune cookie and lucky lindy in hardcore");
    tt_printSetting("greygoo_fortuneSoftcore", "consume fortune cookie and lucky lindy not in hardcore");
    tt_printSetting("greygoo_fightGoo", "fight the goo monsters");
    
    print();
    print("You can make changes to these settings by typing:", "blue");
    print("set [setting_name] = [target]", "blue");
    print();
}
line 68 is the final print(); in the above function. with the closing } being line 69

I got this exact same thing working fine in multiple other scripts. and according to the CLI log you can see that it actually worked because you can see that it skipped a line after "set [setting_name] = [target]"

That function itself is being called from
Code:
void main()
{
    if(my_path() != "Grey Goo")
    {
        abort("I am not in Grey Goo");
    }
    
    greygoo_settings_defaults();
    
    try
    {
        greygoo_start();
    }
    finally
    {
        greygoo_settings_print();
    }
}
and is the last thing that is being run just as the whole thing finishes
so it is not really doing any harm since it throws that error just as the script is completely done. still pretty weird.

Also weirdly. I got it 2 days in a row now. and only in one account. other accounts are not having this error.
 
Last edited:
Top