Recent

Author Topic: [SOLVED (sort of...)] Panic when compiling after power failure  (Read 1878 times)

dtoffe

  • Jr. Member
  • **
  • Posts: 55
[SOLVED (sort of...)] Panic when compiling after power failure
« on: October 09, 2020, 02:45:34 pm »
Hi all,

    I have some small simple application projects pr1, pr2, pr3, and a library project downloaded from github, say libll, pr3 and libll were open when I had a power failure. Now pr3 doesn't compile and gives this panic:

Compile Project, Target: project3: Exit code 256, Errors: 6
Panic: Hint: (11030) Start of reading config file /etc/fpc.cfg
Panic: Hint: (11031) End of reading config file /etc/fpc.cfg
Panic: Free Pascal Compiler version 3.0.4+dfsg-18ubuntu2 [2018/08/29] for x86_64
Panic: Copyright (c) 1993-2017 by Florian Klaempfl and others
Panic: (1002) Target OS:Error: /usr/bin/ppcx64 can't be executed, error message: Failed to execute "/usr/bin/ppcx64", error code: -139
Panic: tool stopped with exit code 256. Use context menu to get more information.

    pr1, pr2 and libll all compile fine, and running /usr/bin/ppcx64 executes and displays the fpc help. Cleaning and building has no effect. And of course pr3 compiled before the power failure, at least to the point that it could compile because I was adding code. System is Linux Mint 19.3

    Is there any temp, cache, corrupted file or something else that I need to delete, clean, or fix ??

Thanks,

Daniel
« Last Edit: October 10, 2020, 02:04:34 pm by dtoffe »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: Panic when compiling after power failure
« Reply #1 on: October 09, 2020, 02:47:44 pm »
FPC itself never outputs "panic", not sure where that is coming from.

As to cleaning, you can
a) compile with the -B option: this will force recompiling all units, or
b) delete all *.ppu files of your project

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Panic when compiling after power failure
« Reply #2 on: October 09, 2020, 02:56:44 pm »
https://en.wikipedia.org/wiki/Kernel_panic

But as Jonas said, this is not related to FPC or Lazarus.
You are likely to have many more problems and probably need to re-install your OS.

Backup your data and re-install the OS.
« Last Edit: October 09, 2020, 02:59:06 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: Panic when compiling after power failure
« Reply #3 on: October 09, 2020, 02:57:22 pm »
That output is not from a kernel panic.

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Panic when compiling after power failure
« Reply #4 on: October 09, 2020, 03:00:39 pm »
That output is not from a kernel panic.
As you wrote, it is also not from FPC or Lazarus....
Panic is a kernel message
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Panic when compiling after power failure
« Reply #5 on: October 09, 2020, 03:06:31 pm »
    I have some small simple application projects pr1, pr2, pr3, and a library project downloaded from github, say libll, pr3 and libll were open when I had a power failure. Now pr3 doesn't compile and gives this panic:

"Gives that panic" /how/ exactly? Are you compiling from a shell, from a makefile, using Lazarus or some other IDE... what's your command line?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jamie

  • Hero Member
  • *****
  • Posts: 6131
Re: Panic when compiling after power failure
« Reply #6 on: October 09, 2020, 03:07:51 pm »
Ups ups.....

Check your backup folder, normally in the project folder
The only true wisdom is knowing you know nothing

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Panic when compiling after power failure
« Reply #7 on: October 09, 2020, 03:13:26 pm »
Hi!

It is definitive not a Linux kernel panic message.

But if you look for "Panic" in Lazarus you will find a lot of entries:

