Error: Wrong token type: Symbol expected but / found ... lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- MISV · 2019-03-27 14:12 I am suddenly getting this error when compiling my project (almost unchanged, only edited some .pas files) QuoteError: Wrong token type: Symbol expected but / found (at 9,22, stream offset 000000CD) XXX.dpr(166,0) Error: Error while compiling resources -> Compile with -vd for more details. Check for duplicates. However - that error message is with -vd added since if I go to "Project options" and click "Show options" I can see that -vd has been added: ... One thing I noticed is that if I click "Project options - Test" I get QuoteHINT: using config file /Users/zzz/lazaruscoc64bit/fpc/bin/x86_64-darwin/fpc.cfg WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/univint/Dialogs.ppu, /Users/zzz/lazaruscoc64bit/ fpc/lib/fpc/3.0.4/units/x86_64-darwin/fv/dialogs.ppu WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/univint/Menus.ppu, /Users/zzz/lazaruscoc64bit/fp c/lib/fpc/3.0.4/units/x86_64-darwin/fv/menus.ppu WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/fv/dialogs.ppu, /Users/zzz/lazaruscoc64bit/lazarus/lcl/units/x86_64-darwin/dialogs.ppu WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/fv/menus.ppu, /Users/zzz/lazaruscoc64bit/lazarus/lcl/units/x86_64-darwin/menus.ppu WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/univint/Controls.ppu, /Users/zzz/lazaruscoc64bit /lazarus/lcl/units/x86_64-darwin/controls.ppu WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/univint/Dialogs.ppu, /Users/zzz/lazaruscoc64bit/lazarus/lcl/units/x86_64-darwin/dialogs.ppu WARNING: ppu exists twice: /Users/zzz/lazaruscoc64bit/fpc/lib/fpc/3.0. 4/units/x86_64-darwin/univint/Menus.ppu, /Users/zzz/lazaruscoc64bit/lazarus/lcl/units/x86_64-darwin/menus.ppu Could that be the reason? ---------------------------------------------------------------------- MISV · 2019-03-27 15:17 I have been experimenting trying to compile in older Lazarus version and then returning back. Disabling all filters on "Messages" I now get this: QuoteDebug: /Volumes/DiskW/shared-code/xxx/UmsSysConvert.pas(1021,1)  (3049) procedure/function msAlignmentToStr(const TAlignment):AnsiString; Debug: An unhandled exception occurred at $000000010D98DBEE: Debug: EAccessViolation: Access violation Debug:   $000000010D98DBEE Debug: Verbose: Assembling (pipe) /Volumes/DiskW/yyy/lib/x86_64-darwin/UmsSysConvert.s Fatal: Compilation aborted Verbose: /Users/zzz/lazaruscoc64bit/fpc/bin/x86_64-darwin/ppcx64 returned an error exitcode .... The only worthwhile thing mentioning about declaration: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function msAlignmentToStr(const Alignment: TAlignment): string;  is that it is placed just before implemention and its implementation is placed just before end. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function msAlignmentToStr(const Alignment: TAlignment): string;begin  case Alignment of    taLeftJustify: Result := 'left';    taRightJustify: Result := 'right';    taCenter: Result := 'center';    else Result := '';  end;end; ---------------------------------------------------------------------- MISV · 2019-03-27 15:31 The error only occurs when building my software. Not if I build a package that contains the unit. I guess I will try with a trunk version. Does anyone know how I get more information about AccessViolation that happens the compiler? Maybe somehow lldb startlazarus? I will try research that when I get back tonight ---------------------------------------------------------------------- howardpc · 2019-03-27 16:47 If you remove the const modifier for the TAlignment parameter does it make any difference? ---------------------------------------------------------------------- MISV · 2019-03-27 19:23 That solved the access violation error in the compiler. However - the original problem has now returned: QuoteError: Wrong token type: Symbol expected but / found (at 9,22, stream offset 000000CD) XXX.dpr(166,0) Error: Error while compiling resources -> Compile with -vd for more details. Check for duplicates. My .dpr file is 165 lines - Maybe it is somehow trying to grab .res file twice? I wish I could see the problem though - the -vd does not seem to be working ---------------------------------------------------------------------- MISV · 2019-03-27 19:42 Nevermind - running with verbose I can see the problem happens for one of my forms. Not quite sure why or how - but opening the form in Lazarus at designtime fails  as well ---------------------------------------------------------------------- lucamar · 2019-03-27 20:40 Open the .dpr with any text editor and check the offending line(s). It's the only way to see what the compiler is complaining about. BTW, .DPR? Is that a Delphi project? ---------------------------------------------------------------------- MISV · 2019-03-27 22:05 I believe this issue has now been resolved - the .dfm file was somehow corrupt - transferring it again worked. Mysterious.