FiveWin/3 Cannot create Dialog Box on slow network.

FiveWin/3 Cannot create Dialog Box on slow network.

Postby Taavi » Tue Feb 05, 2013 3:01 pm

Hello,
our application reports "FiveWin/3 Cannot create Dialog Box" error on some sites when creating common dialogs (no Borland resources involved).

After some investigation I found an idea that problem can be caused by slow network speed when loading resources linked into exe.
Can we somehow force OS to load all (or some specific?) resources in executable on startup so netwok failures will not initiate errors on dialog load?

Taavi.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Antonio Linares » Tue Feb 05, 2013 5:26 pm

Taavi,

In each DIALOG declaration in the RC file please add the clause PRELOAD

In example:
test DIALOG PRELOAD 22, 74, 174, 97

Lets see if that makes a difference, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Rick Lipkin » Tue Feb 05, 2013 7:27 pm

Taavi

Where are your resources loaded via a .dll? You mentioned 'linked' into the executable ? If that is the case .. I have never had a problem with my resources not being resolved when they are part of ( burned into ) the monolithic executable... if you are trying to resolve your forms via a .dll .. Yes, I could see a slow network causing your resources not to load as fast as they need to.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby lucasdebeltran » Tue Feb 05, 2013 7:52 pm

Hello,

With latest versions > FW 11.11 I have reported this error some times by some customers.

Unfortunately, I was not able to trace it.

Some customers have reported it too, but it happens from time to time.

Maybe something is not releasing properlly in FWH internals, I don´t know.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Antonio Linares » Tue Feb 05, 2013 9:16 pm

Lucas,

FWH/source/winapi/dlogbox.c manages all Windows API functions to create dialog boxes.

So there is nothing internal about them :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby lucasdebeltran » Wed Feb 06, 2013 10:49 am

Thank you Antonio for the reply.

This behaviour is very difficult to trace.

In fact, with other software sometimes I have detected ramdom wrong paiting of dialogs. In that case they do not produce Fivewin/3 error, but the program either crashes or shows wrongly.

Maybe is a Windows issue?. Some interference with other software?.

Also, maybe in dialog.prg you could modify to repeat the operation an extra attempt before calling to CreateDlgError() function?. And add a sysrefresh() before the retry?.

Thanks!!
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Antonio Linares » Wed Feb 06, 2013 3:58 pm

Lucas,

We don't have a slow network here to test with it, so I would appreciate if those that are experiencing this problem on a slow network, could confirm if the suggested enhancements from Lucas make a difference, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby lucasdebeltran » Wed Feb 06, 2013 7:23 pm

Antonio,

I was refering in general to this procedure. I was reported the error in local mode (in my systems, when an error.log is generated, it is sent to me so I can monitor errors).

Also, other users reported too, but it happens from time to time.

So that´s why I suggested the idea to introduce a sysrefresh() and an extra retry of the operation before calling the error.

Thanks.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Taavi » Thu Feb 07, 2013 7:46 am

Hi Antonio,
can PRELOAD have effect on resources behaviour in 32-bit EXE?

MSDN says it's for 16-bit exes only.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

I also have "DISCARDABLE" clause in most of declarations from 16-bit history, can it have influence when linking with XHARBOUR?

Taavi


Antonio Linares wrote:Taavi,

In each DIALOG declaration in the RC file please add the clause PRELOAD

In example:
test DIALOG PRELOAD 22, 74, 174, 97

Lets see if that makes a difference, thanks :-)
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby fgondi » Thu Feb 07, 2013 10:26 am

Antonio Linares wrote:Taavi,

In each DIALOG declaration in the RC file please add the clause PRELOAD

In example:
test DIALOG PRELOAD 22, 74, 174, 97

Lets see if that makes a difference, thanks :-)


Lo acabo de incluir en todas los dialogs de mi sistema. De momento no me ha perjudicado en nada.
Si vuelve a aparecer "FiveWin/3 Cannot create Dialog Box" lo comento
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Antonio Linares » Thu Feb 07, 2013 10:43 am

Taavi,

I would remove DISCARDABLE and use PRELOAD.

Theoretically is just for Windows 16 but the RC compiler does not complain about it, so lets try it.

Lucas proposal seems interesting also. A second try to create the dialog.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby fgondi » Thu Feb 07, 2013 11:15 am

Ahora define los diálogos así:
Code: Select all  Expand view
DIALOGEX PRELOAD 22, 74, 174, 97


Ademas he modificado la clase dialog para realizar 2 intentos en la clase

Code: Select all  Expand view
    for i := 1 to 2  //fgondi
       ::nResult = if( ! Empty( ::cResName ),;
                      DialogBox( ::hResources, ::cResName,;
                                 hActiveWnd, Self ),;
                      DialogBoxIndirect( GetInstance(),;
                                         If( ! Empty( ::cResData ), ::cResData, ::cToChar( hActiveWnd ) ),;
                                         hActiveWnd, Self ) )

       if ::nResult<> 65535  //fgondi
         exit
       endif
     next
     if ::nResult == 65535
       CreateDlgError( Self )
    endif
 


Code: Select all  Expand view
        for i := 1 to 2  //fgondi
           if ! Empty( ::cResName )
              ::hWnd = CreateDlg( ::hResources, ::cResName, hActiveWnd )
           else  
              ::hWnd = CreateDlgIndirect( GetInstance(), ::cToChar( hActiveWnd ),;
                                          hActiveWnd )
           endif
           if ::hWnd <> 0  //fgondi
             exit
           endif
         next
         if ::hWnd == 0
            CreateDlgError( Self )
         else
            ShowWindow( ::hWnd, SW_HIDE )  
         endif
 
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby Antonio Linares » Thu Feb 07, 2013 12:35 pm

Fernando,

Gracias! :-)

Lo has probado ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby fgondi » Thu Feb 07, 2013 4:33 pm

Antonio,

Lo estoy probando. De momento funcionando todo de forma correcta. sin el error "Cannot create dialog Box".
Aunque como es esporádico hay que esperar.
Por cierto, este error ha aparecido incluso en redes rápidas.

También lo estoy probando para un problema que tengo con algunos Windows 7.
En ellos algunas veces al dibujar las ventanas mdi con diálogos incrustados, y de forma esporádica, se quedan bloqueadas durante unos cuantos segundos y luego continua como si nada.
Pero que bloquea incluso todo el sistema operativo, si intentas cambiar a otra aplicación, esta no se ve, aparece toda ella de color negro.
Pasados esos segundo todo vuelve a la normalidad y quizás no vuelve a pasar durante el día o si.

No es un tema de recursos porque ha pasado a primera hora del día y durante todo el día no ha vuelto a pasar, sin que hayan salido de la aplicación.

Estoy investigando en los efectos visuales de windows, por si viene de hay.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: FiveWin/3 Cannot create Dialog Box on slow network.

Postby fgondi » Fri Feb 08, 2013 10:47 am

De momento, no ha vuelto a aparecer el error, y todo esta funcionando normalmente.

Si en todo el día de hoy no aparece en ninguno de los 2 clientes en los que lo he incluido (que son los 2 en los que mas a menudo aparecía el error), el lunes lo incluyo en todos los clientes.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 109 guests