NO

Author Topic: Strange problem with the IDE  (Read 7394 times)

Offline CProgrammer

  • Member
  • *
  • Posts: 8
Strange problem with the IDE
« on: June 30, 2023, 03:15:41 PM »
I have a strange problem with the code in the attached file.

If I start a new project in Pelle's IDE and add the two files TryIt.c and TryIt.rc to the project by selecting "Add files to project" from the "Project menu" then I can build an EXE file that runs as expected.

When I close the IDE and then run the project by double clicking on the .ppj file created by the above procedure, the IDE opens, but then when I try to build the EXE file the IDE crashes.

The crash file @@@FD60.tmp is blank.

Experimenting further, I found that if I close the IDE and delete the output folder, the .tag file, the .ppx file and the .exe file produced when building the program then

 - When I open the IDE,  open the project and build it then the .exe file compiles correctly
 
 or
 
 - If I double click on the project file to build it the IDE crashes.

How can I prevent the IDE from crashing? I am using Windows 11.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Strange problem with the IDE
« Reply #1 on: June 30, 2023, 05:09:18 PM »
It works for me. I'm on WIN10, but I don't think that it is an OS problem.
The issue happens for any project or for this one only?
Try to completely remove and reinstall PellesC as first try.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline CProgrammer

  • Member
  • *
  • Posts: 8
Re: Strange problem with the IDE
« Reply #2 on: July 01, 2023, 09:42:34 AM »
@frankie:

The problem seems to exist for this code only - I have some old programs that I wrote in Pelles C several years ago and they compile correctly.
I reinstalled Pelles C but this did not solve the problem.

Offline Robert

  • Member
  • *
  • Posts: 247
Re: Strange problem with the IDE
« Reply #3 on: July 01, 2023, 11:29:00 AM »
I have a strange problem with the code in the attached file.

If I start a new project in Pelle's IDE and add the two files TryIt.c and TryIt.rc to the project by selecting "Add files to project" from the "Project menu" then I can build an EXE file that runs as expected.

When I close the IDE and then run the project by double clicking on the .ppj file created by the above procedure, the IDE opens, but then when I try to build the EXE file the IDE crashes.

The crash file @@@FD60.tmp is blank.

Experimenting further, I found that if I close the IDE and delete the output folder, the .tag file, the .ppx file and the .exe file produced when building the program then

 - When I open the IDE,  open the project and build it then the .exe file compiles correctly
 
 or
 
 - If I double click on the project file to build it the IDE crashes.

How can I prevent the IDE from crashing? I am using Windows 11.

Confirmed. Windows 11.
Default Pelles C 12.0 installation to Program Files.
Project files to C:\Users\Robert\OneDrive\Documents\Pelles C Projects\TryIt
Can't even Clean the project. IDE crashes.

Windows 11 has been, for me, the greatest disappointment in operating systems since I started almost 40 years ago. I wont bother you with the litany of problems. Way beyond irritating.

Bought a new machine just to have Windows 11. An expensive freaking waste of money.

Fedora and OpenSuse run flawlessly on the new machine.

You know where this is heading.


Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Strange problem with the IDE
« Reply #4 on: July 01, 2023, 05:47:00 PM »
Windows 11 has been, for me, the greatest disappointment in operating systems since I started almost 40 years ago. I wont bother you with the litany of problems. Way beyond irritating.
Bought a new machine just to have Windows 11. An expensive freaking waste of money.
Fedora and OpenSuse run flawlessly on the new machine.
You know where this is heading.
That's why I stand with WIN10 and wait, as I made remaining on XP when VISTA appeared and WIN7 when WIN10 just come out.  >:(
The secret is wait for the testers to complete the cycle...  ;)

