"ToOutDebug" and friends are not allowed to be used in 
any of our contribs. Ever. Yet they are unfortunately.
There is a large inconsistent mess when it comes to debug 
calls in hbqt/hbxbp.

At the same time I've added this in hbxbp on .prg level:
---
#if defined( __HB_OUTDEBUG__ )                                                  
                                                                                
                                         
   #if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ )          
                                                                                
                                         
      #xtranslate HB_OUTDEBUG( [<x>] ) => wapi_OutputDebugString( <x> )         
                                                                                
                                        
   #else                                                                        
                                                                                
                                         
      #xtranslate HB_OUTDEBUG( [<x>] ) => hb_TraceString( <x> )                 
                                                                                
                                        
   #endif                                                                       
                                                                                
                                        
#else                                                                           
                                                                                
                                        
   #xtranslate HB_OUTDEBUG( [<x>] ) => iif( .T.,, )                             
                                                                                
                                        
#endif                                                                          
                                                                                
                                         
---

And we have HB_TRACE() on .c level since 10 years.

This should be used, not Windows-only xhb functions, which 
just generate unnecessary noise on this list.

Brgds,
Viktor

On 2009 Nov 12, at 23:54, Bisz István wrote:

> Hi,
>  
> Please find attached the HBQT and HBXBP components modified to eliminate the 
> crashes already reported on this list.
> ·        The main modification is in the HB GC and QT interface, eliminating 
> the crashes caused by the double object deletes. The modification is 
> implemented in the hbqtgen.prg, QAbstractItemModel.qth, hbqt.h and 
> hbqt_destruct.cpp.
> The hbqt interface should be regenerated with the modified components.
>  
> ·        In demoqt.prg the hb_toOutDebug is eliminated on Fedora12 generates 
> crashes. Maybe a new tracing method is necessary to be compatible with all 
> platforms.
> ·        In demoqt.prg:
>       oDlg := QWebView():new()
>       oUrl := QUrl():new()
>       oUrl:setUrl( "http://www.harbour.vouch.info"; )
>       QT_QWebView_SetUrl( QT_PTROF( oDlg ), QT_PTROF( oUrl ) )
>       oDlg:setWindowTitle( "Harbour-QT Web Page Navigator" )
> /* BI TODO:
>       oDlg:exec()
> */
> sequence is wrong, as the QWebView object has no exec method. This part 
> should be redesigned.
>  
> ·        In QAbstractItemModel.qth:
>  
> HB_FUNC( QT_HBDBFMODEL_DESTROY )
> {
> // BI:TODO fix the GPF  hbqt_par_HbDbfModel( 1 )->~HbDbfModel();
> }
>  
> the hbqt_par_HbDbfModel( 1 )->~HbDbfModel(); generates crashes on 
> Windows(Vista) and linux (Fedora12, CentOS5.4). An analysis is necessary to 
> eliminate the bug. Is not related to the Qt interface, as I see.
>  
> ·        In xbpgeneric.prg:
>  
> FUNCTION Xbp_Debug( ... )
>    LOCAL s  := ""
>    LOCAL aP := hb_aParams()
>  
>    aeval( aP, {|e| s += Xbp_XtoS( e ) + ' ' } )
> /* BI TODO:
>    hb_ToOutDebug( s )
> */
>    RETURN nil
>  
> the   hb_ToOutDebug( s ) is eliminated, see above.
>  
> ·        In xbpgeneric.prg:
>  
> EXIT PROCEDURE Qt_End()
>  
>    Qt_MutexDestroy()
>  
>    oDummy        := NIL
>    oAppWindow    := NIL
>  
>    IF oDeskTop == NIL
>    // BI TODO: Error BASE/1004  Message not found: QAPPLICATION:OWIDGET
>       oDeskTop:oWidget:pPtr := 0
>    ENDIF
>  
>    oApp:quit()
>    // BI TODO: Error BASE/1004  Message not found: QAPPLICATION:OWIDGET
>    // oApp:oWidget:pPtr := 0
>  
>    RETURN
>                the above sequence should be redesigned to eliminate the 
> crashes on Linux.
>  
> With the attached modification, demoqt and demoxbp where verified with 
> valgrind. The erroneous memory handlings are eliminated. Further tests and 
> analysis are necessary.
>  
> Best regards,
> István Bisz
>  
> <contrib.zip>_______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to