Forum Discussion

Rawryxmusic's avatar
3 years ago

LE: Exception while processing telemetry hooks

Product: The Sims 4
Platform:PC
Which language are you playing the game in? English
How often does the bug occur? Often (50% - 99%)
What is your current game version number? 1.96.365.1030
What expansions, game packs, and stuff packs do you have installed? All expansions besides HSY, Werewolves, DHD, Parenthood, Dine Out, Spa Day, Outdoor Retreat, Nifty Knitting, Tiny Living, Moschino, Laundry Day, Toddler, Spooky and Desert Luxe Kit
Steps: How can we find the bug ourselves? I'm not sure, it's a consistent lastexception error.
What happens when the bug occurs? Gamewise nothing, I just get a culling error, or relationship metrics
What do you expect to see? Not have a LE Error
Have you installed any customization with the game, e.g. Custom Content or Mods? Not now. I've removed them.
Did this issue appear after a specific patch or change you made to your system? Neutral/Not Sure 

I kept getting a consistent LE;

  • Last Module Called: performance_commands.py
  • Last Function Called: get_relationship_metrics
  • Error message: [BE Interceptor] BE intercepted this error from a separate mod log so that it can scan for the issue. (AttributeError: 'NoneType' object has no attribute 'sim_id'), CategoryID: performance_commands:742

OR a culling error. I did this in MCCC Vanilla too and kept getting the error. Gameplay wise, nothing is wrong, but this LE keeps popping up.

Edit By Crinrict: Adjusted Title

7 Replies

