Recent

Author Topic: [BUG]Another error after svn update on bgrabitmap  (Read 7966 times)

freeman35

  • Jr. Member
  • **
  • Posts: 92
[BUG]Another error after svn update on bgrabitmap
« on: January 17, 2013, 10:20:30 pm »
fpcsrc At revision 23430.
lazarus At revision 39876.

Compiling bgrabitmaptypes.pas
bgrabitmaptypes.pas(2433,29) Note: Local variable "errPos" is assigned but never used   -- This line is good idea for clean I think
bgrabitmaptypes.pas(2702,1) Fatal: Internal error 2012090607


circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #1 on: January 18, 2013, 02:05:19 am »
Hmm, try removing optimizations in compiler options.
Conscience is the debugger of the mind

freeman35

  • Jr. Member
  • **
  • Posts: 92
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #2 on: January 18, 2013, 10:33:12 am »
Thank you my friend now compiled but another error :S

/lazpaint-code/bgrabitmap/bgracanvas.pas(281,11) Error: identifier idents no member "StrikeTrough"

in StrikeThrough FPCanvas file line 105
"property StrikeThrough : boolean index 8 read GetFlags write SetFlags;"

so change in bgrabitmap
/lazpaint-code/bgrabitmap/bgracanvas.pas
//   if cf.StrikeTrough then Style += [fsStrikeOut]; old
if cf.StrikeThrough then Style += [fsStrikeOut]; // new just "h" added :)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #3 on: January 18, 2013, 11:04:21 am »
Freeman is right; there has been a typo fix in FPC recently. IMO the fix should have been adding the correct spelling and marking the old one deprecated but for some reason that wasn't done.
http://www.mail-archive.com/lazarus@lists.lazarus.freepascal.org/msg35239.html

Apparently it's been changed in fixed 2.6/upcoming 2.6.2 and trunk/2.7.1.

To properly fix the code, I would use something like (air code not compiled or tested):
Code: [Select]
{$IF FPC_FULLVERSION>=20602} //changed in 2.6.2 and 2.7
if cf.StrikeThrough then Style += [fsStrikeOut];
{$ELSE}
if cf.StrikeThrouh then Style += [fsStrikeOut]; 
{$ENDIF}

As for internal compiler errors: AFAIU, these should just never happen. If the code is invalid code, a proper error message should be generated... perhaps circular already knows which error it is though... and I vaguely remember there were some fixes in 2.7 to address incorrect code generation when optimization is on.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

freeman35

  • Jr. Member
  • **
  • Posts: 92
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #4 on: January 18, 2013, 11:09:54 am »
Take care if this code from source  ::)
Code: [Select]
{$IF FPC_FULLVERSION>=20602} //changed in 2.6.2 and 2.7
if cf.StrikeThrough then Style += [fsStrikeOut];
{$ELSE}
if cf.StrikeThrouh then Style += [fsStrikeOut]; 
             ^ 
{$ENDIF}
« Last Edit: January 18, 2013, 11:12:01 am by freeman35 »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #5 on: January 18, 2013, 11:30:55 am »
If you mean take care copying and pasting? Yes, of course, that's why I mentioned it's air code/untested etc.

Thanks for the correction though ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

freeman35

  • Jr. Member
  • **
  • Posts: 92
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #6 on: January 18, 2013, 12:09:16 pm »
Yes I mean that. I was think you edit svn source file, and copy from there and paste here :)

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #7 on: January 18, 2013, 01:14:37 pm »
Well, ok i've updated BGRACanvas with this code :
Code: [Select]
{$IF FPC_FULLVERSION>=20602} //changed in 2.6.2 and 2.7   
    if cf.StrikeThrough then Style += [fsStrikeOut];
{$ELSE}
    if cf.StrikeTrough then Style += [fsStrikeOut];
{$ENDIF}

Quote
As for internal compiler errors: AFAIU, these should just never happen. If the code is invalid code, a proper error message should be generated... perhaps circular already knows which error it is though... and I vaguely remember there were some fixes in 2.7 to address incorrect code generation when optimization is on.
Well sometimes the compiler is right to point out an error, sometimes it is wrong.

