Recent

Author Topic: how and where  (Read 7701 times)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
how and where
« on: March 29, 2018, 08:51:52 pm »
How do I report a bug in Free Pascal?
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: how and where
« Reply #1 on: March 29, 2018, 08:59:27 pm »
First confirm the bug here. If confirmed then you can use the link on the left side -named bugtracker- to report.

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: how and where
« Reply #2 on: March 29, 2018, 09:02:04 pm »
And confirm the bug isn't already in the bugtracker.

(We will usually try to find it there if you mention it here but it's always best to check yourself too)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: how and where
« Reply #3 on: March 29, 2018, 09:13:18 pm »
First confirm the bug here. If confirmed then you can use the link on the left side -named bugtracker- to report.

What does that mean?

I compile my program and the compiler jumbles my code replacing items in Procedures and Function with label names.

I don't even know how to explain it.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: how and where
« Reply #4 on: March 29, 2018, 09:23:11 pm »
Infection of some kind or a preprocessor gone wrong. As far as I know the compiler does not "write" in the units it compiles. But a picture is worth a thousand words. So a screen grab with before and after might help me see the problem better.

EDIT:
By the way if something that massive pops up then it almost always something else going on, there are a few thousand people compiling with FPC in a daily bases (unless you are using an unstable svn check out instead of a stable release) it is almost impossible to have something as profound as changing code, slip between the cracks.
« Last Edit: March 29, 2018, 09:30:37 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: how and where
« Reply #5 on: March 30, 2018, 05:18:51 am »
Yea; I agree with you.

I'll post a screen shot or the whole project in the after state.

I don't have a before unfortunately. Starting over with what I can salvage. I can zip and post a text file of the units and later if you need the project will zip it also. Take a bit.
« Last Edit: March 30, 2018, 05:41:57 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: allunitstext.txt file of the project
« Reply #6 on: March 30, 2018, 05:40:29 am »
i'm using NotePad++ and at line 1510 the line was changed during compile.

1510  procedure ListingSetup        (Const lbl031 : String);

It original readprocedure ListingSetup        (Const S : String);
 
I know this because I have adopted the standard defining Parms as (S: String) and (I : Integer)

Line 1562
procedure TDspOne.DisplayRecordInfo (N : Integer;    // Single Record
                                     lbl031: Integer;     // Start Position
                                     F : Integer;    // Stop Position
                                     Mode : TOnOff;  // On or Off
                                     R : RecTypes);  // Record Type

lbl031 is the name of a label on a form.

I would have been defined as:

procedure TDspOne.DisplayRecordInfo (N : Integer;    // Single Record
                                     I : Integer;       // Start Position
                                     F : Integer;       // Stop Position
                                     Mode : TOnOff;  // On or Off
                                     R : RecTypes);   // Record Type

line 1792, 1990, 1885,1912, 1926 and a lot more.
I fixed a bunch before I gave up.


 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: how and where
« Reply #7 on: March 30, 2018, 07:33:50 am »
What you're explaining is a serious issue. Did you experience it on the Lazarus IDE or the Free Pascal Compiler? You mentioned you was using NotePad++, did you mean you're not using Lazarus nor FP for typing the code? For you information, Lazarus/FPC has it's own text mode editor, the FP.exe.

What is the Lazarus/FPC version you're using? Did the issue happen more than once? Before you submit a bug report you should collect more info, at least the steps to reproduce the issue.

Maybe you accidentally activated some shortcut keys or coding tools. Please do more tests, and remember always keep backups. Perhaps, you need to run a harddisk scan. Some harddisk issues (like crosslink) may cause weird things to happen.

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: how and where
« Reply #8 on: March 30, 2018, 08:48:36 am »
It is a notepad++ issue. I can not reproduce it with fp, lazarus ide and geany. So file a bug report on notepad++.
But it is indeed a serious issue that the notepad++ guys should know. Nothing to do with FPC or Lazarus.

(Note that notepad++ has more open issues, also with other languages. I gave up and use Geany instead)
« Last Edit: March 30, 2018, 08:55:58 am by Thaddy »
Specialize a type, not a var.

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: how and where
« Reply #9 on: March 30, 2018, 09:11:12 am »
What you're explaining is a serious issue. Did you experience it on the Lazarus IDE or the Free Pascal Compiler? You mentioned you was using NotePad++, did you mean you're not using Lazarus nor FP for typing the code? For you information, Lazarus/FPC has it's own text mode editor, the FP.exe.

What is the Lazarus/FPC version you're using? Did the issue happen more than once? Before you submit a bug report you should collect more info, at least the steps to reproduce the issue.

Maybe you accidentally activated some shortcut keys or coding tools. Please do more tests, and remember always keep backups. Perhaps, you need to run a harddisk scan. Some harddisk issues (like crosslink) may cause weird things to happen.

I was using the Lazarus IDE to build and compile the project.
When it scrambled my code I tried to fix it but it was to much so I selected all with the Edit>Select All and copied each unit to Notepad ++ thinking I could cut and paste some of it.

Did the issue happen more than once?
Yes it has happened before but nothing to this extent.

I ziped it up and posted it starting then I went to Project>New and Application.

Lazarus IDE V 1.8.0

Ok I'll Run Scan.

I think I should upgrade to the 64 bit compiler. I think I'm on the 32 bit.
Is it a big deal to upgrade.
And How do I go about it?
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: how and where
« Reply #10 on: March 30, 2018, 09:16:59 am »
@JLwest

I am trying to replicate this and I can't. (I have time on hand)

If you have self-modifying editors you have a serious problem.
« Last Edit: March 30, 2018, 09:18:49 am by Thaddy »
Specialize a type, not a var.

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: how and where
« Reply #11 on: March 30, 2018, 10:17:11 am »
@JLwest

I am trying to replicate this and I can't. (I have time on hand)

If you have self-modifying editors you have a serious problem.

Say what? I don't know what that is. I just use Lazarus IDE.

I was working on a very long case statement renaming screen labels. That's when it happened.
the Case Statement had over 50 items. The idea being I could call the procedure with a single Integer and turn a label visible or dark. Or a range of numbers with a start to fini and clear or populate a screen. 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: how and where
« Reply #12 on: March 30, 2018, 10:57:29 am »
I was working on a very long case statement renaming screen labels. That's when it happened.
the Case Statement had over 50 items. The idea being I could call the procedure with a single Integer and turn a label visible or dark. Or a range of numbers with a start to fini and clear or populate a screen.
That's VERY important information you left out earlier.

I can imagine that somehow the refactoring mechanism of Lazarus IDE screwed up.
But it could also be that you yourself screwed up somehow with the renaming.

How did you go about the process of renaming those screen labels ??
Did you use search&replace?

Note that if you use search and replace and you have the "Regular expression" box checked, strange things can happen if you're not familiar with regular expressions.

Also, it could still be that renaming a variable with incorrect code afterwards, the refactoring of the code if done incorrectly.
Do you still have the code before changing it? Can you reproduce the steps of changing the large case statement?
« Last Edit: March 30, 2018, 11:00:16 am by rvk »

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: how and where
« Reply #13 on: March 30, 2018, 11:00:09 am »
It is a notepad++ issue. I can not reproduce it with fp, lazarus ide and geany. So file a bug report on notepad++.
But it is indeed a serious issue that the notepad++ guys should know. Nothing to do with FPC or Lazarus.

(Note that notepad++ has more open issues, also with other languages. I gave up and use Geany instead)

Saw What! Boy did you take a wrong turn.

Notepad++ has nothing to do with it. I only turned the .PAS units to text using Notepad++ after the incident.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: how and where
« Reply #14 on: March 30, 2018, 11:09:49 am »
I was working on a very long case statement renaming screen labels. That's when it happened.
the Case Statement had over 50 items. The idea being I could call the procedure with a single Integer and turn a label visible or dark. Or a range of numbers with a start to fini and clear or populate a screen.
That's VERY important information you left out earlier.

I can imagine that somehow the refactoring mechanism of Lazarus IDE screwed up.
But it could also be that you yourself screwed up somehow with the renaming.

How did you go about the process of renaming those screen labels ??
Did you use search&replace?

Note that if you use search and replace and you have the "Regular expression" box checked, strange things can happen if you're not familiar with regular expressions.

Also, it could still be that renaming a variable with incorrect code afterwards, the refactoring of the code if done incorrectly.
Do you still have the code before changing it? Can you reproduce the steps of changing the large case statement?

No not search and replace. The label names were in a case statement.
Case I of
lb0l001 : Result := '01000025';
lbl002  : Result :=  '01000030';
.
.
.
End;

There were about 45 to 50 label name in the case statement.
I needed to renumber the labels so I went into the function and renamed the labels to a, b, c dfr, anything so I wouldn't get duplicate error message. then I went back up and added the label I needed to and started to rename. Compiled and that,s when I got the scrambled code.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

 

TinyPortal © 2005-2018