RimWorld

RimWorld

Twilight Sep 1, 2018 @ 2:54am
Weird bug: Null pointer exception when right-clicking downed colonists
Hi,

my savegame migrated from a few versions before and i experience an odd behaviour:
When a Colonist gets shot and goes down, none of my other colonists can come to their aid, because right clicking on my colonists gives an null pointer exception instead showing the menu with the entry to pick them up and rescue them to a hospital bed.

I can only wait for one of my rescue dogs and bears ( yeah, well.. one of those stories :) ) to pick them up as haulers.

I dont have a ludeon account yet so i hope i'll gets some response here first.

I expected to get some weird mishaps from game vesion savegame to to the next, but not in such a standard mechanism. Something fails, and then the context menu decides not to show up at all.

I don't use any intrusive mods btw.

Regards
Last edited by Twilight; Sep 1, 2018 @ 2:54am
< >
Showing 1-15 of 20 comments
Boink (Banned) Sep 1, 2018 @ 2:57am 
Originally posted by Twilight:
my savegame migrated from a few versions before

Well, there's your problem right there.

Save games (esp. pre-0.18) aren't compatible. You can select which build you want to play via the Library / properties / beta tab if you're 100% set on not updating to 0.19.
Last edited by Boink; Sep 1, 2018 @ 2:59am
Twilight Sep 1, 2018 @ 3:30am 
Well, i knew that before.
Still, the game loads and migrates savegames, which i appreciate. i don't mind lost workbenches or changed mechanisms.But standard stuff should be right there as always.

Anyway, no matter the savegame, the context menu shouldn't bug out and not appear. It's a standard functionality that was available since pretty much from the beginning.

Also, i like my colony too much to just abandon it.

Be that as it may, the fact that the right click gives a nullpointer exception in the case of a downed colonist (a vanilla game mechanism) indicates some bug to me.
Last edited by Twilight; Sep 1, 2018 @ 3:38am
Boink (Banned) Sep 1, 2018 @ 4:14am 
Originally posted by Twilight:
Anyway, no matter the savegame, the context menu shouldn't bug out and not appear. It's a standard functionality that was available since pretty much from the beginning.

Also, i like my colony too much to just abandon it.

Be that as it may, the fact that the right click gives a nullpointer exception in the case of a downed colonist (a vanilla game mechanism) indicates some bug to me.

Two things:

1) Feel free to point to the code changes between 0.17 > 0.19 to back up your claim that 'standard functionality' remains unchanged. Willing to bet money you cannot.

2) You've already been told how to revert your game to the A15-17 / B18 builds via Steam if you're 100% set on keeping an old save.

So, looks like you're just whinging / not listening, so I'll leave you to it.
Last edited by Boink; Sep 1, 2018 @ 4:15am
Twilight Sep 1, 2018 @ 4:22am 
Thanks for leaving it be, because i am not here to be lectured. You gave your input on the issue, we disagree, you move on. Thanks.

As I have a lot of professional software engineering experience myself, i still can tell that no matter the savegame data, if you right click on a game item under a certain condition, there shouldn't be a null pointer exception. You expect the menu to show up wih something or not at all. Having it bug out indicates a non-robustness there.

I can understand if not everything is show in that menu, depending on a mod, whatever. Fetching a downed colonist to ahospital is to innocent to fall prone to a code change side effect, or a continuous integration issue.

So, yeah. There is a bug there :)

And i bet the cauing side effect would be interesting, but thats just me and my software engineer reflexes.

Edit:
as Boinks points 1) and 2) werent either claimed by me nor matter to my finding in itself, i ignored them.
Last edited by Twilight; Sep 1, 2018 @ 4:26am
Boink (Banned) Sep 1, 2018 @ 4:26am 
Originally posted by Twilight:
As I have a lot of professional software engineering experience myself, i still can tell that no matter the savegame data, if you right click on a game item under a certain condition, there shouldn't be a null pointer exception. You expect the menu to show up wih something or not at all. Having it bug out indicates a non-robustness there


...or an ID / pathway bit of code was changed. If ID = changed, then = null pointer.

I'd expect an undergraduate to grasp that, let alone 'experienced' coders. To explain that: if your saved state has a pawn with IDx and the code has removed that ID# (not bothering to dig into particulars here, a lot of pawn changes have happened, as well as pathing code) then that pawn has an invalid ID.

