Recent

Author Topic: [SOLVED] Problem compiling  (Read 11798 times)

madepabloh

  • Full Member
  • ***
  • Posts: 160
[SOLVED] Problem compiling
« on: October 05, 2014, 01:02:29 am »
Hi all,

Maybe you could help me with a problem i have when i try to compile my program. I never had this problem, and i don´t know what i did to produce it.

When i try to compile, i have this error:
Quote
Error: Wrong token type: Symbol expected but { found (at 195,6, stream offset 0000251A)

I checked the pas code of all the form of my project, and they do not have that line (the code is shorter) or they do not have { or ( symbols...

I do not know where to look for solve this issue because i dont know what is the meaning of "stream offset 0000251A". Could you help me?
« Last Edit: October 05, 2014, 05:07:15 pm by madepabloh »

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Problem compiling
« Reply #1 on: October 05, 2014, 01:24:58 am »
Maybe it is other file, *.lfm or *.lpr.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #2 on: October 05, 2014, 01:52:14 am »
Thanks,

I checked the mainform*.lfm file, but at this line (195) i do not have any { symbol....

On the other hand, i have on screen the code editor window. If i use F12 to see the form on screen, it returns an error: on mainform.lfm of my project. The error say "division by zero"

Any idea of what is happend?

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Problem compiling
« Reply #3 on: October 05, 2014, 02:06:42 am »
Not sure, but it doesn't have to be line 195 but line 6 and column 195.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #4 on: October 05, 2014, 02:18:55 am »
Thanks for the idea.
However, line 6 of the *.lfm files is
Quote
Caption = 'Permarduino Quicklook'
, and line 6 of *.pas file is empty....


Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Problem compiling
« Reply #5 on: October 05, 2014, 02:20:15 am »
I somewhat reproduced the problem. It was in *.lfm (I tried to "accidentally" put some additional characters there). However, the reported coordinates were not related to real position of these characters. Try to check all files (mainly lfm). Try to scroll to right, maybe there'll be something.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #6 on: October 05, 2014, 02:46:28 am »
Thanks @Blaazen,

I checked all the mainform.lfm file lookig for the "{" symbols to see if i had one located out of place... but i can´t see any error in this.

On the other hand, after to close and start again the lazarus software, now the program compiles, but return an error: an external exception on SIGFPE at lclproc.pas line 181.

I checked thi  line of code and this is what it has:
Code: [Select]
procedure RaiseGDBException(const Msg: string);
begin
  debugln(rsERRORInLCL, Msg);
  // creates an exception, that gdb catches:
  debugln(rsCreatingGdbCatchableError);
  DumpStack;
  if (length(Msg) div (length(Msg) div 10000))=0 then ;
end;

line 181 is this one:
Quote
if (length(Msg) div (length(Msg) div 10000))=0 then ;

i suspect that it is related with the "division by zero" i had, but i don´t know why.
In any case, i still am not able to see the main form, just only its code.

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Problem compiling
« Reply #7 on: October 05, 2014, 03:33:45 am »
What about the backup file: mainform.lfm.bak?

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #8 on: October 05, 2014, 03:40:37 am »
The problem is that i made some small changes trying to locate the error, and compileing different times... so, the back file is not old, so, it also contains the piece of code what seems to produce the error...

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Problem compiling
« Reply #9 on: October 05, 2014, 04:05:03 am »
What OS/Lazarus/FPC versions do you have?

Line 181 of the trunk version of LCLProc is not what you have. A comment before RaiseGDBException describes why "division by zero":
Quote
{------------------------------------------------------------------------------
procedure RaiseGDBException(const Msg: string);

Raises an exception.
Normally gdb does not catch fpc Exception objects, therefore this procedure
raises a standard "division by zero" exception which is catched by gdb.
This allows one to stop a program, without extra gdb configuration.
------------------------------------------------------------------------------}

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #10 on: October 05, 2014, 11:41:12 am »
Yes, you are right,...

I don´t know why i wrote 181... the correct line is 861... what is related to the error procedure you explain.
Anyway, yes, i readed the information on top of the procedure... but i do not understand it. Moreover, i do not know how to solve the problem based on this information...

I remember i deleted a couple of toolbuttons (dividors), and added other... may be the problem is there. But i do not remember which ones or in which part of the form.

Since the "division by zero" is not so informative, i don´t know how to solve this without to start again my program what required to me 3 months of work.... (BTW, i will use from now an SVN server to keep a working  security copy on safe)

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #11 on: October 05, 2014, 11:50:49 am »
sorry, i forgot to provide the information about my system:
I am runing under Windows 8.1 (64 bits)
Lazarus is the last release: 1.2.4 and FPC 2.6.4 from svn revision 45510

On the other hand, What is the reason why i can´t see the form in design time... I can see all the other forms of the program, but to the main one what it what returns the problem... May be if i could solve this, i could repair the program...
Any idea about this?
Thanks!

Edited:
If i upload my code... Could someone check if could have the same error? May be it is a problem with my environment, although i uninstalled completely lazarus and installed again together with extra components, and the result is the same.
« Last Edit: October 05, 2014, 12:09:18 pm by madepabloh »

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Problem compiling
« Reply #12 on: October 05, 2014, 01:15:53 pm »
Quote
:
If i upload my code... Could someone check if could have the same error?
Yes, of course.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: Problem compiling
« Reply #13 on: October 05, 2014, 01:36:21 pm »
Thanks!

This is the code. Thanks so much for check it.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Problem compiling
« Reply #14 on: October 05, 2014, 02:39:03 pm »
you are using a couple of components I do not have like the thumbcontrol and threadedimageLoader and I guess there are more in there but after a quick look on the lfm I did not find any out of order { characters any where I'm a bit skeptical about the data in the groupbox1, what happens if you remove the data property completely? Once again I can load it my self to test it sorry. Hopefully Blaazen will b=have better lack with the 3rd party controls.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018