Replies have been turned off for this discussion
  • (Small update to make it more clear this is specific to relationship culling, not Sim culling in general).

    I was able to procure a save in which this error happened and here's what it looks like without mods in, confirming that at least if the error is somehow related to mods, it sticks into the save once it's there.

    Curiously enough, I got the the other relationship error (with Sim IDs that point to nothing) which seems to indicate to me that this error may be fallout from that one.

    At the core of it, it's the same issue: when the game performs its routine culling specifically of relationships (through the neighbourhood story "actions" a.k.a. story progression), it calls a function to send telemetry data to EA about the relationships the Sim managed to have before their relationships are cleared out.

    Under the cut is the function/the part of the code where the error hits (from performance/performance_commands.py):

    Spoiler
    def get_relationship_metrics(output=None):
        rels = 0
        rels_active = 0
        rels_played = 0
        rels_unplayed = 0
        rel_bits_one_way = 0
        rel_bits_bi = 0
        rel_tracks = 0
        meaningful_rels = collections.defaultdict(int)
        played_sims_with_sentiments = set()
        rels_on_played_sims_with_sentiments = 0
        num_sentiments_on_player_sims = 0
        sims_with_sentiments = set()
        rels_with_sentiments = 0
        total_num_sentiments = 0
        rel_service = services.relationship_service()
        for relationship in rel_service:
            x = relationship.find_sim_info_a()
            # the error is here and on the line with y_id, if x and y are unable to return actual SimInfo objects, which for whatever reason seems to sometimes be the case
            x_id = x.sim_id
            y = relationship.find_sim_info_b()
            y_id = y.sim_id
            x_bits = set(relationship.get_bits(x_id))
            y_bits = set(relationship.get_bits(y_id))
            rel_bits_bi += sum(1 for bit in x_bits if bit.directionality == RelationshipDirection.BIDIRECTIONAL)
            rel_bits_one_way += sum(1 for bit in x_bits if bit.directionality == RelationshipDirection.UNIDIRECTIONAL) + sum(1 for bit in y_bits if bit.directionality == RelationshipDirection.UNIDIRECTIONAL)
            rel_tracks += len(relationship.relationship_track_tracker)
            x_sentiment_count = len(relationship.sentiment_track_tracker(x_id))
            y_sentiment_count = len(relationship.sentiment_track_tracker(y_id))
            if x_sentiment_count > 0 or y_sentiment_count > 0:
                if x_sentiment_count > 0:
                    rel_tracks += x_sentiment_count
                    total_num_sentiments += x_sentiment_count
                    sims_with_sentiments.add(x_id)
                    if x.is_played_sim:
                        played_sims_with_sentiments.add(x_id)
                        num_sentiments_on_player_sims += x_sentiment_count
                if y_sentiment_count > 0:
                    rel_tracks += y_sentiment_count
                    total_num_sentiments += y_sentiment_count
                    sims_with_sentiments.add(y_id)
                    if y.is_played_sim:
                        played_sims_with_sentiments.add(y_id)
                        num_sentiments_on_player_sims += y_sentiment_count
                if x.is_played_sim or y.is_played_sim:
                    rels_on_played_sims_with_sentiments += 1
                rels_with_sentiments += 1
            rels += 1
            if not (x.is_npc and y.is_npc):
                rels_active += 1
                if RelationshipGlobalTuning.MEANINGFUL_RELATIONSHIP_BITS & x_bits:
                    meaningful_rels[x_id] += 1
                if RelationshipGlobalTuning.MEANINGFUL_RELATIONSHIP_BITS & y_bits:
                    meaningful_rels[y_id] += 1
                    if x.is_played_sim or y.is_played_sim:
                        rels_played += 1
                        if RelationshipGlobalTuning.MEANINGFUL_RELATIONSHIP_BITS & x_bits:
                            meaningful_rels[x_id] += 1
                        if RelationshipGlobalTuning.MEANINGFUL_RELATIONSHIP_BITS & y_bits:
                            meaningful_rels[y_id] += 1
                            rels_unplayed += 1
                    else:
                        rels_unplayed += 1
            elif x.is_played_sim or y.is_played_sim:
                rels_played += 1
                if RelationshipGlobalTuning.MEANINGFUL_RELATIONSHIP_BITS & x_bits:
                    meaningful_rels[x_id] += 1
                if RelationshipGlobalTuning.MEANINGFUL_RELATIONSHIP_BITS & y_bits:
                    meaningful_rels[y_id] += 1
                    rels_unplayed += 1
            else:
                rels_unplayed += 1
        avg_meaningful_rels = sum(meaningful_rels.values())/float(len(meaningful_rels)) if meaningful_rels else 0
        num_player_sims_with_sentiments = len(played_sims_with_sentiments)
        num_sims_with_sentiments = len(sims_with_sentiments)
        return RelationshipMetrics(rels, rels_active, rels_played, rels_unplayed, rel_bits_one_way, rel_bits_bi, rel_tracks, avg_meaningful_rels, num_player_sims_with_sentiments, rels_on_played_sims_with_sentiments, num_sentiments_on_player_sims, num_sims_with_sentiments, rels_with_sentiments, total_num_sentiments)

    As with the other error, fixing it is somewhat trivial, but finding out how it's happening is something that the Devs will need to do and probably require some save files to fully understand. This wasn't something that happened before to my knowledge so their code base must have introduced this bug and fixing that will be much harder.

  • DoublePlusBon's avatar
    DoublePlusBon
    Seasoned Hotshot
    3 years ago

    Thank you for your hard work ! Do you know if your fix is still needed with the last April 18 patch ? 

  • DoublePlusBon's avatar
    DoublePlusBon
    Seasoned Hotshot
    3 years ago

    Hi ! I haven't updated the game yet because of the telemetry bugs. I know that the first bug was fixed in the last update because it was related to the sims' pregnancy problem which has been solved. But I would like to make sure that this bug was also fixed by EA. That's why I'm asking LeRoiDeTout.

  • TheSimsDirect's avatar
    TheSimsDirect
    Icon for The Sims Team rankThe Sims Team
    3 years ago

    Under investigation. Accepting as solution for visibility purposes only.

    Hello.

    Is anyone still seeing this issue with a fully up-to-date game?

    If so, would you be willing to share affected save files?

    Instructions here:
    https://x.ea.com/74420

About The Sims 4 Bug Reports - Archive

This is a read-only archive of bugs previously reported on Answers HQ. Click "The Sims 4 Bug Reports" in the right-rail to browse and create new bugs.14,624 PostsLatest Activity: 9 months ago