[Done] How to find the reason for compiler-problems?

Post bugreports for the Windows version here
Cyllceaux
Enthusiast
Enthusiast
Posts: 517
Joined: Mon Jun 23, 2014 1:18 pm

[Done] How to find the reason for compiler-problems?

Post by Cyllceaux »

I receive this error. Is there a compiler-log to check?

I receive this with the ASM Backend and the C-Backend.

Code: Select all

I don't know why, but my

--------------------------------------------------------------------------------
  Erstellen von 'Standard-Ziel'...
--------------------------------------------------------------------------------
Einlesen: SmallDB.pbi
Einlesen: ..\macros.pb
Einlesen: macros.pb
Einlesen: strukturen.pb
Einlesen: declare.pb
Einlesen: global.pb
Der Compiler scheint abgestürzt oder unerwartet beendet worden zu sein. 
Abbruch der Kompilierung...

--------------------------------------------------------------------------------

  1 Ziele mit Fehlern kompiliert.
  Die Erstellungs-Sequenz wurde abgebrochen.
User avatar
Bisonte
Addict
Addict
Posts: 1322
Joined: Tue Oct 09, 2007 2:15 am

Re: How to find the reason for compiler-problems?

Post by Bisonte »

Mostly a Anti-Virus problem...
Try it out if you "stop" your scanner while compiling...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
Cyllceaux
Enthusiast
Enthusiast
Posts: 517
Joined: Mon Jun 23, 2014 1:18 pm

Re: How to find the reason for compiler-problems?

Post by Cyllceaux »

Hi Bisonate... without my AV its the same result. :(
Cyllceaux
Enthusiast
Enthusiast
Posts: 517
Joined: Mon Jun 23, 2014 1:18 pm

Re: How to find the reason for compiler-problems?

Post by Cyllceaux »

HA!!!! I can reproduce it!!!

you need 4 files:
str.pb

Code: Select all

Structure str1
	feld.i
EndStructure

Structure str2
	feld.i
EndStructure
dec.pb

Code: Select all

Declare test1(*t1.str1,*t2.str2)
Declare test2(*t1.str1,*t2.str3)
glob.pb

Code: Select all

Procedure test1(*t1.str1,*t2.str2)
	Debug "OK"
EndProcedure

Procedure test2(*t1.str1,*t2.str3)
	Debug "NOK"
EndProcedure
main.pb

Code: Select all

EnableExplicit


XIncludeFile "str.pb"
XIncludeFile "dec.pb"
XIncludeFile "glob.pb"

test1(0,0)
test2(0,0)

The Problem is declare und procedure test2. They use a non-existing structure.
This breakes the compiler.
Fred
Administrator
Administrator
Posts: 18372
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: How to find the reason for compiler-problems?

Post by Fred »

It should not, I will take a closer look
Axolotl
Addict
Addict
Posts: 885
Joined: Wed Dec 31, 2008 3:36 pm

Re: How to find the reason for compiler-problems?

Post by Axolotl »

Yepp. You don't need separate files.
with 6.30 b2 on Win11 the message box is also displayed.
Not saved, <New.> only

Code: Select all

EnableExplicit

; XIncludeFile "str.pb"
Structure str1
	feld.i
EndStructure

Structure str2
	feld.i
EndStructure

; XIncludeFile "dec.pb"
Declare test1(*t1.str1,*t2.str2)
Declare test2(*t1.str1,*t2.str3)

; XIncludeFile "glob.pb"
Procedure test1(*t1.str1,*t2.str2)
	Debug "OK"
EndProcedure

Procedure test2(*t1.str1,*t2.str3)
	Debug "NOK"
EndProcedure


test1(0,0)
test2(0,0)
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
User avatar
mk-soft
Always Here
Always Here
Posts: 6356
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: How to find the reason for compiler-problems?

Post by mk-soft »

Only on Window crashed

On macOS and Linux the message "Line 14: Structure not found: str3."
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User_Russian
Addict
Addict
Posts: 1600
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: How to find the reason for compiler-problems?

Post by User_Russian »

One line is needed for the crash compiler.

Code: Select all

Declare test2(*t1.point, *t2.struct)
BarryG
Addict
Addict
Posts: 4233
Joined: Thu Apr 18, 2019 8:17 am

Re: How to find the reason for compiler-problems?

Post by BarryG »

User_Russian wrote: Fri Nov 07, 2025 1:13 pm One line is needed for the crash compiler.

Code: Select all

Declare test2(*t1.point, *t2.struct)
On PB 6.10, that one line doesn't crash the compiler but just gives this error:

Code: Select all

---------------------------
PureBasic
---------------------------
Line 1: Structure not found: str3.
---------------------------
OK   
---------------------------
User_Russian
Addict
Addict
Posts: 1600
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: How to find the reason for compiler-problems?

Post by User_Russian »

BarryG, tested in PB 6.30 b4.
BarryG
Addict
Addict
Posts: 4233
Joined: Thu Apr 18, 2019 8:17 am

Re: How to find the reason for compiler-problems?

Post by BarryG »

Yep, just pointing out that the crash is a regression bug, because it doesn't happen with 6.10. ;)
Fred
Administrator
Administrator
Posts: 18372
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: How to find the reason for compiler-problems?

Post by Fred »

Fixed.
Post Reply