Code: Bash  [Select][+][-]
  1. grep -iIrw panic    /usr/lib64/lazarus/*

Result:

Code: Bash  [Select][+][-]
  1. components/lazutils/ttconfig.inc:(* checks within the library. Most of the checks will panic and stop the *)
  2. components/lazutils/ttmemory.pas:     (* PANIC : An invalid Free call *)
  3. components/ideintf/ideexterntoolintf.pas:    'Panic'
  4. components/dbexport/demo/simple/lastnames.txt:Panic
  5. docs/xml/lcl/forms.xml:      <notes><note>or Panic on?</note><note>?</note>
  6. ide/etfpcmsgparser.pas:    function CheckForGeneralMessage(p: PChar): boolean; // Fatal: .., Error: ..., Panic: ..
  7. ide/etfpcmsgparser.pas:  else if ReadString(p,'Panic') then
  8. ide/etfpcmsgparser.pas:  // check for 'Fatal: ', 'Panic: ', 'Error: ', ...
  9. ide/lazarusidestrconsts.pas:  dlgMsgWinColorUrgentPanic     = 'Panic';
  10. ide/lazarusidestrconsts.pas:  lisPanic = 'Panic';
  11. languages/lazaruside.af_ZA.po:msgid "Panic"
  12. languages/lazaruside.af_ZA.po:msgid "Panic"
  13. languages/lazaruside.zh_CN.po:msgid "Panic"
  14. languages/lazaruside.zh_CN.po:msgid "Panic"
  15. languages/lazaruside.tr.po:msgid "Panic"
  16. languages/lazaruside.tr.po:msgid "Panic"
  17. languages/lazaruside.uk.po:msgid "Panic"
  18. languages/lazaruside.uk.po:msgid "Panic"
  19. languages/lazaruside.sk.po:msgid "Panic"
  20. languages/lazaruside.sk.po:msgid "Panic"
  21. languages/lazaruside.fi.po:msgid "Panic"
  22. languages/lazaruside.fi.po:msgid "Panic"
  23. languages/lazaruside.ja.po:msgid "Panic"
  24. languages/lazaruside.ja.po:msgid "Panic"
  25. ......
  26.  
  27. languages/lazaruside.ru.po:msgid "Panic"
  28. languages/lazaruside.ru.po:msgid "Panic"
  29. lcl/helpintfs.pas:      Type     For FPC: 'Hint', 'Note', 'Warning', 'Error', 'Fatal', 'Panic',
  30.  
  31.  
  32.  


Winni

dtoffe

  • Jr. Member
  • **
  • Posts: 55
Re: Panic when compiling after power failure
« Reply #8 on: October 09, 2020, 04:18:49 pm »
"Gives that panic" /how/ exactly? Are you compiling from a shell, from a makefile, using Lazarus or some other IDE... what's your command line?

MarkMLl

     I compile it as Run -> Compile from Lazarus IDE.

Ups ups.....

Check your backup folder, normally in the project folder

    Check for what ??  There is just the usual backup of the project files.

As to cleaning, you can
a) compile with the -B option: this will force recompiling all units, or
b) delete all *.ppu files of your project

    Deleted everything under lib/x86_64-linux, same result. Will try with -B, but doesn't Clean and Build forces it anyway ?

Thanks for your help !!!

Daniel

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Panic when compiling after power failure
« Reply #9 on: October 09, 2020, 04:38:42 pm »
"Gives that panic" /how/ exactly? Are you compiling from a shell, from a makefile, using Lazarus or some other IDE... what's your command line?

MarkMLl

     I compile it as Run -> Compile from Lazarus IDE.

What version? And where, /exactly/, are you getting that message?

Looking at the trunk sources, I notice

etfpcmsgparser.pas:    function CheckForGeneralMessage(p: PChar): boolean; // Fatal: .., Error: ..., Panic: ..
etfpcmsgparser.pas:  // check for 'Fatal: ', 'Panic: ', 'Error: ', ...

but that puts us up against the core designers who insist that FPC contains no such message.

What version/variant of binutils is on that system?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Panic when compiling after power failure
« Reply #10 on: October 09, 2020, 06:36:29 pm »

but that puts us up against the core designers who insist that FPC contains no such message.

MarkMLl

Hi!

A simple grep is not such a hard thing to do.

Code: Bash  [Select][+][-]
  1. cd /usr/share/fpcsrc
  2.  grep -iIrw panic *
  3.  

This brings a lot of comments but also:
Code: Bash  [Select][+][-]
  1. 3.0.4/packages/libc/src/ssyslogh.inc:    (c_name: 'panic';   c_val: LOG_EMERG),
  2. 3.0.4/packages/syslog/src/systemlog.pp:     ( name : 'panic'; val : LOG_EMERG ),
  3.  

Winni

dtoffe

  • Jr. Member
  • **
  • Posts: 55
Re: Panic when compiling after power failure
« Reply #11 on: October 09, 2020, 07:48:43 pm »
What version? And where, /exactly/, are you getting that message?
What version/variant of binutils is on that system?

MarkMLl

    Lazarus 1.8.2, fpc 3.0.4, and I'm getting those panic messages in the messages window / panel.
    GNU ld (GNU Binutils for Ubuntu) 2.30.
    Now I tried to compile from the command line using the compiler options from Project -> Project Options -> Show Options and now I get a somewhat different error message about an illegal character $7F in the file project03.lpr, so it probably got corrupted.
    Will look closely at it later today, now I'm in a hurry.

Thanks you all for your help !!!

Daniel

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Panic when compiling after power failure
« Reply #12 on: October 09, 2020, 07:52:26 pm »
    Will look closely at it later today, now I'm in a hurry.

As was I earlier. Sorry if it sounded like I was bullying you.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

dtoffe

  • Jr. Member
  • **
  • Posts: 55
[SOLVED (sort of...)] Re: Panic when compiling after power failure
« Reply #13 on: October 10, 2020, 02:03:23 pm »
    Will look closely at it later today, now I'm in a hurry.
As was I earlier. Sorry if it sounded like I was bullying you.
MarkMLl

    Mark, you are helping me and I'm very grateful for that, and the same goes for all forum members.

    Well. I commented out some part of the code and now it compiles again, that's why I say "sort of solved". There are no corrupt files or other problems caused by the power failure AFAIK.
    My project uses a binding library which depends on a C library, and I'm rewriting some C++ code in Object Pascal. When I hit Compile, the compiler shows me obvious mistakes from my part and stops.
    I guess, the power failure coincided with my code reaching a state of "the remaining bugs are not so obvious" and proceeded, and now there are problems with the way the other libraries are to be referenced / placed.
    I never did this before and there is a lot I need to read and learn before I'm able to properly ask for further help, so I will consider this topic as "solved". I should have tried harder to solve it myself, but the error messages puzzled me.

Thanks you all very much !!!

Daniel

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: [SOLVED (sort of...)] Panic when compiling after power failure
« Reply #14 on: October 10, 2020, 02:10:30 pm »
Keep at it Daniel, we're all happy to help.

Apropos possible disc corruption, remember that if it has to choose a filesystem will protect its own integrity even if that results in a lost or corrupt file. However problems of that nature- and I risk tempting providence here- are rare with modern OSes.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018