Welcome Guest!
 VirtualPascal
 Previous Message All Messages Next Message 
Win32 and SysUtils: problem with Strings/Files  Guenter Grau
 Mar 22, 2004 01:09 PST 

Hi all,

finally I am forced to write a W32 program to get some
graphics done. By luck there is the Gui/Hello.pas example,
giving a good start for it. I was able to extend it to do
some graphics, but when I included parts from a non-GUI
program, I got tons of hard crashes or EAccessViolations
(reading from address 0ff0). That happens with VP build 274,
using the Windoze emulation with Win32S 1.25 under Warp4.

I'm still not sure what is the exact reason, but
so far I discovered the following:

-take the original Win32/Gui/Hello.pas example,
change the call of registerClass into Windows.registerClass,
then add the Classes unit. It will compile normal, but
starting the program under Windoze will cause the access
violation. This happens without any call of the Classes
stuff.
-take the original Hello.pas and add a variable
VAR logfile : TEXT;
It will run fine. Now add the SysUtils unit to the
USES clause, now it will crash with AccessViolation,
read of address 04ff0. After that, it is likely that
the system will hang sooner or later (e.g. when trying
to save an email in Netscape >:-).
-the same will happen when declaring a String, preferably
a short string. As soon as SysUtils is added, it will
crash.
-my other program (Classes unit temporarily removed)
did run with TEXT and String sometimes, but even
adding code which is not executed (declaring a function
but not calling it may cause it to crash. If the system
doesn't freeze immediately, I got an access violation
with a read at 0FF0
-At one point I experienced that the problem occurs
when the compiled data crosses 8192 bytes. With this
size, it works, with 8196 (making a string assignment
longer) it doesn't. Then switching Data alignment off
(reducing the size to <<8k) it works again. However,
this is not the only problem as another modification
will crash at 5k also.

Currently I can't run the debugger...I only have the
Win emulation here, and VP doesn't like it :-/

P.S. did anybody try to create a project that
compiles under OS/2 and W32? From a first glance
the differences seem to be small.

bye
Guenter
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.