View Issue Details

IDProjectCategoryView StatusLast Update
0037034FPCCompilerpublic2020-06-20 13:43
ReporterAlfred Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformWindows 
Product Version3.3.1 
Summary0037034: Startlazarus errors out on Lazarus executable not found.
DescriptionAs discussed on forum.
https://forum.lazarus.freepascal.org/index.php/topic,49373.0.html

It seems that the Lazarus-function GetExeExt does not always give the expected result when startlazarus is compiled with latest trunk.

Trunk up until and including 45216 works well. Starting with 45217, this error seems to be present.

If latest trunk is used, but with 45217 reverted, all works as expected.
So, AFAIK, it seems that 45217 introduced some unexpected behavior.



TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Relationships

has duplicate 0037057 resolvedJuha Manninen Lazarus Trunk startlazarus.exe can't find Lazarus executable 

Activities

Florian

2020-05-09 18:01

administrator   ~0122683

With linux it works, so can sombody please provide some more information (disassembly before and after r45217 of the call behaving wrong) ? I guess it is the call in LazarusManager.pas:320 which returns a wrong result?

Alfred

2020-05-10 12:40

reporter   ~0122695

Last edited: 2020-05-10 12:42

View 2 revisions

Trunk today vanilla without 45217:
.Ll99:
# [319] DefaultExe:=DefaultDir+'lazarus'+GetExeExt;
    pushl $0
    movl -12(%ebp),%eax
    movl %eax,-56(%ebp)
    movl $.Ld4,%eax
    movl %eax,-52(%ebp)
    movl $.Ld2,%edx
    leal -60(%ebp),%eax
    call fpc_ansistr_assign
    movl -60(%ebp),%eax
    movl %eax,-48(%ebp)
    leal -56(%ebp),%edx
    leal -20(%ebp),%eax
    movl $2,%ecx
    call fpc_ansistr_concat_multi
    .stabn 68,0,322,.Ll100 - LAZARUSMANAGER$_$TLAZARUSMANAGER_$__$$_RUN
.Ll100:

Trunk today vanilla with 45217:
.Ll99:
# [319] DefaultExe:=DefaultDir+'lazarus'+GetExeExt;
    pushl $0
    movl -12(%ebp),%eax
    movl %eax,-56(%ebp)
    movl $.Ld4,%eax
    movl %eax,-52(%ebp)
    movl $.Ld2,%eax
    movl %eax,-48(%ebp)
    leal -56(%ebp),%edx
    leal -20(%ebp),%eax
    movl $2,%ecx
    call fpc_ansistr_concat_multi
    .stabn 68,0,322,.Ll100 - LAZARUSMANAGER$_$TLAZARUSMANAGER_$__$$_RUN
.Ll100:

Bart Broersma

2020-05-13 14:10

reporter   ~0122763

Last edited: 2020-05-13 22:37

View 4 revisions

I can confirm the issue.
Added some debug statements in lazarusmanager.pas and got this:

DefaultDir=C:\devel\laztrunktrunk\
GetExeExt=.exe
DefaultExe=C:\devel\laztrunktrunk\lazarus
DefaultDir+'lazarus'+GetExeExt=C:\devel\laztrunktrunk\lazarus

fpc 3.3.1 r45354, 32 bit on Win10-64

Bart Broersma

2020-06-06 11:27

reporter   ~0123259

Last edited: 2020-06-07 10:35

View 2 revisions

The summary of this topic should be changed to: "After r45217, string concatenation fails under specific circumstances".
This IMO reflects more the seriousness of the problem.
As it is now, it simply looks like a problem of just Lazarus.

Florian

2020-06-06 14:36

administrator   ~0123263

I thought I fixed this already meanwhile? Most likely by r45231?

Alfred

2020-06-07 09:48

reporter   ~0123291

Current trunk !
See screenshot.
getexeext01.JPG (48,133 bytes)   
getexeext01.JPG (48,133 bytes)   

Bart Broersma

2020-06-07 10:38

reporter   ~0123292

@Alfred: can you reproduce this failure with a plain fpc program (no LCL)?
I tried, but was unable to.
Makes life for the fpc devels a bit easier.

Bart Broersma

2020-06-07 11:22