In this case, I see no error at bgrabitmaptypes.pas(2702,1), so I suppose the compiler is wrong. There are some problems with "record" type.
« Last Edit: January 18, 2013, 01:17:26 pm by circular »
Conscience is the debugger of the mind

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #8 on: January 18, 2013, 01:36:00 pm »
If the bug hasn't been reported yet, it might help to report it...

I searched for 2012090607 and internal error 2012090607 in the bugtracker (including closed bugs) and didn't find anything...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

parcel

  • Full Member
  • ***
  • Posts: 143
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #9 on: January 18, 2013, 03:51:33 pm »
Code: [Select]
          LOC_REGISTER,
          LOC_CREGISTER :
            begin
{$ifdef cpu64bitalu}
              if (para.size in [OS_128,OS_S128,OS_F128]) and
                 ({ in case of fpu emulation, or abi's that pass fpu values
via integer registers }
                  (vardef.typ=floatdef) or
                   is_methodpointer(vardef) or
                   is_record(vardef)) then
                begin
                  case paraloc^.loc of
                    LOC_REGISTER:
                      begin
                        if not assigned(paraloc^.next) then
                          internalerror(200410104);
                        if (target_info.endian=ENDIAN_BIG) then
                          begin
                            { paraloc^ -> high
paraloc^.next -> low }
                            unget_para(paraloc^);
                            gen_alloc_regloc(list,destloc);
                            { reg->reg, alignment is irrelevant }
                            cg.a_load_cgparaloc_anyreg(list,OS_64,paraloc^,destloc.register128.reghi,8);
                            unget_para(paraloc^.next^);
                            cg.a_load_cgparaloc_anyreg(list,OS_64,paraloc^.next^,destloc.register128.reglo,8);
                          end
                        else
                          begin
                            { paraloc^ -> low
paraloc^.next -> high }
                            unget_para(paraloc^);
                            gen_alloc_regloc(list,destloc);
                            cg.a_load_cgparaloc_anyreg(list,OS_64,paraloc^,destloc.register128.reglo,8);
                            unget_para(paraloc^.next^);
                            cg.a_load_cgparaloc_anyreg(list,OS_64,paraloc^.next^,destloc.register128.reghi,8);
                          end;
                      end;
                    LOC_REFERENCE:
                      begin
                        gen_alloc_regloc(list,destloc);
                        reference_reset_base(href,paraloc^.reference.index,paraloc^.reference.offset,para.alignment);
                        cg128.a_load128_ref_reg(list,href,destloc.register128);
                        unget_para(paraloc^);
                      end;
                    else
                      internalerror(2012090607);
                  end
                end
              else
{$else cpu64bitalu}

It may be problem in 64bit compiler.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #10 on: January 19, 2013, 12:30:19 am »
But here on Windows 64, it compiles.
Conscience is the debugger of the mind

parcel

  • Full Member
  • ***
  • Posts: 143
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #11 on: January 19, 2013, 01:36:26 am »
But here on Windows 64, it compiles.
8)

It compiled in 32bit windows all optimization options at fpc 23438, working fine.


circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #12 on: January 19, 2013, 10:14:01 am »
So it's a problem with svn version.
Conscience is the debugger of the mind

freeman35

  • Jr. Member
  • **
  • Posts: 92
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #13 on: January 19, 2013, 02:26:01 pm »
Afew minutes ago I update all svn versions and rebuild and install, No error for now,
My system :
Linux XxX 3.6-trunk-amd64 #1 SMP Debian 3.6.8-1~experimental.1 x86_64 GNU/Linux
KDE 4.8.4

Lazarus At revision 39889.
FPC At revision 23451.
lazpaint-code At revision 454.

Thank you

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: [BUG]Another error after svn update on bgrabitmap
« Reply #14 on: January 19, 2013, 06:30:06 pm »
Cool  8-)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018