Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Exception in ~QArrayDataPointer()

Exception in ~QArrayDataPointer()

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 581 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Francky033
    wrote on last edited by Francky033
    #1

    I have a rather strange result when I start an application written with Qt 6.8.1 from Visual Studio 2022 17.12 with Qt VS tools v. 3.3.1

    I get the exception :

    HEAP[app.exe]: Invalid address specified to RtlValidateHeap( 0000011561330000, 0000011564BEC7F0 )
    A breakpoint instruction (__debugbreak() instruction or similar call) has been executed in app.exe.

    which concerns the function

    ~QArrayDataPointer()
    {
        if (!deref()) {
            (*this)->destroyAll();
            free(d);
        }
    }
    

    in qarraydatapointer.h

    The exception appears when exiting :

    qint64 QWinStars3View::DeleteFilesDsRepertoire(const QString& Repertoire,
    	const QString& Files)
    {
    
    	QDir D(Repertoire);
    
    	QFileInfoList list = D.entryInfoList(QDir::Files);
    
    	qint64 size = 0;
    
    	foreach(QFileInfo finfo, list)
    	{
    		QString name = finfo.fileName();
    
    		if (name.contains(Files))
    		{
    			if (!QFile::remove(Directory + “/” + name))
    			{
    				MessageLog(QString(“Impossible to delete the %1 file”)
    					.arg(Repertoire + “/” + name));
    			}
    			else
    			{
    				size += finfo.size();
    			}
    		}
    	}
    
    	list.clear();
    
    	return size;
    }
    

    and seems to concern the QFileInfoList object ...
    This doesn't happen when I start the application from Qt creator.
    And it's completely new. I haven't had an exception in this function for years.

    The only thing that has changed is the updating of Visual Studio and Qt VS tools.

    Does anyone have any idea what's going on?

    Thanks a lot!

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Francky033
      wrote on last edited by Francky033
      #3

      Super Christian !

      Capture d'écran 2024-12-03 151621.png

      This may be a small flaw in Qt VS tools, but you need to change the “use debug libraries” parameter to “Yes” for it to work properly!”

      Thanks Christian!

      1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by Christian Ehrlicher
        #2

        Don't mix debug and release libraries.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Francky033
          wrote on last edited by Francky033
          #3

          Super Christian !

          Capture d'écran 2024-12-03 151621.png

          This may be a small flaw in Qt VS tools, but you need to change the “use debug libraries” parameter to “Yes” for it to work properly!”

          Thanks Christian!

          1 Reply Last reply
          0
          • F Francky033 has marked this topic as solved on

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved