Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

GDB exception 9 years 4 months ago #7589

  • wolfram
  • wolfram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 27
  • Thank you received: 1
Why causes this simple unit (using a object not a class) a access violation?
Windows 7 64bit.
Attachments:

Please Log in or Create an account to join the conversation.

GDB exception 9 years 4 months ago #7591

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
unit sio.pas
line 58:
for i:=0 to (PSioHeader(data)^.Length+SizeOf(TSioHeader)-1) do begin

has problem
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

GDB exception 9 years 4 months ago #7594

  • wolfram
  • wolfram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 27
  • Thank you received: 1
Sorry Sir,
but this is not the Problem.
It crashes, if you step into the create constructor.
I have attached a reduced sample...
Attachments:

Please Log in or Create an account to join the conversation.

GDB exception 9 years 4 months ago #7595

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
copy begin ..end block code from sio.pas to
project1.lpr

units can't have
begin ..end block
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

GDB exception 9 years 4 months ago #7596

  • wolfram
  • wolfram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 27
  • Thank you received: 1

sternas wrote: copy begin ..end block code from sio.pas to
project1.lpr

units can't have
begin ..end block


(1)
Sir, are you sure!?
units can have "begin end."-blocks since turbo pascal 1.0.
the error occures even if I move the begin-end-block to the main program.

(2)
I can not step through the constructor in CodeTyphon.
With Lazarus it works (Tested Lazarus 1.4, Win7-64).
With CodeTyphon the exception shown in the picture occurs.

BTW: I use CodeTyphon 5.3 updated to 5.4
But version 5.4 will not be displayed anywhere!
Still 5.3 will displayed.
Is this normal?

Thank you of your help.
Best Regards

Please Log in or Create an account to join the conversation.

GDB exception 9 years 4 months ago #7597

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
in CodeTyphon Object Pascal units can NOT have "begin end."-blocks

For other problems
please, report this to FreePascal Bugtracker
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

GDB exception 9 years 4 months ago #7599

  • Tony_O_Gallos
  • Tony_O_Gallos's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Ελεύθερο λογισμικό ή θάνατος
  • Posts: 84
  • Thank you received: 23
For the structure of a Unit: wiki.freepascal.org/Unit
For Object type: wiki.freepascal.org/Programming_Using_Objects
In a unit you can use initialization/finalisazation but no begin/end;
The code is bugging the same under Lazarus.

Please Log in or Create an account to join the conversation.

GDB exception 9 years 4 months ago #7601

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
We fix and this
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

GDB exception 9 years 4 months ago #7616

  • wolfram
  • wolfram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 27
  • Thank you received: 1

sternas wrote: We fix and this


How I have to understand this?
What did you fix?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1