<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body style="background-color: rgb(255, 255, 255); color: rgb(0, 0,
    0); font-family: Verdana; font-size: 13px;" bgcolor="#FFFFFF"
    text="#000000">
    <div class="QCMcontainer"
      style="font-family:Verdana;font-size:13px;">
      <p><font face="Verdana">If the stack shown by VS2015 is that
          limited, you should probably start by looking at the stack in
          Process Explorer. For an even better view of what code is
          running, you could enable Microsoft's debugging symbols.
          Chances are that it will show the name of the function in
          ntdll.dll that is crashing.<br>
          <br>
          To get debugging symbols, install the Debugging Tools for
          Windows (part of the Windows SDK). Then point Process Explorer
          to the Tools' dbghelp.dll file and configure the symbol lookup
          path. More info about that can be found on the web.<br>
          <br>
          I can't offer any specific help on the debug listener, but
          I've had good results with Process Explorer when the stack
          shown by the IDE was unhelpful.</font></p>
      <p><font face="Verdana">Kind regards,</font></p>
      <p>Tim De Baets<br>
      </p>
      <div class="moz-cite-prefix">Festus Hagen wrote:<br>
      </div>
      <blockquote style="font-size: medium;"
        cite="mid:1832257435.6362342.1483451233066@mail.yahoo.com"
        type="cite">
        <pre wrap="">Hi all,

Didn't want to submit a PR, Not sure if this is my issue, a VS issue or a TagLib issue, unable to find much on it.


Win7, VS2015 with CLR, TagLib2.

Having issues with either the Default or MyListener Debug listener when using C++ Windows Forms (CLR).
Win32Console or Win32Projects with CLR do not fail.


The error:
Exception thrown at 0x77725932 (ntdll.dll) in WinFormTagLibManagedTest.exe: 0xC0000005: Access violation reading location 0x0E463E87.


Stack shows only this:
</pre>
        <blockquote type="cite">
          <pre wrap=""> CppWinFormTagLibManaged.exe!`anonymous namespace'::`dynamic initializer for 'defaultListener''() Line 63        C++
</pre>
        </blockquote>
        <pre wrap="">Tried replacing with MyListener:
#ifndef MYLISTENER_H

#define MYLISTENER_H

#include "tdebuglistener.h"
#include "tstring.h"
#include <Windows.h> // added for VS

class MyListener : public TagLib::DebugListener {
public:
virtual void printMessage(const TagLib::String &msg) {
//std::cerr << "MyListener: " << msg << std::endl; // Original
::OutputDebugStringW(msg.toCWString()); // added for VS
}
};

DebugListener listener;

#endif // MYLISTENER_H


Wright or wrong, not sure, it works with Qt and MinGW, fails in the same place with the following error in VS2015:

</pre>
        <blockquote type="cite">
          <pre wrap="">c:\users\tcg\documents\visual studio 2015\projects\cppwinformtaglibmanaged\cppwinformtaglibmanaged\MyListener.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
</pre>
        </blockquote>
        <pre wrap="">1>c:\users\tcg\documents\visual studio 2015\projects\cppwinformtaglibmanaged\cppwinformtaglibmanaged\MyListener.h(20): error C2146: syntax error: missing ';' before identifier 'listener'
1>  MyListener.cpp
1>c:\users\tcg\documents\visual studio 2015\projects\cppwinformtaglibmanaged\cppwinformtaglibmanaged\MyListener.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\tcg\documents\visual studio 2015\projects\cppwinformtaglibmanaged\cppwinformtaglibmanaged\MyListener.h(20): error C2146: syntax error: missing ';' before identifier 'listener'


Any assistance, tip, pointers, ... welcome.


Thanks
-Enjoy
fh : )_~
</pre>
      </blockquote>
      <br>
    </div>
  </body>
</html>