* * *

Author Topic: FPC IDE  (Read 3387 times)

macrillo

  • New member
  • *
  • Posts: 18
FPC IDE
« on: September 02, 2016, 10:24:22 pm »
First of all, I get this forum is mostly about Lazarus but as it's linked as the only forum ( and best ) for questions about the fpc compiler and package overall, I wonder why there isnt't
a section dealing with the builtin IDE ?

I've been using fpc for almost 10 years ( whith the standard IDE as I come from BP ), using Delphi compatible switch and have been able to convert and compile all my code from the schoolage and developing new programs whit windows compatability using DirectX and so on
and I've grown custom to fpc. Fpc, the built in Borland like IDE i'm used to. From what I understand from Reading posts here, most of you don't use it anymore but using Lazarus instead.

I like the old IDE but I can't find much information here when it doesn't work.
For me it worked flawlessly up until v 2.6.0 , after that it would sporadicly hang and so on, wouldn't compile ( actually this was due to a compiler switch I didn't realized was needed from v 2.6.0 ) but even then the IDE wasn't stable. I kept using my last stable version 2.4.1.

Last week I did a complete cleanout of all existing versions of fpc and reistalled v3.0.0 to a different drive and set up a new environment ( whith paths and everything, Win 7 ) and tried
to compile something, it worked ( after ofcourse recompiling some units etc ... ). After playing around for an hour or so the IDE started to just hang when editing text, restarting trying again resulted in the same situation, compiling, get error, go to error, change ... Hang. Tried opening the file BEFORE compiling, OK, try to change, HANG. Got tired and let it be. Today I got a Little bit
closer to get it to compile as it didn't hang the ide as I was changing the code but that didn't last wery long, nw as soon as I open the ide and tries to open any file (.pas or .ini ) via the menues the IDE crasches with ' RTE 215 ' error code.

Is there anyone who knows why this is ? Or how I can get past this since I last week uninstalled and deleted all my old installations of fpc in hope that this would help ( I have a freind who downloaded fpc 3.0.0 for the first time and he doesn't run into theese problems.( same version of win 7)).

My own speculation is that since ver 2.6.0 fpc uses Registry values to store things like fpc.ini and other paths to important files, that isn't working. For example can't  I add helpfiles ... If I add the toc, some abritary helpfile and so on, it works in this session, choose save fpc.ini, Close fpc, reopen it, no helpfiles ??? what happened to the ini file ? seek up the ini file manually , edit it, no change. It seems fpc reads the ini file from different places depending on startups. And yes, I have triad as I stated above to manually load an ini file but the IDE won't let me, crashes.

All and any help is apressiated since I love pascal and fpc is the one i've found best suits my needs. I don't think this is a compiler issue at all but a IDE issue.
« Last Edit: September 02, 2016, 10:36:26 pm by macrillo »

bee

  • Sr. Member
  • ****
  • Posts: 307
Re: FPC IDE
« Reply #1 on: September 03, 2016, 04:41:02 am »
Is there anyone who knows why this is?
Sorry, I can't help you on this. It's been a very looong time since the last time I seriously used the FPC's text-mode IDE. It's 2016 now… perhaps you should try to use modern IDE, you know, like Lazarus. The graphical modern IDE offers many more things and features that should be able help you code faster and better. Give it a try. :)
-Bee-

A long time pascal lover.

molly

  • Hero Member
  • *****
  • Posts: 1960
Re: FPC IDE
« Reply #2 on: September 03, 2016, 05:30:49 am »
macrillo wrote:
First of all, I get this forum is mostly about Lazarus but as it's linked as the only forum ( and best ) for questions about the fpc compiler and package overall, I wonder why there isnt't
a section dealing with the builtin IDE ?
Perhaps a closer look reveals (also) to you that there is indeed a special section dedicated to the text-mode ide. It can be found here

Common issues with textmode ide/windows
- spaces in paths/filenames
- anti-virus software
- damaged file-system

Although your description is appreciated, there is unfortunately no reproducable method listed in there (unless i have overlooked something). It is very hard to debug such issues when things are not 100% reproducable.

Quote
.... choose save fpc.ini, Close fpc, reopen it, no helpfiles ??? what happened to the ini file ?
There is no fpc.ini. fp-ide uses fp.ini.

The configuration file location of fp-ide is configurable (or at least used to be) but, i also have issues with it in that it keeps defaulting back to C:\Document and Settings\user name\Application Data\fp\fp.ini and it is something which i personally find highly annoying. Make one mistake and your fp-ide desktop settings also end up there, and unfortunately seem to override other configuration files (in case you have any). It is a nightmare when having multiple installations of Free Pascal  :'(

So, i would advise to start there and see if that is the case for you as well (and that you are perhaps trying to adjust the 'wrong' configuration file(s)).


...like Lazarus. The graphical modern IDE offers many more things and features that should be able help you code faster and better
Although i agree that using a modern IDE, based on available desktop GUI's could make life much easier for some, this does not always have to be the case everyone.

There is nothing simpler, quicker and easier then having a linux prompt and be able to type fp in order to start coding. In fact, when starting on a new platform it is the first things i attempt to do (after compiling from prompt).

