Forum

Results 1 to 13 of 13
  1. #1
    Join Date
    April 2016
    Posts
    18

    How do I debug a libxml2.dll causing TeamSpeak 3 to crash?

    I posted a Stack Overflow question with one answer that hasn't fixed my issue yet.

    http://stackoverflow.com/questions/4...ib1-on-windows

    My code:

    https://github.com/NobleUplift/TeamS.../plugin.c#L148

    So I have two versions of libxml2.dll, one prebuilt by the libxml2 team, and another built by me. The version built by me causes TeamSpeak 3 to crash on boot. How can I debug what in the DLL is causing TeamSpeak 3 to crash?
    Last edited by NobleUplift; March 21st, 2017 at 04:54 PM.

  2. #2
    Join Date
    September 2012
    Posts
    6,080
    With recent TeamSpeak clients you shouldn't actually have to do any manual loading. Windows will load dependencies from the plugins/plugin_name folder.

    According to MSDN __HrLoadAllImportsForDll is for delay loaded libraries - did you actually specify those DLLs to be delay loaded in the linker settings? Not sure how Windows reacts if that mismatches, maybe it breaks because of that.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #3
    Join Date
    August 2013
    Location
    Germany
    Posts
    541
    Quote Originally Posted by Chris View Post
    With recent TeamSpeak clients you shouldn't actually have to do any manual loading. Windows will load dependencies from the plugins/plugin_name folder.

    According to MSDN __HrLoadAllImportsForDll is for delay loaded libraries - did you actually specify those DLLs to be delay loaded in the linker settings? Not sure how Windows reacts if that mismatches, maybe it breaks because of that.
    Will the client load any dlls from the plugin's folder as dependencies?

  4. #4
    Join Date
    April 2016
    Posts
    18
    Quote Originally Posted by Chris View Post
    With recent TeamSpeak clients you shouldn't actually have to do any manual loading. Windows will load dependencies from the plugins/plugin_name folder.

    According to MSDN __HrLoadAllImportsForDll is for delay loaded libraries - did you actually specify those DLLs to be delay loaded in the linker settings? Not sure how Windows reacts if that mismatches, maybe it breaks because of that.
    Thanks for your reply Chris. Here are my Linker settings:

    Click image for larger version. 

Name:	iI8fPGC.png 
Views:	93 
Size:	29.1 KB 
ID:	15247

    Last we spoke you suggested trying to statically link or delay-load my dependencies. Should I try dynamic linking instead of dynamic loading again?

    This is the output of my TS3Client log file:

    Code:
    ==================================================================================================================================
    
    2017-03-25 18:31:26.031648|INFO    |              |   |TeamSpeak 3 Client 3.1.3 (2017-03-23 14:31:12)
    2017-03-25 18:31:26.031648|INFO    |              |   |SystemInformation: Windows 10 (14393) x64 (AMD or Intel) Binary: 32bit
    2017-03-25 18:31:26.031648|INFO    |              |   |Using hardware aes
    2017-03-25 18:31:26.095693|DEBUG   |Direct Sound  |   |setting timer resolution to 1ms - 
    2017-03-25 18:31:26.163741|INFO    |              |   |*** Time [SPAWN_EVENTCONVERTER]: 133
    2017-03-25 18:31:26.351881|INFO    |              |   |*** Time [ICONMANGER]: 188
    2017-03-25 18:31:26.355877|INFO    |Addons        |   |Checking for addon updates...
    2017-03-25 18:31:26.385899|INFO    |Plugins       |   |Loading plugin: ts3websitepreview.dll
    2017-03-25 18:31:26.523996|INFO    |Addon         |   |Addon up to date.
    2017-03-25 18:31:26.554017|INFO    |Addon         |   |Addon up to date.
    2017-03-25 18:31:26.667112|        |KeyBindings   |   |Default monitoring disabled
    It crashes after this point. I sent in an error report to TeamSpeak Systems GmbH. Is it possible for you to check that error report?

    UPDATE: I switched back to dynamic linking and now I'm getting an error:

    Click image for larger version. 