reporter   ~0123296

Last edited: 2020-06-07 11:38

View 2 revisions

Fpc r45606: Alfred's example fails (i.e. behaves like the screenshot example).
An observation: if you make GetExeExt a local procedure in the unit where TForm1 is defined, then there is no error.
I'm still unable to make a fpc only example that reproduces the error.

I can however reproduce the error with a console application that uses the fileutil unit of Lazarus.

Alfred

2020-06-07 12:02

reporter   ~0123299

Last edited: 2020-06-07 12:06

View 2 revisions

getexecmd.lpr :

program getexecmd;
uses
  MyFileUtil;
var
  s,t:string;
begin
  s:='Yolo';
  t:=s+'Hello'+GetExeExt;
  writeln(t);
  t:=s+GetExeExt;
  writeln(t);
  readln;
end.

myfileutil.pas:

unit MyFileUtil;
{$mode objfpc}{$H+}
interface
function GetExeExt: string; inline;
implementation
function GetExeExt: string;
begin
  {$IFDEF WINDOWS}
  Result:='.exe';
  {$ELSE}
  Result:='';
  {$ENDIF}
end;
end.

Bart Broersma

2020-06-07 12:05

reporter   ~0123300

If I remove the inline directive from the GetExeExt function, the error goes away.

Bart Broersma

2020-06-07 12:11

reporter   ~0123301

Last edited: 2020-06-07 12:23

View 3 revisions

I finally made a simple test program, fpc only that demonstrates the error.
Attached as sample.zip

[ETA]
I missed the sample program from note 0123299.
I was hacking my way through FileUtil unit ...
[/ETA]
sample.zip (746 bytes)

Bart Broersma

2020-06-07 12:18

reporter   ~0123303

Last edited: 2020-06-07 12:19

View 2 revisions

Attached asm output.
The test-ok.s file was generated by removing the inline directive from the GetExeExt function.
test_fail.s (4,990 bytes)   
	.file "test.pas"
# Begin asmlist al_procedures

.section .text.n_p$test_$$_fin$00000003,"ax"
	.balign 16,0x90
.globl	P$TEST_$$_fin$00000003
P$TEST_$$_fin$00000003:
# [test.pas]
# [15] end.
	pushl	%ebp
	movl	%eax,%ebp
	leal	-4(%ebp),%eax
	call	fpc_ansistr_decr_ref
# [11] begin
	popl	%ebp
	ret

.section .text.n__main,"ax"
	.balign 16,0x90
.globl	_main
_main:
.globl	PASCALMAIN
PASCALMAIN:
# Temps allocated between ebp-16 and ebp+0
	pushl	%ebp
	movl	%esp,%ebp
	leal	-16(%esp),%esp
	pushl	%ebx
	call	fpc_initializeunits
	movl	$0,-4(%ebp)
	xorl	%eax,%eax
	pushl	$P$TEST_$$_fin$00000003
	pushl	%ebp
	pushl	$__FPC_finally_handler
	pushl	%fs:(%eax)
	movl	%esp,%fs:(%eax)
# [12] s := 'Pre';
	movl	$U_$P$TEST_$$_S,%eax
	movl	$.Ld1,%edx
	call	fpc_ansistr_assign
# [13] writeln('Got     : "',s + '_Mid_' + GetExeExt,'"');
	call	fpc_get_output
	movl	%eax,%ebx
	movl	$_$TEST$_Ld2,%ecx
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_shortstr
	call	fpc_iocheck
	leal	-4(%ebp),%eax
	call	fpc_ansistr_decr_ref
	pushl	$65535
	movl	U_$P$TEST_$$_S,%eax
	movl	%eax,-16(%ebp)
	movl	$.Ld3,%eax
	movl	%eax,-12(%ebp)
	movl	$.Ld4,%eax
	movl	%eax,-8(%ebp)
	leal	-16(%ebp),%edx
	movl	$2,%ecx
	leal	-4(%ebp),%eax
	call	fpc_ansistr_concat_multi
	movl	-4(%ebp),%ecx
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_ansistr
	call	fpc_iocheck
	movb	$34,%cl
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_char
	call	fpc_iocheck
	movl	%ebx,%eax
	call	fpc_writeln_end
	call	fpc_iocheck
