Page 1 of 2

"FiveWin/3 Cannot create Dialog Box" errors?

Posted: Fri Jan 20, 2012 4:18 pm
by Taavi
Hello,
we randomly get this "Cannot create Dialog Box" error report from different clients. Of course dialogs work as expected in test environment....

We do not use Borland controls, resources are in rc files and compiled with PellesC.
In 32-bit environment LOADONCALL , PRELOAD, MOVEABLE,DISCARDABLE atributes are ignored, right? What else can cause this error?

We do use symbolic names (i.e. not numbers) for dialog ID. Can this be a problem?

Using Xharbour builder and Fwh32.

Any ideas?
Taavi.

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Fri Jan 20, 2012 4:24 pm
by PeterHarmes
Havent had this error for a while, but I always found renaming the dialog name seems to sort the problem.

Not an explanation to why it's happening but hopefully a short term workaround

Regards,

Pete

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Fri Jan 20, 2012 5:18 pm
by Rick Lipkin
Taavi

Question ... are you using a .dll to store your forms in or compiling them into the executable ?

Rick Lipkin

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sat Jan 21, 2012 7:00 pm
by reinaldocrespo
Rick;

Does it happen with one particular dialog? Is it a richtext?


Reinaldo.

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 2:08 pm
by Taavi
I have also seen this problem with new dialogs when renaming dialog helps /There is some resource ID generation issue when using alpha dialog names as far as I can remember/. This is not the case this time: dialogs work ok in test environment but sometimes ( it seems to me related to network traffic or windows workload from other processes) this error arises.

Taavi
PeterHarmes wrote:Havent had this error for a while, but I always found renaming the dialog name seems to sort the problem.

Not an explanation to why it's happening but hopefully a short term workaround

Regards,

Pete

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 2:09 pm
by Taavi
Compiling into exe with xharbour builder. Resources are in rc files created by Pellesc.

Taavi.
Rick Lipkin wrote:Taavi

Question ... are you using a .dll to store your forms in or compiling them into the executable ?

Rick Lipkin

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 2:14 pm
by Taavi
Error seems random, not related to particular dialog. That's why it's not so easy to trace.
No richtext.

Taavi.

reinaldocrespo wrote:Rick;

Does it happen with one particular dialog? Is it a richtext?


Reinaldo.

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 2:54 pm
by codemaker
I remember having this problem long tima ago (year 2004)
The program keeps crashing with this error.

Then I went into RC file and renamed all dialogs which has longer names to use shorter names (not more than 10 characters)
Then deleted \obj32 folder completely and the .RWS file and all .MAP files.
Then I built the complete project from scratch

From then on I haven't had any error of this kind

BTW:
You wrote that the dialogs which crashes are random?
Is there any chance they all have some new class introduced instead old? For example if you used "TWbrowse" in dialog and later changed it to "Xbrowse" in dialog? Or you made some changes in some class which is used in dialog (changing something or added something to TWbrowse class or TGet or any other class which is represented in dialogs which crashes)

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 3:51 pm
by Bayron
Taavi wrote: We do use symbolic names (i.e. not numbers) for dialog ID. Can this be a problem?
What kind of names???
how long are them???
do yo use underscores???
any special characters???

There are 1 thousand questions that can be ask'd, can you at least:

Show a RC code that had the problem at least once...
what kind of images do you use??? if any...
what controls where involved in the dialogs that had the problem???
what version of FWH are you using???
the .exe is local or in network???
do you call any functions ON INIT???

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 5:57 pm
by Rick Lipkin
Taavi

I use .rc as well and have a batch file that I use to compile my forms to .res and then link into .exe .. Since all .rc files are just "text" .. I have a line in my batch file that copies them all together then I compile the single .rc to .res .. What I find is I ( sometimes ) I mistakenly name two forms the same name or similar up to 8 char ..

Try this and see what happens .. Copy *.rc MyForms.rc .. then compile the monolithic MyForms.rc and see if you get an error or naming conflict ??

I have found some strange problems like you are describing show up especially if you have a lot of forms.

Rick Lipkin

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Sun Jan 22, 2012 10:42 pm
by ukservice
Hello,

I also get this error reported sometimes from customers with later FWH builds.

There is a new leak?.

Thanks.

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Tue Jan 24, 2012 2:57 am
by hag
I also get this error message. Using borland resource editor and link rc's to exe. A big pain.

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Tue Jan 24, 2012 10:06 am
by Taavi
Bayron wrote: What kind of names???
how long are them???
Some samples for dialog names:


STATISIK
LISATASU
KLIENDISAAJAD
TOIMPARING
KAUBAD1
Bayron wrote: do yo use underscores???
No,
Bayron wrote: any special characters???
Not in dialog names. In static text, yes.
Bayron wrote: Show a RC code that had the problem at least once...