Name:	xnYJXjQ.png 
Views:	89 
Size:	66.6 KB 
ID:	15248

    Plugin failed to load: Failed to open plugin.: 0 (minimum: 21, current: 22)
    However, my plugin versions is at 22 since I just updated it:

    https://github.com/NobleUplift/TeamS...50b5e2e1e94a01
    Last edited by NobleUplift; March 25th, 2017 at 08:16 PM. Reason: Add update

  5. #5
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    The error is a bit misleading. If it shows "0", there could be multiple reasons (excluding your plugin's api version! If that would be the case, it would show your returned api version, which is not "0" I guess). Either a dependency is not met (I'd suggest using dependency walker to look at it) or a required exported symbol is missing.

    Your clientlog is most likely more detailed about the specific error.

  6. #6
    Join Date
    April 2016
    Posts
    18
    This is all I have in my logs pertaining to my plugin:

    Code:
    2017-03-26 09:37:11.944187|INFO    |Plugins       |   |Loading plugin: ts3websitepreview.dll
    2017-03-26 09:37:11.944187|INFO    |Plugins       |   |Failed to load plugin: C:\Users\Patrick\AppData\Roaming\TS3Client\plugins\ts3websitepreview.dll
    2017-03-26 09:37:11.944187|INFO    |Plugins       |   |LoadLibrary error: 193
    LoadLibrary Error 193 would mean that I'm trying to load a 64-bit DLL in my 32-bit TeamSpeak or vice versa. I've been testing with 32-bit TeamSpeak this whole time. I booted up 64-bit TeamSpeak and ts3websitepreview doesn't show up at all. I also made sure my file was named "ts3websitepreview_win32.dll" with the ${Target} macro so that it wouldn't be seen by the 64-bit TeamSpeak and I know that the DLL isn't 64-bit.

    According to cygwin:

    Code:
    $ cd plugins
    $ file *
    clientquery_plugin:                 directory
    clientquery_plugin_win32.dll:       PE32 executable (DLL) (GUI) Intel 80386, for                                      MS Windows
    gamepad_joystick:                   directory
    gamepad_joystick_win64.dll:         PE32+ executable (DLL) (GUI) x86-64, for MS                                      Windows
    lua_plugin:                         directory
    teamspeak_control_plugin_win32.dll: PE32 executable (DLL) (GUI) Intel 80386, for                                      MS Windows
    teamspeak_control_plugin_win64.dll: PE32+ executable (DLL) (GUI) x86-64, for MS                                      Windows
    ts3websitepreview:                  directory
    ts3websitepreview_win32.dll:        PE32 executable (DLL) (GUI) Intel 80386, for                                      MS Windows
    $ cd ts3websitepreview
    $ file *
    iconv.dll:   PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
    libcurl.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
    libxml2.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
    zlib1.dll:   PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
    All of my DLLs are 32-bit. Can the LoadLibrary Error 193 mean anything else?

  7. #7
    Join Date
    April 2016
    Posts
    18
    I'm working on this again this weekend. I have a lot of emotional investment in this plugin and I just want to get it done already.

  8. #8
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    According to this it does not necessarily mean that you linked some 32bit object into a 64bit lib (or vice versa), but the linkage is somehow broken.

    Have you looked into it with Dependency Walker (or any other DLL dependency tool for windows)?

    This might be related to some statically linked dependency, so any other linked frameworks like boost, ...?

  9. #9
    Join Date
    April 2016
    Posts
    18
    Hi Thomas, you can see screenshots of Dependency Walker on my Stack Overflow link:

    https://stackoverflow.com/questions/...ib1-on-windows

    I'm not using Boost. The only libraries I'm using are libxml2 and cURL (with linkage to the same OpenSSL version that TeamSpeak uses). My plugin is imperative to combating the rise of Discord in my community so I need to get it finished ASAP.

  10. #10
    Join Date
    August 2013
    Location
    Germany
    Posts
    541
    From looking at your github repo, aren't you doing what https://github.com/Luch00/LxBTSC has already done?

  11. #11
    Join Date
    April 2016
    Posts
    18
    Quote Originally Posted by Bluscream View Post
    From looking at your github repo, aren't you doing what https://github.com/Luch00/LxBTSC has already done?
    Similar, but not the same. It doesn't look like it previews every URL, nor does it make use of the Open Graph protocol.

    Even if someone codes a plugin that is a complete duplicate of mine, it would still be a matter of personal honor to finish this plugin. I've had this unfinished project looming over my head since 2011 December 22nd. When seen in conjunction with all of the other projects that I've failed to bring into fruition, it's debilitating to my psyche.

  12. #12
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    Your GitHub repo is missing headers included by iconv.

    Is there a reason you're doing plain old C instead of C++?

  13. #13
    Join Date
    April 2016
    Posts
    18
    I'll include all my headers in the next push so that it's obvious what versions and APIs I'm using.

    All of the tutorials I found were in pure C and not C++ for I think libxml2... or cURL. It's been so long I can't remember at this point. I'll probably have to look into upgrading all my repos for a future build.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Teamspeak crash .. .debug file message below.
    By Hangrid in forum Off Topic
    Replies: 1
    Last Post: June 18th, 2014, 08:17 AM
  2. Xfire causing TS3 to crash
    By tolleya12 in forum Windows
    Replies: 3
    Last Post: May 2nd, 2012, 03:58 PM
  3. Teamspeak Causing Game Crash
    By Bosco in forum Windows
    Replies: 11
    Last Post: October 7th, 2011, 04:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •