Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30009

returning QVariantList as QVariant crashes application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.0.1

    Description

      The following simple code has been crashed (the possible cause is double memory destroying):

      #include <QVariant>
      
      QVariant foo() {
          QVariantList l1;
          l1 << QVariant(QString("Hello"));
          return l1;
      }
      
      int main(int argc, char *argv[])
      {
          foo();
          return 0;
      }
      

      Here is stack trace:

      0	RtlpBreakPointHeap	ntdll		0x77a85654	
      1	RtlpValidateHeapEntry	ntdll		0x77a51a77	
      2	RtlValidateHeap	ntdll		0x779e5926	
      3	HeapValidate	KERNELBASE		0x75e15dcf	
      4	_CrtIsValidHeapPointer	MSVCR100D		0x62378580	
      5	_free_dbg_nolock	MSVCR100D		0x623776ba	
      6	_free_dbg	MSVCR100D		0x62377560	
      7	operator delete	MSVCR100D		0x62376629	
      8	QVariant::`scalar deleting destructor'	Qt5Cored		0x5eef0020	
      9	QList<QVariant>::node_destruct	qlist.h	421	0x5eef5ef1	
      10	QList<QVariant>::dealloc	qlist.h	765	0x5eef18eb	
      11	QList<QVariant>::~QList<QVariant>	qlist.h	740	0x5eeed456	
      12	QList<QVariant>::`scalar deleting destructor'	Qt5Cored		0x5efcdf7f	
      13	v_clear<QList<QVariant> >	qvariant_p.h	162	0x5f01a8cd	
      14	QVariantDestructor<`anonymous namespace'::CoreTypesFilter>::FilteredDestructor<QList<QVariant>,1>::FilteredDestructor<QList<QVariant>,1>	qvariant_p.h	431	0x5f010022	
      15	QVariantDestructor<`anonymous namespace'::CoreTypesFilter>::delegate<QList<QVariant> >	qvariant_p.h	458	0x5f00a9f7	
      16	QMetaTypeSwitcher::switcher<void,QVariantDestructor<`anonymous namespace'::CoreTypesFilter> >	qmetatypeswitcher_p.h	76	0x5f00210f	
      17	`anonymous namespace'::clear	qvariant.cpp	122	0x5effac1e	
      18	QVariant::~QVariant	qvariant.cpp	1116	0x5effd248	
      19	main	main.cpp	13	0x1447db	
      20	WinMain	qtmain_win.cpp	131	0x143c6a	
      21	__tmainCRTStartup	crtexe.c	578	0x143148	
      22	WinMainCRTStartup	crtexe.c	403	0x142eaf	
      23	BaseThreadInitThunk	kernel32		0x75f6ed6c	
      24	__RtlUserThreadStart	ntdll		0x77a2377b	
      25	_RtlUserThreadStart	ntdll		0x77a2374e	
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            biochimia João Abecasis
            anatolys Anatoly Shirokov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes