On Sun, 08 Nov 2009, Pritpal Bedi wrote:

Hi,

> Revision: 12831 fixes it. Thank you.

Thank you for information about the problem and confirmation that
it was resolved.
BTW it was also very good example which shows how important is
built in protection against wrongly released GC blocks. Without
it such bugs can exists for years causing random crashes.

BTW I've just tested demoqt using valgrind and below is an error
which invalid memory access which may be source of GPF traps reported
by some users here. Looks that inside release_QWidget there is nothing
to protect against multiple releasing of QWidges.
Maybe it's time to switch to the code with dynamically registered
casting functions I sent few weeks ago?
It should resolve this problem and also some others like common for
all widgets destructor function which forces to link all QT components.
It will be also good starting point for deeper modifications.
BTW using valgrind you can create very precise list of allocated and
never freed memory blocks. If you want then I can send such log here.

best regards,
Przemek


==14350== Invalid read of size 8
==14350==    at 0x4A2C4B: release_QWidget(void*) (in 
/home/druzus/CVS/harbour/harbour/contrib/hbqt/tests/demoqt)
==14350==    by 0x75D5C04: hb_gcRefFree (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x7602587: hb_arrayGarbageRelease (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75D5C04: hb_gcRefFree (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x7602587: hb_arrayGarbageRelease (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75D5C04: hb_gcRefFree (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x7602587: hb_arrayGarbageRelease (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75D5C04: hb_gcRefFree (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75E2FA2: hb_stackOldFrame (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x7603A4D: hb_vmProc (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x7606A32: main (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==  Address 0xc1c0f20 is 0 bytes inside a block of size 40 free'd
==14350==    at 0x4C23DD8: free (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==14350==    by 0x544795F: QWidget::~QWidget() (in /usr/lib64/libQtGui.so.4.5.3)
==14350==    by 0x4F7B03B: QObjectPrivate::deleteChildren() (in 
/usr/lib64/libQtCore.so.4.5.3)
==14350==    by 0x5447CC2: QWidget::~QWidget() (in /usr/lib64/libQtGui.so.4.5.3)
==14350==    by 0x57EE8C0: QStackedWidget::~QStackedWidget() (in 
/usr/lib64/libQtGui.so.4.5.3)
==14350==    by 0x4F7B03B: QObjectPrivate::deleteChildren() (in 
/usr/lib64/libQtCore.so.4.5.3)
==14350==    by 0x5447CC2: QWidget::~QWidget() (in /usr/lib64/libQtGui.so.4.5.3)
==14350==    by 0x499F40: release_QTabWidget(void*) (in 
/home/druzus/CVS/harbour/harbour/contrib/hbqt/tests/demoqt)
==14350==    by 0x75D5C04: hb_gcRefFree (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75E4A27: hb_itemCopy (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75E529C: hb_arraySet (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75ED0D2: HB_FUN_msgSetData (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75E273A: hb_vmSend (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75E0399: hb_vmExecute (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x7603A26: hb_vmProc (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
==14350==    by 0x75DFFB1: hb_vmExecute (in 
/home/druzus/CVS/harbour/out.gcc/lib/libharbour-2.0.0.so)
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to