# [14] writeln('Expected: "Pre_Mid_.exe"');
	call	fpc_get_output
	movl	%eax,%ebx
	movl	$_$TEST$_Ld5,%ecx
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_shortstr
	call	fpc_iocheck
	movl	%ebx,%eax
	call	fpc_writeln_end
	call	fpc_iocheck
	xorl	%eax,%eax
	popl	%edx
	addl	$12,%esp
	movl	%edx,%fs:(%eax)
	movl	%ebp,%eax
	call	P$TEST_$$_fin$00000003
	call	fpc_do_exit
	ret

.section .text.n__p$test_$$_init_implicit$,"ax"
	.balign 16,0x90
.globl	_P$TEST_$$_init_implicit$
_P$TEST_$$_init_implicit$:
.globl	INIT$_$P$TEST
INIT$_$P$TEST:
	pushl	%ebp
	movl	%esp,%ebp
	movl	%ebp,%esp
	popl	%ebp
	ret

.section .text.n__p$test_$$_finalize_implicit$,"ax"
	.balign 16,0x90
.globl	_P$TEST_$$_finalize_implicit$
_P$TEST_$$_finalize_implicit$:
.globl	FINALIZE$_$P$TEST
FINALIZE$_$P$TEST:
.globl	PASCALFINALIZE
PASCALFINALIZE:
	pushl	%ebp
	movl	%esp,%ebp
	movl	$U_$P$TEST_$$_S,%eax
	call	fpc_ansistr_decr_ref
	movl	%ebp,%esp
	popl	%ebp
	ret
# End asmlist al_procedures
# Begin asmlist al_globals

.section .bss,"aw"
	.balign 4
# [test.pas]
# [10] s: string;
	.globl U_$P$TEST_$$_S
U_$P$TEST_$$_S:
	.zero 4

.section .data.n_INITFINAL,"aw"
	.balign 4
.globl	INITFINAL
INITFINAL:
	.long	4,0
	.long	INIT$_$SYSTEM
	.long	FINALIZE$_$SYSTEM
	.long	INIT$_$FPINTRES
	.long	0,0
	.long	FINALIZE$_$OBJPAS
	.long	INIT$_$P$TEST
	.long	FINALIZE$_$P$TEST

.section .data.n_FPC_THREADVARTABLES,"aw"
	.balign 4
.globl	FPC_THREADVARTABLES
FPC_THREADVARTABLES:
	.long	1
	.long	THREADVARLIST_$SYSTEM$indirect

.section .rodata.n_FPC_RESOURCESTRINGTABLES,"a"
	.balign 4
.globl	FPC_RESOURCESTRINGTABLES
FPC_RESOURCESTRINGTABLES:
	.long	0

.section .data.n_FPC_WIDEINITTABLES,"aw"
	.balign 4
.globl	FPC_WIDEINITTABLES
FPC_WIDEINITTABLES:
	.long	0

.section .data.n_FPC_RESSTRINITTABLES,"aw"
	.balign 4
.globl	FPC_RESSTRINITTABLES
FPC_RESSTRINITTABLES:
	.long	0

.section .fpc.n_version,"aw"
	.balign 16
__fpc_ident:
	.ascii	"FPC 3.3.1 [2020/06/07] for i386 - Win32"

.section .data.n___heapsize,"aw"
	.balign 4
.globl	__heapsize
__heapsize:
	.long	0

.section .data.n___fpc_valgrind,"aw"
	.balign 4
.globl	__fpc_valgrind
__fpc_valgrind:
	.byte	0
# End asmlist al_globals
# Begin asmlist al_typedconsts

.section .rodata.n_.Ld1,"a"
	.balign 4
.Ld1$strlab:
	.short	0,1
	.long	-1,3
.Ld1:
	.ascii	"Pre\000"

.section .rodata.n__$TEST$_Ld2,"a"
	.balign 4
.globl	_$TEST$_Ld2
_$TEST$_Ld2:
	.ascii	"\013Got     : \"\000"

.section .rodata.n_.Ld3,"a"
	.balign 4
.Ld3$strlab:
	.short	0,1
	.long	-1,5
.Ld3:
	.ascii	"_Mid_\000"

