Crashing on x64 execution

General FreeBASIC programming questions.
UEZ
Posts: 586
Joined: May 05, 2017 19:59
Location: Germany

Crashing on x64 execution

Postby UEZ » Jul 09, 2020 19:49

Can somebody tell me why this code crashes when compiling and executing it as x64?

Code: Select all

Dim Shared As Boolean bSound = True

#Ifdef __FB_WIN32__
   If bSound Then
      Dim As String aSoundFiles(0 To ...) = {"Test1", "Test2", "Test3"}
      ? "Test"
   End If
#Endif

? "End"
Sleep


With x86 it works properly.

Edit:
Using

Code: Select all

FreeBASIC Compiler - Version 1.08.0 (2020-04-30), built for win64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target:       win64, x86-64, 64bit
backend:      gcc

which seems to be buggy...

Code: Select all

FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target:       win64, x86-64, 64bit

works properly.
dodicat
Posts: 6557
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Crashing on x64 execution

Postby dodicat » Jul 09, 2020 20:14

OK here 64 and 32 bit compiler
compiling . . .
Success ( 0.8300442999461666 seconds)

FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
-gen gcc -Wc -O3


compiling . . .
Success ( 0.5713402000255883 seconds)

FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
-gen gcc -Wc -O3

I don't know anything about
Version 1.08.0 (2020-04-30), built for win64 (64bit)

Is it a tester for the next official download?
Where did you get it?
srvaldez
Posts: 2464
Joined: Sep 25, 2005 21:54

Re: Crashing on x64 execution

Postby srvaldez » Jul 09, 2020 20:25

try: Dim As String aSoundFiles(0 To 2)
UEZ
Posts: 586
Joined: May 05, 2017 19:59
Location: Germany

Re: Crashing on x64 execution

Postby UEZ » Jul 09, 2020 20:50

dodicat wrote:Is it a tester for the next official download?
Where did you get it?

I cannot remember where I got this version. In the last weeks I did so many changes to the folder. ^^ Probably from srvaldez or St_W.

srvaldez wrote:try: Dim As String aSoundFiles(0 To 2)

Same result - crashing.
MrSwiss
Posts: 3542
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Crashing on x64 execution

Postby MrSwiss » Jul 09, 2020 20:55

FreeBASIC Compiler - Version 1.08.0 (2020-04-30), built for win64 (64bit)
Where does that originate from?

The last build from St_W is: Version 1.08.0 (2020-01-12), built for win64 (64bit)
This works without any problems ...
fxm
Posts: 9720
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Crashing on x64 execution

Postby fxm » Jul 09, 2020 21:02

Do you use some gcc options when compiling?
(what is the gcc version of your fbc build?)
UEZ
Posts: 586
Joined: May 05, 2017 19:59
Location: Germany

Re: Crashing on x64 execution

Postby UEZ » Jul 09, 2020 21:08

MrSwiss wrote:
FreeBASIC Compiler - Version 1.08.0 (2020-04-30), built for win64 (64bit)
Where does that originate from?

The last build from St_W is: Version 1.08.0 (2020-01-12), built for win64 (64bit)
This works without any problems ...

As already written above, I cannot remember.

Anyhow, I replaced the fbc.exe with the latest St_W build and it still crashed. I copied the whole content from the zip archive to my Freebasic folder then it worked properly. I assume that also some files within the folders didn't work properly.
UEZ
Posts: 586
Joined: May 05, 2017 19:59
Location: Germany

Re: Crashing on x64 execution

Postby UEZ » Jul 09, 2020 21:09

fxm wrote:Do you use some gcc options when compiling?
(what is the gcc version of your fbc build?)

No gcc, just default compiler options.

Problem was probably playing around with different FB tool chains version and mixing up things...
TeeEmCee
Posts: 297
Joined: Jul 22, 2006 0:54
Location: Auckland

Re: Crashing on x64 execution

Postby TeeEmCee » Jul 13, 2020 0:58

Yes, the recent change to array descriptors will cause crashes like this if you mix fbc.exe and libfb.a from different compiler versions, although usually ABI changes to the runtime are rare and you get away with doing it.

Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests