Forum
× CodeOcean Samples library, discussions and suggestions

Question Form exception error.

  • David Scambell
  • David Scambell's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 1 month ago #10014 by David Scambell
David Scambell created the topic: Form exception error.
Hi, I have recently been developing an application for work, the primary purpose of is to replace a daily check list sheet that the operators are required to complete at the beginning and end of each shift for the particular workbench that they are working at. I am a considerable way through writing the program and have recently stumbled upon a series of errors.

The first began after adding icons to individual forms, the ide would generate an exception error while compiling the application and terminate when the abort button of the resulting dialog box is pressed. Upon restarting the ide and application, a window appeared indicating that an error has occurred with the TIcon data and advising that removal of the property should cure the problem. Ok, I manually removed the icon property from the .LFM file, saved and restarted the ide.

All seemed to working correctly, I could edit code and recompile as normal, great, fixed I thought.

But on changing the main form in anyway, even via code, and recompiling an exception is raised and the assembler window is opened with the following dialog and the application will not run again.
LCLPROC_$$_RAISEGDBEXCEPTION$ANSISTRING (104)
0049212F f7f9                     idiv   %ecx

The Call Stack window produces the following:
#0 LCLPROC_$$_RAISEGDBEXCEPTION$ANSISTRING at :0
#1 CONTROLS$_$TCONTROL_$__$$_DOSETBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT at :0
#2 CONTROLS$_$TCONTROL_$__$$_DOSETBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT at :0
#3 CONTROLS$_$TWINCONTROL_$__$$_DOSETBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT at :0
#4 CONTROLS$_$TCONTROL_$__$$_CHANGEBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT$BOOLEAN at :0
#5 CONTROLS$_$TCONTROL_$__$$_SETBOUNDSKEEPBASE$LONGINT$LONGINT$LONGINT$LONGINT at :0
#6 CONTROLS$_$TCONTROL_$__$$_LOADED at :0
#7 CONTROLS$_$TWINCONTROL_$__$$_LOADED at :0
#8 CLASSES_$$_NOTIFYGLOBALLOADING at :0
#9 LRESOURCES_$$_INITLAZRESOURCECOMPONENT$TCOMPONENT$TCLASS$$BOOLEAN at :0
#10 LRESOURCES_$$_INITRESOURCECOMPONENT$TCOMPONENT$TCLASS$$BOOLEAN at :0
#11 FORMS$_$TCUSTOMFORM_$__$$_PROCESSRESOURCE at :0
#12 FORMS$_$TCUSTOMFORM_$__$$_CREATE$TCOMPONENT$$TCUSTOMFORM at :0
#13 FORMS$_$TFORM_$__$$_CREATE$TCOMPONENT$$TFORM at :0
#14 FORMS$_$TAPPLICATION_$__$$_CREATEFORM$TCOMPONENTCLASS$formal at :0
#15 main at WorkBenchSuite.lpr:55

The only effective way to correct the error is to delete the contents of the application directory and reload from a backup.
Attempting to run the compiled application outside the IDE results in an divide by zero exception error.

More puzzling, after reloading the backup, I attempted to change a second form that is created dynamically within the program, on running, the application starts normally and the main form is displayed and functions correctly, but on creating the second form, almost the exactly same error as shown above is produced, the only difference being the memory location.

Assembly window:
LCLPROC_$$_RAISEGDBEXCEPTION$ANSISTRING (104)
0049211F f7f9                     idiv   %ecx

Call stack window.
#0 LCLPROC_$$_RAISEGDBEXCEPTION$ANSISTRING at :0
#1 CONTROLS$_$TCONTROL_$__$$_DOSETBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT at :0
#2 CONTROLS$_$TCONTROL_$__$$_DOSETBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT at :0
#3 CONTROLS$_$TWINCONTROL_$__$$_DOSETBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT at :0
#4 CONTROLS$_$TCONTROL_$__$$_CHANGEBOUNDS$LONGINT$LONGINT$LONGINT$LONGINT$BOOLEAN at :0
#5 CONTROLS$_$TCONTROL_$__$$_SETBOUNDSKEEPBASE$LONGINT$LONGINT$LONGINT$LONGINT at :0
#6 CONTROLS$_$TCONTROL_$__$$_LOADED at :0
#7 CONTROLS$_$TWINCONTROL_$__$$_LOADED at :0

I have also been able to duplicate the error on a separate computer.

I am coding with CodeTyphon 5.8 running on Windows 10.

I would be grateful if anyone could help with this problem or at least point me in the write direction.

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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 year 1 month ago #10015 by Sternas Stefanos
Sternas Stefanos replied the topic: Form exception error.
Sir
we must have source or a test project to help

CodeTyphon Architect and Programmer
The following user(s) said Thank You: David Scambell

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

  • David Scambell
  • David Scambell's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 1 month ago #10022 by David Scambell
David Scambell replied the topic: Form exception error.
re Sternas

Hi again, sorry for the delay but hear is the source code for my application, I have included a copy of the treelistview component, I know that typhon already has a version of this component included but I have not yet / can not convert, the application was initially started using Lazarus 1.6.

I would be grateful for any help as I am completely stumped on this one, apart from this defiantly seems to be a corruption issue of some sort.

File Attachment:

File Name: Workbenchsuite.zip
File Size:1,108 KB
Attachments:

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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 year 1 month ago #10028 by Sternas Stefanos
Sternas Stefanos replied the topic: Form exception error.
Sir
we test your app
Our lab suggestion is to re-write this application
has a lot of problems...

Sorry we can't help

CodeTyphon Architect and Programmer

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

  • David Scambell
  • David Scambell's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 1 month ago #10029 by David Scambell
David Scambell replied the topic: Form exception error.
Ok, I understand, could you give an idea for what has gone wrong?

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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 year 1 month ago - 1 year 1 month ago #10030 by Sternas Stefanos
Sternas Stefanos replied the topic: Form exception error.
The problem is in

-bcmain.pas
-bcbenchcheck.pas


We changed
TTreeListView with TplTreeListView and
TTreeListItem with TplTreeListItem
from
pl_ExControls pkg (TplTreeListViewUnit.pas file)
in bcmain.lfm , bcbenchcheck.lfm , bcmain.pas and bcbenchcheck.pas

but we got many error on Images of bcmain.lfm and bcbenchcheck.lfm files

My suggestion is to re-write these 2 forms step by step

CodeTyphon Architect and Programmer
Last Edit: 1 year 1 month ago by Sternas Stefanos.
The following user(s) said Thank You: David Scambell

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