@CProgrammer I can't help more until I can't have a WIN11 machine at hands, The only suggestion is to check directories and permissions, maybe an issue of this kind...  :(
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Strange problem with the IDE
« Reply #5 on: July 01, 2023, 10:18:57 PM »
Hi CProgrammer,

Can you use the Pelles IDE ZIP feature and post the complete ZIP project so that I've got everything the same?
I'm on Win11 and I'll take a look. I'll try the posted sources and a best guess on the compiler/linker options.

Meanwhile try changing the project files location to something like C:\temp\PellesC\files to see if it helps.

Thanks,
John Z

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Strange problem with the IDE
« Reply #6 on: July 01, 2023, 10:40:41 PM »
Hi CProgrammer,

Did a best guess at settings: WIN 11, Pelles C V 12.002.  Attached is the project for you to test.
It all works OK for me, both methods.

Let me know the results for you.

John Z

PS. I agree WIN 10 was one of the best.  So far I have been quite successful with WIN 11 too, other than the too numerous to mention things one must turn off that MS has on by default.  And after every update they add new things to turn off.  But hey I ran Windows ME version ;( for many years.  :( :( :(

Also still run WIN 7 (very good) and WIN 10 -

Attachment was incomplete, see Roberts version posted below.
« Last Edit: July 03, 2023, 04:09:49 AM by John Z »

Offline Robert

  • Member
  • *
  • Posts: 247
Re: Strange problem with the IDE
« Reply #7 on: July 03, 2023, 02:29:33 AM »
Hi CProgrammer,

Did a best guess at settings: WIN 11, Pelles C V 12.002.  Attached is the project for you to test.
It all works OK for me, both methods.

Let me know the results for you.

John Z

PS. I agree WIN 10 was one of the best.  So far I have been quite successful with WIN 11 too, other than the too numerous to mention things one must turn off that MS has on by default.  And after every update they add new things to turn off.  But hey I ran Windows ME version ;( for many years.  :( :( :(

Also still run WIN 7 (very good) and WIN 10 -

Hi John:

I noticed that you did not include CProgrammer's TryIt.rc and MAINICON.ICO file.

CProgrammer's TryIt.rc file is encoded as UTF-16LE with a BOM.

I converted it to UTF-8 with a BOM and did a 64 bit compile. Seems O.K. now.

Attached is the zipped project.

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Strange problem with the IDE
« Reply #8 on: July 03, 2023, 03:47:06 AM »
Oops, thanks Robert.

Good catch.  I should have been more careful  :(

John Z

P.S. Good to know 64 bit worked also, I just defaulted to 32 bit.
« Last Edit: July 03, 2023, 04:03:45 AM by John Z »

Offline CProgrammer

  • Member
  • *
  • Posts: 8
Re: Strange problem with the IDE
« Reply #9 on: July 03, 2023, 05:26:09 PM »
@John Z and frankie: Apologies for the delay in replying - I had not received an email notification that this thread had another post. Fortunately, the solution posted by Robert works.

Thanks, Robert, your solution did the trick. I'm not sure why the encoding of the *.rc file was incorrect. This file was taken from a c program that I wrote several years ago on an older OS and an older version of Pelles C and I don't recall it having any problems then. I'll have to make sure that I use the correct encoding in future and convert my older resource files accordingly.

EDIT: I've just discovered that some of the settings for the project options in the IDE were set to UTF-16LE and this could be why the resource file used an invalid coding. I've changed these to UTF-8 and this seems to have helped with a new project.



« Last Edit: July 03, 2023, 05:58:43 PM by CProgrammer »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Strange problem with the IDE
« Reply #10 on: July 03, 2023, 06:48:59 PM »
I've just discovered that some of the settings for the project options in the IDE were set to UTF-16LE and this could be why the resource file used an invalid coding. I've changed these to UTF-8 and this seems to have helped with a new project.
This shouldn't cause a problem, moreover you said that it worked for the first compile.  ???
Maybe this is a bug...  :P
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Robert

  • Member
  • *
  • Posts: 247
Re: Strange problem with the IDE
« Reply #11 on: July 03, 2023, 07:34:22 PM »
I've just discovered that some of the settings for the project options in the IDE were set to UTF-16LE and this could be why the resource file used an invalid coding. I've changed these to UTF-8 and this seems to have helped with a new project.
This shouldn't cause a problem, moreover you said that it worked for the first compile.  ???
Maybe this is a bug...  :P

I just loaded the \Samples\Add-Ins\BuildVer project into Pelles C 12.00.2 on Windows 11, converted the buildver.rc file from UTF-8 with a BOM to UTF-16LE with a BOM and the IDE crashed on Build ReBuild or Clean.

Bug ? Yes. Pelles C or Windows 11 ? My guess is Windows 11 because frankie said no problem with Windows 10.


Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Strange problem with the IDE
« Reply #12 on: July 03, 2023, 09:10:30 PM »
I just loaded the \Samples\Add-Ins\BuildVer project into Pelles C 12.00.2 on Windows 11, converted the buildver.rc file from UTF-8 with a BOM to UTF-16LE with a BOM and the IDE crashed on Build ReBuild or Clean.

Bug ? Yes. Pelles C or Windows 11 ? My guess is Windows 11 because frankie said no problem with Windows 10.
Robert I made same checks under WIN10, the problem seems not be present.
Where is the bug, at this point, depends on what Pelle use to open files and handle encoding. If that is done using WINAPI functions the problem is WIN11, if the encoding is handled by Pelle's functions the IDE is buggy (or not WIN11 compliant)...  :P
« Last Edit: July 03, 2023, 09:13:54 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Robert

  • Member
  • *
  • Posts: 247
Re: Strange problem with the IDE
« Reply #13 on: July 03, 2023, 10:34:29 PM »
I just loaded the \Samples\Add-Ins\BuildVer project into Pelles C 12.00.2 on Windows 11, converted the buildver.rc file from UTF-8 with a BOM to UTF-16LE with a BOM and the IDE crashed on Build ReBuild or Clean.

Bug ? Yes. Pelles C or Windows 11 ? My guess is Windows 11 because frankie said no problem with Windows 10.
Robert I made same checks under WIN10, the problem seems not be present.
Where is the bug, at this point, depends on what Pelle use to open files and handle encoding. If that is done using WINAPI functions the problem is WIN11, if the encoding is handled by Pelle's functions the IDE is buggy (or not WIN11 compliant)...  :P

Aha, another twist in the plot. If Pelle changed the opening/encoding between 11 and 12 then it should be easy to figure out. If not, well, you can imagine ???
« Last Edit: July 04, 2023, 12:04:23 AM by Robert »

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Strange problem with the IDE
« Reply #14 on: July 03, 2023, 10:58:35 PM »
Has anyone already compared the .tag, .ppx and maybe also the .ppj files created from the first run (which works without source code mods) to a working run which has the needed UTF change to see what is different?  Since deleting the two files allows it to work again I suspect there maybe clues within the them?

John Z