.section .rodata.n_.Ld4,"a"
	.balign 4
.Ld4$strlab:
	.short	65535,1
	.long	-1,4
.Ld4:
	.ascii	".exe\000"

.section .rodata.n__$TEST$_Ld5,"a"
	.balign 4
.globl	_$TEST$_Ld5
_$TEST$_Ld5:
	.ascii	"\030Expected: \"Pre_Mid_.exe\"\000"
# End asmlist al_typedconsts
# Begin asmlist al_rtti

.section .rodata.n_RTTI_$P$TEST_$$_def00000005,"a"
	.balign 8
.globl	RTTI_$P$TEST_$$_def00000005
RTTI_$P$TEST_$$_def00000005:
	.byte	12,0
	.long	0,12,3
	.long	RTTI_$SYSTEM_$$_RAWBYTESTRING$indirect
	.byte	1
	.long	RTTI_$SYSTEM_$$_LONGINT$indirect
# End asmlist al_rtti
# Begin asmlist al_indirectglobals

.section .rodata.n_RTTI_$P$TEST_$$_def00000005,"a"
	.balign 4
.globl	RTTI_$P$TEST_$$_def00000005$indirect
RTTI_$P$TEST_$$_def00000005$indirect:
	.long	RTTI_$P$TEST_$$_def00000005
# End asmlist al_indirectglobals

test_fail.s (4,990 bytes)   
test_ok.s (5,011 bytes)   
	.file "test.pas"
# Begin asmlist al_procedures

.section .text.n_p$test_$$_fin$00000003,"ax"
	.balign 16,0x90
.globl	P$TEST_$$_fin$00000003
P$TEST_$$_fin$00000003:
# [test.pas]
# [15] end.
	pushl	%ebp
	movl	%eax,%ebp
	leal	-20(%ebp),%eax
	call	fpc_ansistr_decr_ref
	leal	-4(%ebp),%eax
	call	fpc_ansistr_decr_ref
# [11] begin
	popl	%ebp
	ret

.section .text.n__main,"ax"
	.balign 16,0x90
.globl	_main
_main:
.globl	PASCALMAIN
PASCALMAIN:
# Temps allocated between ebp-20 and ebp+0
	pushl	%ebp
	movl	%esp,%ebp
	leal	-20(%esp),%esp
	pushl	%ebx
	call	fpc_initializeunits
	movl	$0,-20(%ebp)
	movl	$0,-4(%ebp)
	xorl	%eax,%eax
	pushl	$P$TEST_$$_fin$00000003
	pushl	%ebp
	pushl	$__FPC_finally_handler
	pushl	%fs:(%eax)
	movl	%esp,%fs:(%eax)
# [12] s := 'Pre';
	movl	$U_$P$TEST_$$_S,%eax
	movl	$.Ld1,%edx
	call	fpc_ansistr_assign
# [13] writeln('Got     : "',s + '_Mid_' + GetExeExt,'"');
	call	fpc_get_output
	movl	%eax,%ebx
	movl	$_$TEST$_Ld2,%ecx
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_shortstr
	call	fpc_iocheck
	leal	-4(%ebp),%eax
	call	fpc_ansistr_decr_ref
	pushl	$65535
	movl	U_$P$TEST_$$_S,%eax
	movl	%eax,-16(%ebp)
	movl	$.Ld3,%eax
	movl	%eax,-12(%ebp)
	leal	-20(%ebp),%eax
	call	EXEEXT_$$_GETEXEEXT$$ANSISTRING
	movl	-20(%ebp),%eax
	movl	%eax,-8(%ebp)
	leal	-16(%ebp),%edx
	movl	$2,%ecx
	leal	-4(%ebp),%eax
	call	fpc_ansistr_concat_multi
	movl	-4(%ebp),%ecx
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_ansistr
	call	fpc_iocheck
	movb	$34,%cl
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_char
	call	fpc_iocheck
	movl	%ebx,%eax
	call	fpc_writeln_end
	call	fpc_iocheck