Handoko

  • Hero Member
  • *****
  • Posts: 1730
  • My goal: build my own game engine using Lazarus
Re: FPC IDE
« Reply #3 on: September 03, 2016, 05:46:01 am »
For me it worked flawlessly up until v 2.6.0 , after that it would sporadicly hang and so on, wouldn't compile ( actually this was due to a compiler switch I didn't realized was needed from v 2.6.0 ) but even then the IDE wasn't stable. I kept using my last stable version 2.4.1.

That's strange. Stability issue is a serious bug that should have been reported. You may help to report it and it may be fixed in the next releases. More info about reporting bug can be found here:
http://wiki.freepascal.org/How_do_I_create_a_bug_report

As I do not use FPC directly, nothing much I can say. Have to try to make sure your computer is virus-free? It could be the thing that causes hangs on your computer. There are 2 free antivirus that I recommend to my friends:
https://www.malwarebytes.com/
https://www.avast.com/free-antivirus-download

As suggested by bee, you really should give Lazarus at least a try. You may feel not comfortable at the beginning, but usually you will be more productive after you're familiar with Lazarus, especially when designing and building GUI programs. For me, the visual form design and the tools on the IDE make me easier to build Android apps.
« Last Edit: September 03, 2016, 05:53:02 am by Handoko »

Thaddy

  • Hero Member
  • *****
  • Posts: 4638
Re: FPC IDE
« Reply #4 on: September 03, 2016, 07:55:15 am »
I don't think it is an IDE issue, because then it would be reported on the bug tracker.
Note that the FPC ide has a built-in compiler, so it may be a compiler issue.
The error shown is an arithmatic overflow error, which seems to indicate to me that it IS a compiler issue or simply bad sourcecode.
Since 2.4.1 there have been many language changes, including breaking language changes (not many, but still)

The configuration issues are a different story. I suspect that there are left-overs from previous install(s).
Again, although there are open issues for the FPC ide on the bug tracker, none of them seem related to your problems.
But if it is reproducable, please record the steps to reproduce and file a bug report against the Textmode IDE on the bug-tracker.

Very important: Note that if you use the 2.4.1 ide or the 2.6.0 ide you are also using the 2.4.1 resp. 2.6.0 COMPILER, i.e. an old compiler and not the compiler shown on the screenshot, because that is the fpc 3.0 ide which is linked to the 3.0 compiler. Again, the compilers are built into the textmode ide, the ide does nott use an external compiler.

Note you seem to mix and match textmode ide's That is a VERY bad idea since the formats of their resp. fp.cfg are definitely NOT compatible because of new  features. You have to be VERY careful with multiple installations. If you open an fp.cfg from anewer version in an older one or the other way around it WILL get damaged. That's probably the case with the help files.
« Last Edit: September 03, 2016, 07:59:10 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Graeme

  • Hero Member
  • *****
  • Posts: 1414
    • Graeme on the web
Re: FPC IDE
« Reply #5 on: September 03, 2016, 09:37:09 am »
It's 2016 now… perhaps you should try to use modern IDE, you know, like Lazarus.
If you don't have anything useful to contribute to the discussion, then why reply. Just because it is a text (console) application doesn't make it less useful or less modern than Lazarus. You try and tell that to the millions of VI, EMACS etc users that their text editor isn't as good as Notepad, because as per your rules, NotePad is a GUI app, so must be better.   %)  I still use a ton of console applications, in addition to a ton of GUI applications. There is a place for both even in 2016.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

macrillo

  • New member
  • *
  • Posts: 18
Re: FPC IDE
« Reply #6 on: September 03, 2016, 10:37:21 am »
Thank you all for answering me trying to help. I do Think this is a local problem with my installation. I closed down my antivirus ( eset NOD 32 ) or actually the realtime filesystem protection, and voila.

Now I can open files and compiling without the IDE crashing on me,but it doesn't keep settings
between sessions. Like which mode to compile in ( normal,debug ) and various compiler settings in these modes. This is most likely something interfering with access to the filesystem.

I will keep trying to figure thisone out.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5825
Re: FPC IDE
« Reply #7 on: September 03, 2016, 10:42:09 am »
Afaik there have been more reports about .dsk file corruption by heavy IDE users over the years, so it might be a real issue. But they have in common that they are all vague and with varying and complex installs, a good reproduction to be able to actively debug is failing from all the reports.

This is differing in the sense that it doesn't require to delete/replace files to get the IDE going again

It is btw a good general principle to exclude all development tool directories from antivirus software.
« Last Edit: September 03, 2016, 10:44:17 am by marcov »

Thaddy

  • Hero Member
  • *****
  • Posts: 4638
Re: FPC IDE
« Reply #8 on: September 03, 2016, 10:46:33 am »
@Marco
I experienced the same issues, specifically some time after Pierre's path fixes.
It turned out that configuration files get screwed up, so I changed my install habits when using multiple FPC ide versions.
So when using a textmode ide from before that patch and after that patch you WILL run into trouble if you are not careful with your paths.

It is indeed a real issue, but not something that seems fixable, since the format changed. Which is documented and legal of course.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

