Kataiser / tf2-rich-presence

Discord Rich Presence for Team Fortress 2
GNU General Public License v3.0
62 stars 8 forks source link

Crash when loading tr_walkway_rc2 #13

Closed Gensokian closed 5 years ago

Gensokian commented 5 years ago

Note1:

that I removed the following lines as for the program not finding my console log file (Even though it works just fine after removing these lines) Only thing not working is the automatic download of map images... # -condebug is kinda necessary so just wait to restart if it's not there input("Press enter to retry\n") raise SystemExit

Note2: I changed the instructions on how to enable the console dump to "You look great today!"

CRASHLOG:

TF2 Rich Presence has crashed, the error should now be reported to the developer. (Consider opening an issue at https://github.com/Kataiser/tf2-rich-presence/issues) Restarting in 2 seconds... You look great today!

Traceback (most recent call last): File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 50, in launch app.run() File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 85, in run self.loop_body() File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 164, in loop_body top_line, bottom_line, server_ip = self.interpret_console_log(os.path.join(tf2_location, 'tf', 'console.log'), valid_usernames) File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 346, in interpret_console_log if 'Disconnect by user' in line and [i for i in user_usernames if i in line]: TypeError: 'NoneType' object is not iterable `

Kataiser commented 5 years ago

Interesting that the program managed to find -condebug but not your (public) Steam username. No idea why a crash only happens when loading walkway, could have sworn I tested that, and the code that you changed shouldn't matter. I do get automatic crash reports with more detail so I'll go over that today or tomorrow. Have you tried changing some settings around to prevent a crash? Also automatic download of map images is something I can't do because of a technical limitation of Discord, however it should have an image for the map's gamemode. And I like "you look great today" :)

Gensokian commented 5 years ago

Sorry for the late response. I updated the version (in case there was a new version) but it seems that that didn't fix it.

Again I had to change the `# alerts the user that they don't seem to have -condebug def no_condebug_warning(): print("\nYour TF2 installation doesn't yet seem to be set up properly. To fix:" "\n1. Right click on Team Fortress 2 in your Steam library" "\n2. Open properties (very bottom)" "\n3. Click \"Set launch options...\"" "\n4. Add -condebug" "\n5. OK and Close" "\n6. Restart TF2\n")

-condebug is kinda necessary so just wait to restart if it's not there

input("Press enter to retry\n")
raise SystemExit`

To # alerts the user that they don't seem to have -condebug def no_condebug_warning(): print("You look great today! :D")

I mean it's no issue, i could only remove the Systemexit but it just seems a little nicer. Also because I don't know python too much. ^^

Also i tried running it without my launch option (tf2 property thingies) which didn't seem to do a whole lot either... Current Config -threads 4 -novid -heapsize 4194304 -dxlevel 98 -noborder -windowed -w 2560 -h 1440 -noforcemaccel -noforcemparms -conclearlog -condebug +port 27016 +clientport 27005

I also tried changing my Profile name to remove the non-ascii symbols (In case that would do anything) Nope.

As for the tr_walkway it seemed to be a one time only thing. Might aswell be my mods which told the program to just obliterate itself or something i dunno.

Gensokian commented 5 years ago

Little addition, just played another 2 hours of TF2 and it seemed to have crashed again when I wasn't paying attention.

Kataiser commented 5 years ago

Regarding your TF2 launch options:

  1. I never knew about -conclearlog, after looking up what it does I'm not sure if helps or hurts my program. Maybe remove it for now? (Edit: I tested it and it's mostly fine)
  2. I know the benefits of -noborder -windowed, but FYI it can add input delay
  3. -heapsize does nothing anymore, the game automatically scales it

The file that Steam uses to save launch options also saves your Steam username, which I use to figure out when you've left a server (wish I could make the console more verbose but whatever). The problem seems to be that my program can't find your username, but it can find -condebug. Could you open the file "localconfig.vdf" in "\Steam\userdata{your user id}\config" (there may be more than one user folder) in a text editor, and search for "PersonaName"? It also might have been a bug that I fixed in be08946, but it's best to check if Steam is being Steam.

Kataiser commented 5 years ago

Also be careful when editing Python code, if you mix tabs with spaces Python will crash.

Gensokian commented 5 years ago

So according to the vdf it says;

image

also when I change my steam username & reload the file it seems to change aswell. Maybe it's because I once switched the TF2 directory to a different drive/partition?

Kataiser commented 5 years ago

Okay it looks like it's not Steam's fault, and TF2's location shouldn't matter. Try this pre-release, maybe I fixed it (and even if I didn't, this version provides me with better crash logs): https://github.com/Kataiser/tf2-rich-presence/releases/tag/v1.7

Gensokian commented 5 years ago

image

Well shoot this still seems to not have fixed it.... Also starting TF2 without any configuration didn't seem to make any difference.... I'll soon test it on a secondary system and see if that does anything.

Kataiser commented 5 years ago

Can you send me the file in the logs folder? It seems to be caused by one of two problems and having the log file will help narrow it down. Also here's another potential fix: configs.txt, rename to configs.py and replace the one in the resources folder.

Kataiser commented 5 years ago

yeah thanks wonderful ISP for cutting out and causing that comment to send twice

Gensokian commented 5 years ago

Allright just used your config aaaaand it seems that that did not do the job either...

As for the log; here ya go. I cleaned it and just did a startup; loaded into itemtest and killed some bots with every class.

console.log

As a sidenote, I use a lot of cfgs, might that be a problem? I just noticed as i was looking at my log which prints out which configs have been loaded Networking, gfx and so on, then clears the console and renders my ascii art in the main menu.

Gensokian commented 5 years ago

Okay, on this new build everything seems to be fine.... I analyzed the two systems and got to the conclusion that it might be that i somehow installed steam twice on two different drives. Now that i am running on a new systems with my old cleaned up Files (and steam only installed once) it works 100% fine.

I then dug deeper and saw in the second steam directory that the localconfig.vdf had one of my old account name and aliases saved which you probably have gotten.

Conclusion. Don't make a mess out of your file-system, some stuff might break.

Kataiser commented 5 years ago

Don't make a mess out of your file-system

I know the pitfalls of that all too well. Not sure if I can make this program account for multiple Steam installations, but I'll count this issue as fixed cause who's gonna stop me