# [14] writeln('Expected: "Pre_Mid_.exe"');
	call	fpc_get_output
	movl	%eax,%ebx
	movl	$_$TEST$_Ld4,%ecx
	movl	%ebx,%edx
	movl	$0,%eax
	call	fpc_write_text_shortstr
	call	fpc_iocheck
	movl	%ebx,%eax
	call	fpc_writeln_end
	call	fpc_iocheck
	xorl	%eax,%eax
	popl	%edx
	addl	$12,%esp
	movl	%edx,%fs:(%eax)
	movl	%ebp,%eax
	call	P$TEST_$$_fin$00000003
	call	fpc_do_exit
	ret

.section .text.n__p$test_$$_init_implicit$,"ax"
	.balign 16,0x90
.globl	_P$TEST_$$_init_implicit$
_P$TEST_$$_init_implicit$:
.globl	INIT$_$P$TEST
INIT$_$P$TEST:
	pushl	%ebp
	movl	%esp,%ebp
	movl	%ebp,%esp
	popl	%ebp
	ret

.section .text.n__p$test_$$_finalize_implicit$,"ax"
	.balign 16,0x90
.globl	_P$TEST_$$_finalize_implicit$
_P$TEST_$$_finalize_implicit$:
.globl	FINALIZE$_$P$TEST
FINALIZE$_$P$TEST:
.globl	PASCALFINALIZE
PASCALFINALIZE:
	pushl	%ebp
	movl	%esp,%ebp
	movl	$U_$P$TEST_$$_S,%eax
	call	fpc_ansistr_decr_ref
	movl	%ebp,%esp
	popl	%ebp
	ret
# End asmlist al_procedures
# Begin asmlist al_globals

.section .bss,"aw"
	.balign 4
# [test.pas]
# [10] s: string;
	.globl U_$P$TEST_$$_S
U_$P$TEST_$$_S:
	.zero 4

.section .data.n_INITFINAL,"aw"
	.balign 4
.globl	INITFINAL
INITFINAL:
	.long	4,0
	.long	INIT$_$SYSTEM
	.long	FINALIZE$_$SYSTEM
	.long	INIT$_$FPINTRES
	.long	0,0
	.long	FINALIZE$_$OBJPAS
	.long	INIT$_$P$TEST
	.long	FINALIZE$_$P$TEST

.section .data.n_FPC_THREADVARTABLES,"aw"
	.balign 4
.globl	FPC_THREADVARTABLES
FPC_THREADVARTABLES:
	.long	1
	.long	THREADVARLIST_$SYSTEM$indirect

.section .rodata.n_FPC_RESOURCESTRINGTABLES,"a"
	.balign 4
.globl	FPC_RESOURCESTRINGTABLES
FPC_RESOURCESTRINGTABLES:
	.long	0

.section .data.n_FPC_WIDEINITTABLES,"aw"
	.balign 4
.globl	FPC_WIDEINITTABLES
FPC_WIDEINITTABLES:
	.long	0

.section .data.n_FPC_RESSTRINITTABLES,"aw"
	.balign 4
.globl	FPC_RESSTRINITTABLES
FPC_RESSTRINITTABLES:
	.long	0

.section .fpc.n_version,"aw"
	.balign 16
__fpc_ident:
	.ascii	"FPC 3.3.1 [2020/06/07] for i386 - Win32"

.section .data.n___heapsize,"aw"
	.balign 4
.globl	__heapsize
__heapsize:
	.long	0

.section .data.n___fpc_valgrind,"aw"
	.balign 4
.globl	__fpc_valgrind
__fpc_valgrind:
	.byte	0
# End asmlist al_globals
# Begin asmlist al_typedconsts

.section .rodata.n_.Ld1,"a"
	.balign 4
.Ld1$strlab:
	.short	0,1
	.long	-1,3
.Ld1:
	.ascii	"Pre\000"

.section .rodata.n__$TEST$_Ld2,"a"
	.balign 4
.globl	_$TEST$_Ld2
_$TEST$_Ld2:
	.ascii	"\013Got     : \"\000"

.section .rodata.n_.Ld3,"a"
	.balign 4
.Ld3$strlab:
	.short	0,1
	.long	-1,5
.Ld3:
	.ascii	"_Mid_\000"

.section .rodata.n__$TEST$_Ld4,"a"
	.balign 4
.globl	_$TEST$_Ld4
_$TEST$_Ld4:
	.ascii	"\030Expected: \"Pre_Mid_.exe\"\000"