macrillo

  • New member
  • *
  • Posts: 18
Re: FPC IDE
« Reply #9 on: March 25, 2017, 09:38:49 am »
AND we are back at Square one    :(

Since my initial post and the fix ( Disable my Antivirus ESET NOD 32 filesystem check whatever ... ) which did the trick last time, Iv'e been happily coding away for almost half a year. I've gotten a new computer and have installed fpc there also, working fine as far as I can tell. My old computer I thought could serve as a backup or fileserver or whatever ( stage server, wm server or something usefull). So I Went ahead and deleted all of my fpc installations on this machine ( expecting I would not use it for much longer ). As it has turned out I have had to wait for components for my new computer and so on so i decided to reinstall the latest verion of fpc to this computer.

I get the exact same problems ???
The IDE is shutting down on me whit exitcode 215
The file loaded in the IDE works when compiling ( even complains when referencing files or includes that are not in scope ( as u expect it should )) but when you are trying to open (or save) another file the IDE just shutdowns.

This happens on any file, even trying to open the fp.ini file in Options/Open ???
I have unistalled ESET NOD32( as this was the source of interferance with my last problem ) but it doesn't help. I get the same problems.

This feels like a 'windows access rights' problem moore than a problem with the IDE itself. When first installed there is no problem opening a file and compiling it ( yes, setting output directories and making sure your dependancies directories are setup correctly also ... :) ).

When I later on try to open Another file, it is then the IDE starts crashing on me.
Never the first file i open after installation or even the first time it is run at all, but after my program have exited with an error, or i have aborted the execution.

So I can compile and make changes to the curren program loaded into the IDE, compile it OK, run it OK, but not save it. All filesystem actions makes the IDE crash, but as I have tried this with Antivirus software unistalled ( and ofcourse restart of windows ) I have no Idea what is going on.

Hope any of you have had similar problems and can give me a solution.





 

Thaddy

  • Hero Member
  • *****
  • Posts: 4638
Re: FPC IDE
« Reply #10 on: March 25, 2017, 10:15:30 am »
Probably nothing to do with ESET indeed.
Do you have the same versions of FPC installed on both computers?
Because then you can run into the compatibility problems I mentioned earlier if you copy over .cfg files.
Or access the files over a network share.
Can you give us both versions?
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

macrillo

  • New member
  • *
  • Posts: 18
Re: FPC IDE
« Reply #11 on: March 25, 2017, 10:30:53 am »
Yes and no, theese are both standalone installations ver 1.0.12  ( though using compiler virsion 3.0.0 and as is relevant in this case version 3.0.2

On my new computer I have the older version ( 3.0.0 ) of the compiler
and theese computer do not share any network or otherwise connected resources.

But I have an exact replica of my pascal source folder on both computers ( different drive also ).


Thaddy

  • Hero Member
  • *****
  • Posts: 4638
Re: FPC IDE
« Reply #12 on: March 25, 2017, 11:31:18 am »
Well, there we have it:
If you have an exact replica of your Pascal folders it is highly likely you also have an exact replica of fpc.cfg files.
And these are likely not compatible between 3.0.0 and 3.0.2. If Pierre's changes were back-ported into the 3.0.2 release, that is.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5825
Re: FPC IDE
« Reply #13 on: March 25, 2017, 11:37:59 am »
If you have a newer Windows version (8-10), did you exclude the relevant directories in Windows Defender?

That gets automatically enabled after uninstalling the old avirus.

macrillo

  • New member
  • *
  • Posts: 18
Re: FPC IDE
« Reply #14 on: March 25, 2017, 01:47:33 pm »
no, same version of windows ( same key actually ).

But I Think this is a Malvare/Overprotective software issue ....
I noticed this when I commented a line with  //  F**k and the IDE shut down !!!!
This I have reproduces with comment lines containing normal comments and space and tabs and whatsoever ... when i ad the Word f**k , it dies ( the IDE) something is listening and interfrering seiously with my installation. I thoght by disabeling ESET NOD 32 antivirus, like the last time, I could still be using the program. But as I stated earlier, Iv'e tried a fresh install whihout antivirus active ( uninstalled actually ).

I can create a new text(.txt) documnt on my desktop and write "f**k" in it,
but as soon I write "//...  whatever ...  "f**k" in the IDE it shutdowns, no warnings, no errorcodes, nothing ...

Loading from other paths doesn't work until u restart and recompile Project ( fixed path like"C:\pascalfiles\testfile.mp3") works fine, changing to "testfile2.mp3" gets  291 error "coulden't open file" error. Actualla I get multiple errors so don't Think the 291 is the key, the promblem seem to be that 'something' is interacting with FPC behavior,
foremost what it is allowed to do ( create file, directory ... normal credentials and so on )
but what about the 'text sniffing behavior' ???

How can I be allowe to write 'F**k' in a normal textdokument ( *.txt ) but as soon as I enter theses characters somehow in a line whith commented code, the IDE hangs end exit, whitout no warning or explanaition ? If u know of a good ( free ) screen capturing tool I can show u, for me this it hard to beleive,I can only guess how this sounds to you ...





 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus