View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038451 | FPC | Compiler | public | 2021-02-07 21:03 | 2021-02-24 21:17 |
Reporter | ravi dion | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
OS | Linux | ||||
Product Version | 3.2.1 | ||||
Summary | 0038451: Compilation raised exception internally - Error 217 | ||||
Description | Free Pascal Compiler version 3.2.1-r48511 [2021/02/07] for x86_64 Error: Compilation raised exception internally Fatal: Compilation aborted An unhandled exception occurred at $000000000048F18A: EAccessViolation: Access violation $000000000048F18A ADDDEPENDENCY, line 917 of fmodule.pas $0000000000647124 LOADUNITS, line 519 of pmodules.pas $0000000000648516 PROC_UNIT, line 967 of pmodules.pas $0000000000548B70 COMPILE, line 399 of parser.pas $000000000053A84F LOADPPU, line 2133 of fppu.pas $00000000006470F3 LOADUNITS, line 514 of pmodules.pas $000000000064892B PROC_UNIT, line 1058 of pmodules.pas $0000000000548B70 COMPILE, line 399 of parser.pas $000000000053A84F LOADPPU, line 2133 of fppu.pas $00000000006470F3 LOADUNITS, line 514 of pmodules.pas $0000000000648516 PROC_UNIT, line 967 of pmodules.pas $0000000000548B70 COMPILE, line 399 of parser.pas $000000000053A84F LOADPPU, line 2133 of fppu.pas $00000000006470F3 LOADUNITS, line 514 of pmodules.pas $000000000064892B PROC_UNIT, line 1058 of pmodules.pas $0000000000548B70 COMPILE, line 399 of parser.pas $000000000053A84F LOADPPU, line 2133 of fppu.pas make: *** [Makefile:30: prog] Error 217 | ||||
Steps To Reproduce | Unfortunately it's a huge program and I wanted to add command line support and changed: - before in prog.lpr: uses console; begin ConsoleStart; end. - now which leads to compiler exception: uses commandlineutil, console; var BinName: String; i: Integer; begin BinName := ExtractFileName(ParamStr(0)); if ParamCount > 3 then begin for i := 1 to ParamCount do begin CmdLine := CmdLine + ParamStr(i) + ' '; end; CmdLine := Trim(CmdLine); ParseCommandLine(BinName, CmdLine); Exit; end; ConsoleStart; end. | ||||
Additional Information | - mode Delphi - it should also raise an error because CmdLine isn't defined but it doesn't do that either - happens with -O3 -Xs - happens with -O- -Xs - happens with -O- -> just happens every time -.- | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
|
Forgot to add that it still happens even if CmdLine is defined as String |
|
Remvoing commandlineutil from uses list brings: Error: Identifier not found "ExtractFileName" Error: Illegal qualifier Error: Identifier not found "ParseCommandLine" but after adding SysUtils to uses list it still crashes. But that error should come up earlier, no? Like at the beginning? |
|
UPDATE: same issue happens with Free Pascal Compiler version 3.3.1-r48520 [2021/02/07] for x86_64: Error: Compilation raised exception internally Fatal: Compilation aborted An unhandled exception occurred at $000000000049A4E4: EAccessViolation: Access violation $000000000049A4E4 ADDDEPENDENCY, line 943 of fmodule.pas $000000000069BEEA LOADUNITS, line 523 of pmodules.pas $000000000069D351 PROC_UNIT, line 975 of pmodules.pas $000000000056B626 COMPILE, line 401 of parser.pas $000000000055BAAF LOADPPU, line 2239 of fppu.pas $000000000069BEB3 LOADUNITS, line 518 of pmodules.pas $000000000069D789 PROC_UNIT, line 1070 of pmodules.pas $000000000056B626 COMPILE, line 401 of parser.pas $000000000055BAAF LOADPPU, line 2239 of fppu.pas $000000000069BEB3 LOADUNITS, line 518 of pmodules.pas $000000000069D351 PROC_UNIT, line 975 of pmodules.pas $000000000056B626 COMPILE, line 401 of parser.pas $000000000055BAAF LOADPPU, line 2239 of fppu.pas $000000000069BEB3 LOADUNITS, line 518 of pmodules.pas $000000000069D789 PROC_UNIT, line 1070 of pmodules.pas $000000000056B626 COMPILE, line 401 of parser.pas $000000000055BAAF LOADPPU, line 2239 of fppu.pas |
|
Without a small example which triggers the error I see little chance to fix it. |
|
Looks like it happens if an unit is used in console (ConsoleStart func) and then the same unit is used in commandlineutil (ParseCommandLine procedure) because if I comment out the unit in commandlineutil it compiles fine (all other code commented out in unit except uses and function definition. Remove the comment for the const definition and variable part of my function with the double used unit commented out: commandlineutil.pas(27,88) Error: Error in type definition commandlineutil.pas(27,88) Fatal: Syntax error, "=" expected but ";" found -> I defined a constant like: const X: 'my text'; which is wrong but didn't appeared before but since I commented out the unit used in both units it throws it directly. After fixing these it showed some more errors as some variables weren't defined but after fixing these as well the problem still happens. Maybe I can simplify it to a small project or I can add the project but it's huge... |
|
Nothing? |
|
Are you able to isolate which of your source is calling it? I would recommend trying the -va option as that adds in a lot of verbose output. |
|
Also, I'd use a different host for your downloads, such as Dropbox. The one you use requires browser add-ons and client programs to be downloaded. It just installed Opera WITHOUT PERMISSION. |
|
@Gareth, I don't know what you've been doing on that site, but I downloaded the bugreport file without problems. I didn't have to install anything, just downloaded a zip without the need to download or install anything else. The zip file contains only (a lot of) pascal files. I agree the method is somewhat unusual but as far as I can see the download is bona fide. |
|
Okay, it works as expected for me now too - sorry for the panic. I've just never had something like that happen before. |
|
@Gareth, I'm sorry. I didn't wanted to cause you any trouble...used anonfiles many times because you don't need to type a captcha and wait several minutes to download the file... However, I recommend to use the internet with an adblocker - that should also block such 'bad' ads :) |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-07 21:03 | ravi dion | New Issue | |
2021-02-07 21:04 | ravi dion | Note Added: 0128810 | |
2021-02-07 21:15 | ravi dion | Note Added: 0128811 | |
2021-02-07 21:17 | ravi dion | Note Edited: 0128811 | View Revisions |
2021-02-07 21:27 | ravi dion | Note Added: 0128812 | |
2021-02-07 21:36 | Florian | Status | new => feedback |
2021-02-07 21:36 | Florian | FPCTarget | => - |
2021-02-07 21:36 | Florian | Note Added: 0128813 | |
2021-02-07 22:07 | ravi dion | Note Added: 0128814 | |
2021-02-07 22:07 | ravi dion | Status | feedback => new |
2021-02-23 21:57 | ravi dion | Note Added: 0129128 | |
2021-02-24 06:30 | J. Gareth Moreton | Note Added: 0129131 | |
2021-02-24 06:37 | J. Gareth Moreton | Note Edited: 0129131 | View Revisions |
2021-02-24 06:41 | J. Gareth Moreton | Note Added: 0129132 | |
2021-02-24 08:26 | Michael Van Canneyt | Note Added: 0129134 | |
2021-02-24 13:40 | J. Gareth Moreton | Note Added: 0129141 | |
2021-02-24 21:17 | ravi dion | Note Added: 0129152 |