# End asmlist al_typedconsts
# Begin asmlist al_rtti

.section .rodata.n_RTTI_$P$TEST_$$_def00000005,"a"
	.balign 8
.globl	RTTI_$P$TEST_$$_def00000005
RTTI_$P$TEST_$$_def00000005:
	.byte	12,0
	.long	0,12,3
	.long	RTTI_$SYSTEM_$$_RAWBYTESTRING$indirect
	.byte	1
	.long	RTTI_$SYSTEM_$$_LONGINT$indirect
# End asmlist al_rtti
# Begin asmlist al_indirectglobals

.section .rodata.n_RTTI_$P$TEST_$$_def00000005,"a"
	.balign 4
.globl	RTTI_$P$TEST_$$_def00000005$indirect
RTTI_$P$TEST_$$_def00000005$indirect:
	.long	RTTI_$P$TEST_$$_def00000005
# End asmlist al_indirectglobals

test_ok.s (5,011 bytes)   

Bart Broersma

2020-06-07 16:13

reporter   ~0123306

Attached tw0037034.pp, a self contained test.
tw0037034.pp (361 bytes)   
program Test;

{$mode objfpc}
{$h+}

uses
  SysUtils;

{$assertions on}

function Suffix: string; inline;
begin
  Result := 'Post';
end;

const
  Expected = 'Pre_Mid_Post';
var
  s, t: string;
begin
  s := 'Pre';
  t := s + '_Mid_' + Suffix;
  Assert(t = Expected,format('Expected "%s", Got: "%s"',[Expected,t]));
  writeln('Ok');
end.
tw0037034.pp (361 bytes)   

Florian

2020-06-08 21:09

administrator   ~0123344

For the record: I finally found the reason but no solution yet.

Bart Broersma

2020-06-12 23:09

reporter   ~0123408

Well, that's one step in the right direction then.

jwharton

2020-06-13 06:29

reporter   ~0123411

I confirm that I am affected by this problem. It burned up my entire day in total frustration until I finally figured it out. Here is what I posted in the forums.

I am working from sources directly on Windows and I am having a problem with the startlazarus.exe program. When I go to start up it gives me the error that it can't find "D:\freepascal\lazarus\trunk\lazarus". I noticed the lack of the ".exe" file extension. I found the source for this and looked into it and there is a function in the fileutil.inc file that is as follows:

interface
...
function GetExeExt: string; inline;
...
implementation
...
function GetExeExt: string;
begin
  {$IFDEF WINDOWS}
  Result:='.exe';
  {$ELSE}
  Result:='';
  {$ENDIF}
end;


I noticed when I compile it that it is picking up the code from the WINDOWS block of code in the compiler directive block. If I make a syntax error in that code it fails to compile. So, I know it isn't a compiler directive issue. However, when I trace this program executing here (line 319 of LazarusManager.pas):

      DefaultExe:=DefaultDir+'lazarus'+GetExeExt;

There isn't any extension added to the value given to DefaultExe.

This tells me that for some reason the code that was supposed to be inlined into this didn't make it. I proved this out by commenting out the inline directive on the GetExeExt() function and then it worked as expected.

I can hardcode things for now and make it work, but I thought I should report this somewhere. This could be causing problems elsewhere too.


Please upgrade this to MAJOR in importance.

Thanks,
Jason Wharton
www.ibobjects.com

Thaddy de Koning

2020-06-13 08:52

reporter   ~0123412

Last edited: 2020-06-13 08:53

View 2 revisions

Shouldn't it be {$ifdef mswindows}

Sven Barth

2020-06-13 10:08

manager   ~0123413

If the IDE would work on WinCE then the extension would need to be applied as well, so WINDOWS is correct. MSWINDOWS only applies to Win32 and Win64.

Bart Broersma

2020-06-13 18:34

reporter   ~0123415

@ jwharton: the bugtracker is not the place to express your frustrations.
Your note adds nothing new to the bug in question, which has already been reduced to a self containing test case.

Also the remarks about {$ifdef windows} are off topic.

