Page 1 of 1

program hangs using TDataModule

Posted: 29.10.2012, 17:30
by hstijnen
Hi,

Is there anybody using CBuilder XE with ZEOS compo's in a TDataModule?
On the moment I'm using such a datamodule, my program hangs when I start it.

When I do the following:
1. create new VCL application with default unit
2. add TDataModule
(run program: OK)
3. add ZEOS Connection to DataModule

Now run program ---> hangs

What can be on hand?

Thanks for help.
Regards, Henk

Posted: 29.10.2012, 19:52
by EgonHugeist
hstijnen,

Did you get an Exception?

Be sure the TDataModule was created BEFORE you create the Formular which contains TZConnection-Linked components.

I've tested it and it works except the creation order is wrong...

Posted: 29.10.2012, 20:54
by miab3
EgonHugeist,

A simple application is built, compiled and running in C++ 2007.
I get an error as attached after compiling and running it in the C++32 XE2 (at the start).
In the [s]runtime[/s] designtime is well.
R1941.

Michal

Posted: 29.10.2012, 22:00
by EgonHugeist
miab3,

wow zplainasa7..9 doesnt't exist any more! I've renamed this units to ZPlainASAConstants. Sure there are no deprecated files linked?

Posted: 30.10.2012, 08:19
by miab3
EgonHugeist,

It's okay.
I missed the path to the *. bpi.

Michal

Posted: 30.10.2012, 09:12
by hstijnen
I didn't create any line of code. My whole program consists only of two units, and one ZEOS connection compo, just created, without any modification. Here is the code:

Code: Select all

WINAPI _tWinMain%u28HINSTANCE, HINSTANCE, LPTSTR, int%u29
%u7b
	try
	%u7b
		Application->Initialize%u28%u29;
		Application->MainFormOnTaskBar = true;
		Application->CreateForm%u28__classid%u28TForm3%u29, &Form3%u29;
		Application->CreateForm%u28__classid%u28TDataModule4%u29, &DataModule4%u29;
		Application->Run%u28%u29;
	%u7d
	catch %u28Exception &exception%u29
	%u7b
		Application->ShowException%u28&exception%u29;
	%u7d
	catch %u28...%u29
	%u7b
		try
		%u7b
			throw Exception%u28""%u29;
		%u7d
		catch %u28Exception &exception%u29
		%u7b
			Application->ShowException%u28&exception%u29;
		%u7d
	%u7d
	return 0;
%u7d
When I start program with breakpoint at first try, I don't arrive there, I don't get any exception.
This is the event log:

Code: Select all