Do. You. Understand. Yet?


Originally posted by Twilight:
Thanks for leaving it be, because i am not here to be lectured. You gave your input on the issue, we disagree, you move on. Thanks.

Learn to know when you're just wrong: you're suffering from a case of engineer's disease, get it treated ASAP.

Originally posted by Twilight:

Edit:
as Boinks points 1) and 2) werent either claimed by me nor matter to my finding in itself, i ignored them.


You're playing a save file from A0.1x (unstated). So, yes, 2) applies.


Autism. Literal Autism.
Last edited by Boink; Sep 1, 2018 @ 4:35am
Twilight Sep 1, 2018 @ 4:31am 
Are you here to troll around?

i don't care where you get your null pointers from, the only thing i say is:
right click on pawn -> null pointer exception

If that's ok in your world, no matter the input data underneath, then i surely don't want you as a coworker :D

A GUI layer is still a different architectural layer then the data layer. Does in your world the GUI layer *really* bug out when the data layer delivers something inappropriate? If so, i'd suggest you go over your software architecture books again.

Also: Insult like 'autism' just gets you reported as a little troll.
Last edited by Twilight; Sep 1, 2018 @ 4:36am
Boink (Banned) Sep 1, 2018 @ 4:36am 
Originally posted by Boink:
To explain that: if your saved state has a pawn with IDx and the code has removed that ID# (not bothering to dig into particulars here, a lot of pawn changes have happened, as well as pathing code) then that pawn has an invalid ID.

Do. You. Understand. Yet?


He didn't understand.

If he was experienced, he'd attempt it with two newly spawned colonists and see if the problem persisted. I'd give you good odds it would not.


"troll" - what engineer disease labels their cognitive dissonance when they're proven incorrect. Sad.

p.s.


You're complaining about 'bugs' from an outdated save. It's not replicable in the current 0.19 build. Thus you're wasting everyone's time and energy. Which is the definition of a troll.
Twilight Sep 1, 2018 @ 4:38am 
So, you find your bug cases by feeding your software 'good' data? You really seem inexperienced...

But please indulge me further on your personal bug finding skills and your professionality in software Q&A. Not that it matters in the big picture, because you are apparently not the adressee to the problem.
Last edited by Twilight; Sep 1, 2018 @ 4:39am
Boink (Banned) Sep 1, 2018 @ 4:42am 
Originally posted by Twilight:
So, you find your bug cases by feeding your software 'good' data? You really seem inexperienced...

But please indulge me further on your personal bug finding skills and your professionality in software Q&A. Not that it matters in the big picture, because you are apparently not the adressee to the problem.


You're complaining about 'bugs' from an outdated save, from a save state that (most likely) has code / ID# that no longer exist in game. It's not replicable in the current 0.19 build. Thus you're wasting everyone's time and energy. Which is the definition of a troll.

Or, do you test software by attempting to force it to use code that literally does not exist? And what happens when we force code to run using stuff that doesn't exist anymore?

NullPointerException is a RuntimeException. In Java, a special null value can be assigned to an object reference. NullPointerException is thrown when program attempts to use an object reference that has the null value.

https://www.geeksforgeeks.org/null-pointer-exception-in-java/


Your pawn is the issue. I've told you this three times now. You continue to not understand that your problem has been diagnosed and is not an issue in the current build. i.e. Pawns created in 0.19 have valid IDs so cannot produce this bug.

Shut. Up. Now. It. Is. Embarressing. Having. To. Give. You. Undergraduate. Coding. Lessons.

Hint: I'm a much smarter bear than you.
Last edited by Boink; Sep 1, 2018 @ 4:45am
Twilight Sep 1, 2018 @ 5:02am 
Mhm, you really seem easily to be angered. Strange, given that you personally attacked me first.

Well, i talked about a GUI layer finding, and you continue to rant about me beeing unable to understand the data layer backend. Two different things like apples and oranges. And mind you, between GUI and data storage is still at least the game logic layer to connect things and throw exceptions early.

Also, you just didn't get what i told you about testing software, so i can safely assume you never had to do with a hardcore Q&A department. :)