AFAICS the offending revision introducing this is not merged to the 3.2 fixes branch, so normal Lazarus users won't be affected.
If you insist on using fpc trunk (especially i.c.m. with Lazarus trunk) you know at forehand this kind of issues will appear.
Every now and then something major gets broken.
Just revert to the revision that worked and wait untils the bug is fixed (or submit a patch if you know (or even think to know) how to fix it).

Bart Broersma

2020-06-13 18:36

reporter   ~0123416

@Sven: maybe change the summary (title) of this bugreport to better reflect the issue?

Sven Barth

2020-06-13 19:28

manager   ~0123417

@Bart: Why? It does describe the most likely symptom that users will encounter. And I don't know enough about this bug to judge in what other situations it might arise.

jwharton

2020-06-13 22:58

reporter   ~0123420

@Bart I get what you are saying, but it didn't need to be said. My purpose in writing was to request that the importance be increased from minor to major. This is a major issue that is likely affecting a lot of things other than this one case. This is the place to make such a request.

Bart Broersma

2020-06-13 23:07

reporter   ~0123421

@jwharton: the simple request would have sufficed. All the rest was superfluous.

jwharton

2020-06-14 01:42

reporter   ~0123424

@Bart Your censure of me was even more superfluous. Feel free to PM me this kind of stuff in the future.

Bart Broersma

2020-06-14 22:00

reporter   ~0123437

Last edited: 2020-06-14 22:14

View 2 revisions

Off-topic:
@jwharton: I wouldn't mind pm-ing you, but when I click on your name I see no mail address.
IIRC then in the past one could see this information (II know one could se mine), but this is no longer the case?
[Edit] Even stranger, on the Lazarus side of the bugtracker I see my email address when I click on my name, but not on the fpc side of the bugtracker.

jwharton

2020-06-16 04:09

reporter   ~0123448

@Bart My signature line has www.ibobjects.com. That's how you would find me and take up your personal causes with me.

zoltanleo

2020-06-20 13:12

reporter   ~0123481

Last edited: 2020-06-20 13:38

View 3 revisions

Can I suggest a workaround to temporary solution the problem until it is completely resolved by fixing it in the compiler code? Idea belongs to user lucamar from here https://forum.lazarus.freepascal.org/index.php/topic,49373.msg360941.html#msg360941
lazmngr_getexeext.patch (979 bytes)   
--- C:/temp/lazarusmanager.pas-revBASE.svn000.tmp.pas	�� �� 17 06:27:15 2019
+++ C:/devel/lazarus_21_r63163/ide/lazarusmanager.pas	�� �� 20 13:22:46 2020
@@ -149,0 +150,7 @@ implementation
+const
+  {$IFDEF WINDOWS}
+  GetExeExtEx = '.exe';
+  {$ELSE}
+  GetExeExtEx = '';
+  {$ENDIF}
+
@@ -163,3 +170,3 @@ begin
-  NewFilename:=AppendPathDelim(Directory)+'lazarus.new'+GetExeExt;
-  BackupFilename:=AppendPathDelim(Directory)+'lazarus.old'+GetExeExt;
-  CurFilename:=AppendPathDelim(Directory)+'lazarus'+GetExeExt;
+  NewFilename:=AppendPathDelim(Directory)+'lazarus.new'+GetExeExtEx;
+  BackupFilename:=AppendPathDelim(Directory)+'lazarus.old'+GetExeExtEx;
+  CurFilename:=AppendPathDelim(Directory)+'lazarus'+GetExeExtEx;
@@ -319,2 +326,2 @@ begin
-      DefaultExe:=DefaultDir+'lazarus'+GetExeExt;
-      CustomExe:=CustomDir+'lazarus'+GetExeExt;
+      DefaultExe:=DefaultDir+'lazarus'+GetExeExtEx;
+      CustomExe:=CustomDir+'lazarus'+GetExeExtEx;
lazmngr_getexeext.patch (979 bytes)   

Bi0T1N

2020-06-20 13:42

reporter   ~0123483

Last edited: 2020-06-20 13:43

View 2 revisions

@zoltanleo
There is already a temporary solution in trunk (5 days old): https://github.com/graemeg/freepascal/commit/69e947650223cf401fa12e7fc3ae2ec1bf6deef8

Issue History