LISATASU DIALOG DISCARDABLE 22, 21, 343, 148
STYLE WS_CHILD|DS_3DLOOK
FONT 10, "Arial"
{
CONTROL "Arvestusse", -1, "Static", WS_GROUP, 1, 2, 40, 9
CONTROL "", 1001, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 2, 40, 9
CONTROL "palgaleht", -1, "Static", WS_GROUP, 93, 2, 35, 9
CONTROL "", 1003, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 130, 2, 45, 9
CONTROL "Väljamaks", 2105, "Static", SS_RIGHT|WS_GROUP, 186, 3, 40, 9
CONTROL "&Töötaja ", -1, "Static", WS_GROUP, 5, 12, 35, 9
CONTROL "", 1002, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 12, 60, 9
CONTROL "T&abeli nr. ", -1, "Static", WS_GROUP, 4, 22, 32, 9
CONTROL "", 1004, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 22, 60, 9
CONTROL "", 1005, "Static", WS_GROUP, 110, 22, 165, 9
CONTROL "Ta&suliik ", -1, "Static", WS_GROUP, 5, 42, 30, 9
CONTROL "", 1006, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 42, 45, 9
CONTROL "", 1007, "Static", WS_GROUP, 95, 42, 180, 9
CONTROL "Summa ", -1, "Static", WS_GROUP, 5, 52, 30, 9
CONTROL "", 1008, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 52, 45, 9
CONTROL "Protsent ", -1, "Static", WS_GROUP, 95, 52, 30, 9
CONTROL "", 1009, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 130, 52, 40, 9
CONTROL "Aeg või hulk ", -1, "Static", WS_GROUP, 180, 52, 42, 9
CONTROL "", 1010, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 230, 52, 40, 9
CONTROL "Konto ", -1, "Static", WS_GROUP, 5, 62, 25, 9
CONTROL "", 1011, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 62, 45, 9
CONTROL "Allikas", 10001, "Static", WS_GROUP, 95, 62, 25, 9
CONTROL "", 1017, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 130, 62, 40, 9
CONTROL "Ametikoht", 1019, "Static", WS_GROUP, 180, 62, 40, 9
CONTROL "", 1020, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 230, 62, 40, 9
CONTROL "Algus ", -1, "Static", WS_GROUP, 5, 72, 25, 9
CONTROL "", 1012, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 72, 45, 9
CONTROL "lõpp ", -1, "Static", WS_GROUP, 95, 72, 20, 9
CONTROL "", 1013, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 130, 72, 40, 9
CONTROL "", 1022, "Static", WS_GROUP, 176, 72, 160, 9
CONTROL "Esmase haiguslehe algus", 2029, "Static", SS_RIGHT|WS_GROUP, 5, 82, 120, 9
CONTROL "", 1029, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 130, 82, 40, 9
CONTROL "", 4002, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 292, 82, 32, 9
CONTROL "Allüksus ", -1, "Static", WS_GROUP, 5, 102, 30, 9
CONTROL "", 1014, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 102, 45, 9
CONTROL "", 1015, "Static", WS_GROUP, 95, 102, 225, 9
CONTROL "Analüütika ", -1, "Static", WS_GROUP, 5, 112, 35, 9
CONTROL "", 1016, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 112, 280, 9
CONTROL "Projekt", -1, "Static", WS_GROUP, 5, 122, 35, 9
CONTROL "", 1021, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 122, 50, 9
CONTROL "Märkused", -1, "Static", WS_GROUP, 5, 132, 35, 9
CONTROL "", 1018, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 45, 132, 280, 9
CONTROL "", 105, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_TABSTOP, 228, 1, 105, 50
CONTROL "Omavastutuspäevade vähendus", 4001, "Static", SS_RIGHT|WS_GROUP, 176, 82, 108, 9
}

Bayron wrote: what kind of images do you use??? if any...
No images

what controls where involved in the dialogs that had the problem???

Bayron wrote: what version of FWH are you using???
October 2010
Bayron wrote: the .exe is local or in network???
Mostly in network.
Bayron wrote: do you call any functions ON INIT???
Yes. Because of dynamic content on some dialog elements I call procedure, which calls ::resresh() for all controls in this dialog.

Taavi.

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Tue Jan 24, 2012 10:46 am
by Antonio Linares
Taavi,

Please modify Class TDialog this way:

Code: Select all

   ...

   if ::nResult == 65535
       MsgInfo( GetErrMsg() )   // new !
       CreateDlgError( Self )
   endif

   ...
 
so we can check what error is Windows reporting under those circunstances, thanks

Re: "FiveWin/3 Cannot create Dialog Box" errors?

Posted: Tue Jan 24, 2012 11:42 am
by Taavi
Ok,
I'll continue this subject when I have error report with Windows error message.

Thanks,
Taavi.

Antonio Linares wrote:Taavi,

Please modify Class TDialog this way:

Code: Select all

   ...

   if ::nResult == 65535
       MsgInfo( GetErrMsg() )   // new !
       CreateDlgError( Self )
   endif

   ...
 
so we can check what error is Windows reporting under those circunstances, thanks