Also, the software is not written in Java, even if the concepts are similar to CSharp.

Also, when the game loads a colonist just fine from the xml-based savegame, and happily paints it on screen, and i can happily interact it in every other respect, i still say there is something fishy if named pawn gets downed and cant be taken to hospital in that special case. But that's just me, and i guess i must be really dumb, especially given my background :)

Also, most people claiming to be much smarter than others to end an argument are mostly not that smart at all.

Peace out.


Last edited by Twilight; Sep 1, 2018 @ 5:03am
Boink (Banned) Sep 1, 2018 @ 5:03am 
Originally posted by Twilight:
Snip

Originally posted by Boink:

1) Feel free to point to the code changes between 0.17 > 0.19 to back up your claim that 'standard functionality' remains unchanged. Willing to bet money you cannot.


All mouth, no trousers.


To use a classic example:

class Person { public int age = 10; public string name; public int GetAge() { return age; } public void SetAge(int age) { this.age = age; } } class Program { static void Main(string[] args) { Person p = new Person(); Console.WriteLine(p.GetAge()); Console.ReadLine(); } } }

In the class program above, if p is made to point to null and then again the GetAge method is called on instance variable p, a null pointer exception will occur and a message will be displayed that a NullReferenceException was unhandled. NullReferenceException is a C# version of NullPointerException.


As I've referenced five times now, I suspect that the pathing / handling for how Pawns (ID) are treated when they change states (Healthy > Downed > Passive (bedstate)) has been tweaked, which is causing your issues.

Since other people are reporting issues with Downed Pawns > Rescued state in med bed, this is probably where the bug is.

The issue is that your input is 100% not useful since you're using an old save file. Rule #1 of QA on EA projects: DO NOT USE SAVED DATA FROM PRIOR BUILDS.


We done yet? You know, since I've done all the real work here and you've whinged and wanked yourself silly.
Last edited by Boink; Sep 1, 2018 @ 5:11am
Twilight Sep 1, 2018 @ 5:10am 
You must be fun at parties :)

Also, you ran out of arguments.

Still, you don't understand how software is industrially tested. The code difference isn't even important to point out beforehand, because testers a) usually don't get to see it and b) input data clearly shows a weakness there.

And mind you, we don't speak about cases where the software engineer himself writes his own unit tests for his own software. These are usually done for assuring a software contract, not breach of functionality. That's where others come in to test for weaknesses.

But hey. Just ignore me.
Boink (Banned) Sep 1, 2018 @ 5:11am 
Originally posted by Twilight:
Snip


"Ran out of arguments".

"Actually told you what the issue was and why your input was not helping".
Twilight Sep 1, 2018 @ 5:17am 
Ah. i see you felt the urge to add a lot more to your comment after i replied. Well.

Originally posted by Boink:
The issue is that your input is 100% not useful since you're using an old save file. Rule #1 of QA on EA projects: DO NOT USE SAVED DATA FROM PRIOR BUILDS.

No matter how you personally think that you test software: you just don't feed a productive system only good cases. Also don't call it 'saved date from other builds', just call it 'data'. So, if you put a non-fitting piece of data to a certain context menu, it just bugs out.

You gave an example with a null pointer exception. That usually only indicates some data is just not there, which isn't a issue in itself. But then i expect the context menu to do... nothing. Not just bug out completely and throw an exception. Data that is not there will simply just not be shown...

And regarding your so called rule #1 of QA, claiming nonsense like that gets you thrown out of job interviews. You *never* test only the good cases. But we digress..


Originally posted by Boink:
Since other people are reporting issues with Downed Pawns > Rescued state in med bed, this is probably where the bug is.
So, if there is somethign you yourself even call an *issue*, you don' think it can be a bit more robust at that point? :)

You now even called it a *bug*.

Isn't that what i innocently reported at first?

Dude... really..
Last edited by Twilight; Sep 1, 2018 @ 5:22am
Boink (Banned) Sep 1, 2018 @ 5:21am 
Originally posted by Twilight:
Snip

Since you've not provided a #diff of A0.1x vrs B0.19 we can all ignore your masturbation now.
< >
Showing 1-15 of 20 comments
Per page: 1530 50

Date Posted: Sep 1, 2018 @ 2:54am
Posts: 20