Date Modified Username Field Change
2020-05-07 11:22 Alfred New Issue
2020-05-09 18:01 Florian Note Added: 0122683
2020-05-09 18:01 Florian Status new => feedback
2020-05-09 18:01 Florian FPCTarget => -
2020-05-10 12:40 Alfred Note Added: 0122695
2020-05-10 12:40 Alfred Status feedback => new
2020-05-10 12:42 Alfred Note Edited: 0122695 View Revisions
2020-05-13 07:32 Juha Manninen Relationship added has duplicate 0037057
2020-05-13 14:10 Bart Broersma Note Added: 0122763
2020-05-13 14:12 Bart Broersma Note Edited: 0122763 View Revisions
2020-05-13 14:12 Bart Broersma Note Edited: 0122763 View Revisions
2020-05-13 22:37 Bart Broersma Note Edited: 0122763 View Revisions
2020-06-06 11:06 Juha Manninen Relationship added related to 0037133
2020-06-06 11:23 Bart Broersma Relationship deleted related to 0037133
2020-06-06 11:27 Bart Broersma Note Added: 0123259
2020-06-06 14:36 Florian Status new => feedback
2020-06-06 14:36 Florian Note Added: 0123263
2020-06-07 09:48 Alfred Note Added: 0123291
2020-06-07 09:48 Alfred File Added: getexeext01.JPG
2020-06-07 09:48 Alfred Status feedback => new
2020-06-07 10:35 Bart Broersma Note Edited: 0123259 View Revisions
2020-06-07 10:38 Bart Broersma Note Added: 0123292
2020-06-07 11:22 Bart Broersma Note Added: 0123296
2020-06-07 11:38 Bart Broersma Note Edited: 0123296 View Revisions
2020-06-07 12:02 Alfred Note Added: 0123299
2020-06-07 12:05 Bart Broersma Note Added: 0123300
2020-06-07 12:06 Alfred Note Edited: 0123299 View Revisions
2020-06-07 12:11 Bart Broersma Note Added: 0123301
2020-06-07 12:11 Bart Broersma File Added: sample.zip
2020-06-07 12:18 Bart Broersma Note Added: 0123303
2020-06-07 12:18 Bart Broersma File Added: test_fail.s
2020-06-07 12:18 Bart Broersma File Added: test_ok.s
2020-06-07 12:19 Bart Broersma Note Edited: 0123303 View Revisions
2020-06-07 12:22 Bart Broersma Note Edited: 0123301 View Revisions
2020-06-07 12:23 Bart Broersma Note Edited: 0123301 View Revisions
2020-06-07 16:13 Bart Broersma Note Added: 0123306
2020-06-07 16:13 Bart Broersma File Added: tw0037034.pp
2020-06-08 21:09 Florian Note Added: 0123344
2020-06-12 23:09 Bart Broersma Note Added: 0123408
2020-06-13 06:29 jwharton Note Added: 0123411
2020-06-13 08:52 Thaddy de Koning Note Added: 0123412
2020-06-13 08:53 Thaddy de Koning Note Edited: 0123412 View Revisions
2020-06-13 10:08 Sven Barth Note Added: 0123413
2020-06-13 18:34 Bart Broersma Note Added: 0123415
2020-06-13 18:36 Bart Broersma Note Added: 0123416
2020-06-13 19:28 Sven Barth Note Added: 0123417
2020-06-13 22:58 jwharton Note Added: 0123420
2020-06-13 23:07 Bart Broersma Note Added: 0123421
2020-06-14 01:42 jwharton Note Added: 0123424
2020-06-14 22:00 Bart Broersma Note Added: 0123437
2020-06-14 22:14 Bart Broersma Note Edited: 0123437 View Revisions
2020-06-16 04:09 jwharton Note Added: 0123448
2020-06-20 13:12 zoltanleo Note Added: 0123481
2020-06-20 13:12 zoltanleo File Added: lazmngr_getexeext.patch
2020-06-20 13:26 zoltanleo Note Edited: 0123481 View Revisions
2020-06-20 13:38 zoltanleo Note Edited: 0123481 View Revisions
2020-06-20 13:42 Bi0T1N Note Added: 0123483
2020-06-20 13:43 Bi0T1N Note Edited: 0123483 View Revisions