Process Start%u3a C%u3a\bcb6apps\MonaVisa\MonaVisa Modulen\Warmtepomp\.\Debug\Win32\testProject3.exe. Base Address%u3a $00400000. Process testProject3.exe %u284292%u29
Module Load%u3a testProject3.exe. Has Debug Info. Base Address%u3a $00400000. Process testProject3.exe %u284292%u29
Module Load%u3a ntdll.dll. No Debug Info. Base Address%u3a $776F0000. Process testProject3.exe %u284292%u29
Module Load%u3a KERNEL32.dll. No Debug Info. Base Address%u3a $76E70000. Process testProject3.exe %u284292%u29
Module Load%u3a KERNELBASE.dll. No Debug Info. Base Address%u3a $758E0000. Process testProject3.exe %u284292%u29
Module Load%u3a rtl150.bpl. No Debug Info. Base Address%u3a $50030000. Process testProject3.exe %u284292%u29
Module Load%u3a OLEAUT32.dll. No Debug Info. Base Address%u3a $77890000. Process testProject3.exe %u284292%u29
Module Load%u3a ole32.dll. No Debug Info. Base Address%u3a $76BD0000. Process testProject3.exe %u284292%u29
Module Load%u3a msvcrt.dll. No Debug Info. Base Address%u3a $77340000. Process testProject3.exe %u284292%u29
Module Load%u3a GDI32.dll. No Debug Info. Base Address%u3a $77530000. Process testProject3.exe %u284292%u29
Module Load%u3a USER32.dll. No Debug Info. Base Address%u3a $77580000. Process testProject3.exe %u284292%u29
Module Load%u3a LPK.dll. No Debug Info. Base Address%u3a $77830000. Process testProject3.exe %u284292%u29
Module Load%u3a USP10.dll. No Debug Info. Base Address%u3a $75C40000. Process testProject3.exe %u284292%u29
Module Load%u3a RPCRT4.dll. No Debug Info. Base Address%u3a $77290000. Process testProject3.exe %u284292%u29
Module Load%u3a ADVAPI32.dll. No Debug Info. Base Address%u3a $77490000. Process testProject3.exe %u284292%u29
Module Load%u3a SECHOST.dll. No Debug Info. Base Address%u3a $77470000. Process testProject3.exe %u284292%u29
Module Load%u3a VERSION.dll. No Debug Info. Base Address%u3a $756E0000. Process testProject3.exe %u284292%u29
Module Load%u3a MPR.dll. No Debug Info. Base Address%u3a $72B00000. Process testProject3.exe %u284292%u29
Module Load%u3a imagehlp.dll. No Debug Info. Base Address%u3a $77860000. Process testProject3.exe %u284292%u29
Module Load%u3a SHFOLDER.dll. No Debug Info. Base Address%u3a $72CF0000. Process testProject3.exe %u284292%u29
Module Load%u3a SHELL32.dll. No Debug Info. Base Address%u3a $75CE0000. Process testProject3.exe %u284292%u29
Module Load%u3a SHLWAPI.dll. No Debug Info. Base Address%u3a $77690000. Process testProject3.exe %u284292%u29
Module Load%u3a WSOCK32.dll. No Debug Info. Base Address%u3a $72910000. Process testProject3.exe %u284292%u29
Module Load%u3a WS2_32.dll. No Debug Info. Base Address%u3a $77650000. Process testProject3.exe %u284292%u29
Module Load%u3a NSI.dll. No Debug Info. Base Address%u3a $77850000. Process testProject3.exe %u284292%u29
Module Load%u3a OLEACC.dll. No Debug Info. Base Address%u3a $73B30000. Process testProject3.exe %u284292%u29
Module Load%u3a vcl150.bpl. No Debug Info. Base Address%u3a $50250000. Process testProject3.exe %u284292%u29
Module Load%u3a MSIMG32.dll. No Debug Info. Base Address%u3a $73A90000. Process testProject3.exe %u284292%u29
Module Load%u3a COMCTL32.dll. No Debug Info. Base Address%u3a $74460000. Process testProject3.exe %u284292%u29
Module Load%u3a WINSPOOL.DRV. No Debug Info. Base Address%u3a $72920000. Process testProject3.exe %u284292%u29
Module Load%u3a COMDLG32.dll. No Debug Info. Base Address%u3a $773F0000. Process testProject3.exe %u284292%u29
Module Load%u3a oledlg.dll. No Debug Info. Base Address%u3a $6BEC0000. Process testProject3.exe %u284292%u29
Module Load%u3a dbrtl150.bpl. No Debug Info. Base Address%u3a $506F0000. Process testProject3.exe %u284292%u29
Module Load%u3a ZComponent.bpl. No Debug Info. Base Address%u3a $001E0000. Process testProject3.exe %u284292%u29
Module Load%u3a designide150.bpl. No Debug Info. Base Address%u3a $21030000. Process testProject3.exe %u284292%u29
Module Load%u3a vclactnband150.bpl. No Debug Info. Base Address%u3a $21750000. Process testProject3.exe %u284292%u29
Module Load%u3a WINMM.dll. No Debug Info. Base Address%u3a $73A50000. Process testProject3.exe %u284292%u29
Module Load%u3a vclx150.bpl. No Debug Info. Base Address%u3a $504B0000. Process testProject3.exe %u284292%u29
Module Load%u3a xmlrtl150.bpl. No Debug Info. Base Address%u3a $50760000. Process testProject3.exe %u284292%u29
Module Load%u3a ZCore.bpl. No Debug Info. Base Address%u3a $00430000. Process testProject3.exe %u284292%u29
Module Load%u3a ZDbc.bpl. No Debug Info. Base Address%u3a $004B0000. Process testProject3.exe %u284292%u29
Module Load%u3a ZParseSql.bpl. No Debug Info. Base Address%u3a $00270000. Process testProject3.exe %u284292%u29
Module Load%u3a ZPlain.bpl. No Debug Info. Base Address%u3a $00610000. Process testProject3.exe %u284292%u29
Module Load%u3a borlndmm.dll. No Debug Info. Base Address%u3a $21510000. Process testProject3.exe %u284292%u29
Module Load%u3a cc32110mt.dll. No Debug Info. Base Address%u3a $32B00000. Process testProject3.exe %u284292%u29
Module Load%u3a apphelp.dll. No Debug Info. Base Address%u3a $75430000. Process testProject3.exe %u284292%u29
Module Load%u3a NULL.dll. No Debug Info. Base Address%u3a $672D0000. Process testProject3.exe %u284292%u29
Module Load%u3a SspiCli.dll. No Debug Info. Base Address%u3a $75410000. Process testProject3.exe %u284292%u29
Module Load%u3a USERENV.dll. No Debug Info. Base Address%u3a $74B50000. Process testProject3.exe %u284292%u29
Module Load%u3a profapi.dll. No Debug Info. Base Address%u3a $75840000. Process testProject3.exe %u284292%u29
Module Load%u3a IMM32.dll. No Debug Info. Base Address%u3a $76BB0000. Process testProject3.exe %u284292%u29
Module Load%u3a MSCTF.dll. No Debug Info. Base Address%u3a $76AE0000. Process testProject3.exe %u284292%u29
Module Load%u3a mzvkbd3.dll. No Debug Info. Base Address%u3a $6C840000. Process testProject3.exe %u284292%u29
Thread Start%u3a Thread ID%u3a 4280. Process testProject3.exe %u284292%u29

Posted: 30.10.2012, 16:23
by EgonHugeist
Henk,

I was not able to reproduce this issue EXCEPT i have objects on my Mainform which are linked to the. TZConnection AND my Datamodule was created before the Mainform was created.

I'm sure if your turn around the creation-order(Datmodule before Mainform) the issue is gone.. Stupid question does the same happen to other components?

Posted: 30.10.2012, 20:03
by markus
Hi all,

This problem occurs (on CBuilder 2010) when you have checked "build with runtime packages" option in your project (by default checked).

Since unchecking this option is one of first things i do when starting new project - i've never got such problems earlier:)

Best regards,
Marek