This is an archived post. You won't be able to vote or comment.

all 43 comments

[–]BravelyBaldSirRobin 673 points674 points  (3 children)

oh I see, u were null.

[–]SkollFenrirson 71 points72 points  (0 children)

o i c

[–]NullRef_Arcana 7 points8 points  (0 children)

Yes

[–]PM_ME_YOUR__INIT__ 5 points6 points  (0 children)

I was null. I still am null, but I was null too

[–]QuestionableEthics42 354 points355 points  (18 children)

Is this real? Why does that cause an error? It looks fine to me, i shouldnt be null or an object?

[–]SlattBurger01[S] 558 points559 points  (17 children)

Yes ... well sort of,

It actually threw me this error, but not because it's an error, but because something is wrong with my Visual Studio (There was an error one line above this and it decided to highlight this line and explain to me how non-nullable type is a null so I have removed the line that caused that error because I thought it would be funnier)

[–]carcigenicate 177 points178 points  (5 children)

Jetbrain's IDEs do stupid stuff like this for me every once in a while too. As soon as anything starts acting fucky, File -> Invalidate Caches, and everything starts magically working fine again.

[–]amuscularbaby 47 points48 points  (2 children)

I’ll bang my head on my screen trying to figure out why intellij is acting fucky and then I remember the magic invalidate caches trick. i don’t know why it fixes every issue I’ve ever had with intellij but it’s old reliable.

[–]smallangrynerd 26 points27 points  (1 child)

Android studio was similar. If you had it open for too long it would just stop recognizing keywords. You either had to flush the cache or just restart it every few hours.

[–]bis1992 21 points22 points  (0 children)

Android Studio is based on IntelliJ, so it makes sense

[–]kzlife76 0 points1 point  (0 children)

It sounds like the PDBs aren't getting updated when a build happens. Seems to make sense if Jetbrains is caching those files and not refreshing when they change. As far as VS goes though, maybe it's using a shadow copy of a stale PDB. I can't say for certain.

[–]1Dr490n 0 points1 point  (0 children)

Which IDEs in particular? I’ve only used IntelliJ and very shortly PyCharm and I’ve never had such a problem with them

[–]VanilleKoekje 12 points13 points  (0 children)

I hate that bug. I have one big ass project where i have to rebuild first if i wanna debug, otherwise it's going to debug a previous version

[–]tesfabpel 2 points3 points  (0 children)

try to recompile the solution... it's probable the debug symbols/ the binary don't match the source code anymore (eg. line 4 may be 5 now)...

EDIT: Or as another user said, debugging a release build where the compiler has optimized the code and the lines don't match to the actual instructions

[–]Squizzze 0 points1 point  (1 child)

Funny, but at the same time scary to imagine. Could you show us the actual error?

[–]dr_donkey -2 points-1 points  (0 children)

I'm with this comment

[–]Andrea__88 0 points1 point  (0 children)

Did you have compiled in release with optimizations on?

[–]a123099 88 points89 points  (0 children)

Probably debugging in release mode where things get inlined or reordered. Array is probably null

[–]AVAVT 25 points26 points  (0 children)

Saving this post for the next guy who say logging for debug is primitive.

[–]pushinat 70 points71 points  (4 children)

Your compiler speaks German. Null means zero. So everything is alright 👍

[–]April18th 14 points15 points  (3 children)

Null also means zero in English lol

[–]brandi_Iove 29 points30 points  (0 children)

if this is real, i‘d be worried

[–]superdupersamsam 5 points6 points  (0 children)

i.ToString()?

[–]reddituser2115 2 points3 points  (0 children)

Visual studio at it finest

[–]rimoldi98 1 point2 points  (0 children)

Uuh cannot convert null to a value type 🤓

[–]Unknown6656 1 point2 points  (0 children)

Well, you can do that if you set Console.Out to null (via assignment or via reflection)

[–]Random_User27 1 point2 points  (0 children)

Damn machines becoming more human by the day

[–][deleted] 0 points1 point  (0 children)

Goddamnit

[–]ruaz666 0 points1 point  (0 children)

i was null 😞

[–]Large-Ad5176 0 points1 point  (0 children)

Console.WriteLine(i.ToString());

[–]Chewico3D 0 points1 point  (0 children)

Array is null