Compiler constant exists multiple times

Post bugs related to the IDE here
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Compiler constant exists multiple times

Post by uwekel »

Hi,

today i noticed that the compiler constant, which i declared recently, was stored at the end of the document for multiple times. It looked like this:

Code: Select all

; IDE Options = PureBasic 4.61 Beta 1 (Linux - x64)
; CursorPosition = 894
; FirstLine = 153
; Folding = AAAAwBA9
; EnableXP
; CPU = 5
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
...
I wouldn't have noticed it if the IDE wouln't crashed at startup. Only by renaming the sourcecode folder I was able to start the IDE again. The error was caused by the autoload of the related document. I am not sure whether it is a specific Linux problem. After removing the surplus lines, the document could be loaded and the IDE did not crash again.

I am using the same source code on Linux and Windows. The compiler constant is used to execute some codelines if a modul runs by itself (#Self=1), but not, if it is embedded in a project (#Self=0).

Best regards,
Uwe
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: Compiler constant exists multiple times

Post by uwekel »

Hi,

you can even see it at the compiler options dialog:
Image

Best regards
Uwe
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: Compiler constant exists multiple times

Post by uwekel »

Hi,

Today i found out that this wrong behaviour happens if the code was handed over to a user tool and reloaded after the tool has finished. The plugin is a self-written one and does not generates the duplicate lines. The problem does also occur on Windows.

Best regards
Uwe
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
Post Reply