Coder Social home page Coder Social logo

Comments (11)

ooowoothevirtualhowler avatar ooowoothevirtualhowler commented on August 16, 2024 3

Yup you can see it's calling the Nametag2d destructor by setting the notify mode to debug.

from libtoontown.

ooowoothevirtualhowler avatar ooowoothevirtualhowler commented on August 16, 2024 2

After my testing, I'm thinking it's actually the get_nametag2d() function specifically. I'm thinking maybe an issue with the destructor behavior or the function generated by interrogate. Edit: I can indeed confirm it occurs in the interrogate function for get_nametag2d() after running tests with Visual Studio. Double edit: The exception seems to be related to a pure virtual function.

from libtoontown.

darktohka avatar darktohka commented on August 16, 2024 2

This problem has been fixed by @LittleToonCat as of a006ca4.

from libtoontown.

drewc5131 avatar drewc5131 commented on August 16, 2024 1

this is caused by nametags. seems the set_contents() function is creating issues

from libtoontown.

ooowoothevirtualhowler avatar ooowoothevirtualhowler commented on August 16, 2024

And I just discovered it works fine on NPCs. It's only an issue with LocalAvatar instances.

from libtoontown.

drewc5131 avatar drewc5131 commented on August 16, 2024

And I just discovered it works fine on NPCs. It's only an issue with LocalAvatar instances.

That would make sense as it works perfectly fine in OpenRTM

from libtoontown.

ooowoothevirtualhowler avatar ooowoothevirtualhowler commented on August 16, 2024

Seems to be that for some reason when u initialize it with a LocalAvatar, the Nametag2d gets destructed immediately upon creation and all the other things are just a side effect of it. (Didn't bring it up sooner cuz I thought it was specific to the context when logging into your toon but it happens upon creating any LocalAvatars.)

from libtoontown.

drewc5131 avatar drewc5131 commented on August 16, 2024

It is intended that the nametag2d does not exist, only chat bubbles are supposed to exist for localavatars. A side effect of this being removed in servers can be seen in Corporate Clash, where if your character is not visible, you will see your nametag on the margins, which isn't intended

from libtoontown.

ooowoothevirtualhowler avatar ooowoothevirtualhowler commented on August 16, 2024

It is intended that the nametag2d does not exist, only chat bubbles are supposed to exist for localavatars. A side effect of this being removed in servers can be seen in Corporate Clash, where if your character is not visible, you will see your nametag on the margins, which isn't intended

Don't think that deletes the nametag. It basically just doesn't show the name by setting the contents flags. It's just one line in LocalAvatar's __init__ that controls that. Not sure when it was removed but I think a bunch of servers are missing that one line.

Edit: Looks like it was removed very early on in TTI.

self.nametag2dNormalContents = Nametag.CSpeech

from libtoontown.

drewc5131 avatar drewc5131 commented on August 16, 2024

Tried commenting that out, didnt work. So youre saying it's full on destroying the nametag object? Odd. I haven't looked much into it

from libtoontown.

LittleToonCat avatar LittleToonCat commented on August 16, 2024

Just here confirming @ooowoothevirtualhowler's case that it is indeed of how the code is interrogated and garbage collected by Python.

The majority of the Toontown code has NametagGroup.getNametag2d() or NameTagGroup.getNametag3d() calls by themselves without storing them in some sort of variable. So calls like self.nametag.getNametag2d().setContents(self.nametag2dContents & self.nametag2dDist) from DistributedAvatar will cause the NametagGroup instance's _nametag2d to get totally deconstructed, and will crash the program when getNametag2d() is called expecting the same _nametag2d instance. Looking at how nametags works in general, I don't think this is supposed to happen, and needs to be fixed. (This doesn't affect just getNametag2d(), but the exact same issue applies to getNametag3d() as well.)

Here's a test code I've made which replicates the exact same crash:

from panda3d.core import *
from libotp import *

loadPrcFileData('', 'notify-level-nametag debug')

# Create our own NametagGroup.
nametag = NametagGroup()

# This will just fetches and print out their Nametag2d as normal...
print(nametag.getNametag2d())

# But shortly after that, the NametagGroup's Nametag2d gets deconstructed
# (even though it's not supposed to), so this will just crash.
print(nametag.getNametag2d())

from libtoontown.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.