|
Look for WeakReference in the code. There's also Lazy<t> but I doubt that's causing it because it's thread safe, at least if you set it up to be - it's worth looking for those too. though.
Another thing to look for is harder to search for, but the lazy init pattern used in older code. You'll find it hidden behind property accessors usually. Replace it.
To err is human. Fortune favors the monsters.
|
|
|
|
|
It was none of that.
The code doesn't use WeakReference (nor does any code I've ever seen).
I used the same C# property for two separate navigational properties in EF.
Which "sort of" works, apparently.
The exception really doesn't make sense though, as do the symptoms
|
|
|
|
|
Sander Rossel wrote: I used the same C# property for two separate navigational properties in EF.
Which "sort of" works, apparently.
The exception really doesn't make sense though, as do the symptoms Sounds like someone is using ReferenceEquals instead of an actual value comparison.
Software Zen: delete this;
|
|
|
|
|
Nah, I don't think I've ever seen ReferenceEquals in C# code, because why would you ever want to know that?
The problem was more like:
someEntity.HasMany(x => x.FirstList).WithMany(x => x.OtherList).UsingEntity<...>(...)
someEntity.HasMany(x => x.SecondList).WithMany(x => x.OtherList).UsingEntity<...>(...) Changing that second line fixed the issue.
someEntity.HasMany(x => x.SecondList).WithMany(x => x.SecondOtherList).UsingEntity<...>(...) Not an obvious error, compiles fine and everything.
|
|
|
|
|
Sander Rossel wrote: I don't think I've ever seen ReferenceEquals in C# code, because why would you ever want to know that? I've used it a few times, mostly in collections and n-way tree structures to identify specific instances.
Software Zen: delete this;
|
|
|
|
|
I did see this before.
I even had the case where the debug build would work and the release build did not, for what I can only guess would be a similar reason.
Don't remember how I solved it though.
|
|
|
|
|
I used the same C# property for two separate navigational properties, which "sort of" works, apparently.
The exception doesn't make sense though, so it seems to be quite a specific error.
|
|
|
|
|
What do you mean "sort of works" ?
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
It works when I first look at it using the debugger.
It sometimes works for the first one or two results, but eventually breaks on the third or fourth.
So it sort of works, sometimes.
The error isn't consistent.
|
|
|
|
|
Sander Rossel wrote: Well, Google it for yourself... No results
Not true. With "verbatim" search on, there is one result...
... this thread!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Wow, that's indexed rather quickly
|
|
|
|
|
odd, there an article from 2 Jul 2011 on code project asking about nullreferenceexception "FixupSkipNavigations"
|
|
|
|
|
Richard Deeming wrote: Sander Rossel wrote:Well, Google it for yourself... No results
Not true. With "verbatim" search on, there is one result...
... this thread! but that has a date of 2 JuneJuly 2011
Other search engines are available: Bing has four matches
Editted: Fixed date
modified 9-May-22 6:20am.
|
|
|
|
|
My granddaughter (1 year old) got a hold of my laptop and "typed" some gibberish which happened to be on a new Chrome tab and she got the Yeti.
Cute when you aren't trying to find something for work.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
Having just watched episode 1, I am here to report that: yes, it's Star Trek.
Whether that's good or bad depends on whether you like Star Trek.
- Low-effort humanoid aliens. There is an official excuse for this, but they're still low-effort humanoids. Slap on a Facial Feature and call it a day.
- Uninspired reflection of/on current state of the world.
- Violating the prime directive is Good, Actually if you're the main character. Otherwise it's bad.
- Human morality is superior to anything else found in the entire universe. "Correcting" aliens is our job.
It looks good though, and I didn't see anything like a "bunch of potted plants in a studio to pretend we're outdoors".
|
|
|
|
|
I kind of fell asleep watching it.
It looks really boring.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
We don't get it here until the end of June ... but I am concerned about the "episodic" nature it promises. "All wrapped up in one episode" worked for TOS and TNG, but even Voyager and Enterprise had "longer arc" elements. One of the really good things (for me) about DS9, Discovery, and Picard were the more modern storytelling over a season with local detail elements per episode
I just suspect it'll feel short and shallow as a result - like TNG did once Babylon 5 started foreshadowing.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Yes EP1 was definitely a self-contained episode, the major plot lines started and ended. Not much set-up for further episodes (I'm not counting the teaser trailer at the end), except introducing some characters. It could have been a movie.
|
|
|
|
|
|
I'll take the potted plants in a studio with good storytelling (aka TOS, TNG) over some production that only focuses on getting the special effects look good.
|
|
|
|
|
harold aptroot wrote: Human morality is superior to anything else found in the entire universe. "Correcting" aliens is our job
Seems like humans spend a lot of time doing that with other humans also. So of course it must be correct.
|
|
|
|
|
|
I would say that my walking speed is a very insignificant fraction thereof.
|
|
|
|
|
I'm pretty light footed and therefore must be pretty healthy?
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
That makes me think of a song by Gordon Lightfoot:
Quote: It's cold on the shoulder
And you know that we get
A little older every day
Cold on the Shoulder - YouTube[^]
|
|
|
|