News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#21
Bug reports / Re: Debugging code that calls ...
Last post by DMac - August 18, 2025, 07:03:27 PM
Hi John,

I'm on 22H2 also.  However this machine is a work laptop.  There are things IT has configured or are running on it that could perhaps contribute to the problem.  I'll try the test on my home pc and see if I get the same results or if, like Timo, see some strange behavior after several tries.



#22
Bug reports / Re: Debugging code that calls ...
Last post by TimoVJL - August 18, 2025, 09:14:20 AM
In Windows 7 it didn't hang, but trying to open file dialog again, strange behavior  :(
#23
Bug reports / Re: Debugging code that calls ...
Last post by John Z - August 18, 2025, 08:45:54 AM
Hi DMac,

Well so far I've tested the 64 bit version, it worked both with and without debug and I saw no issue.
I did a clean and rebuild and it was the same.

For 32 bit the first run did get a debug error but just cleared it and no system or IDE issue.
I did a clean and rebuild and it worked both in debug and release modes without any issue.

I'm on Windows 23H2 and Pelles C v13  - but I think it is not relevant.
Looks like (so far) you perhaps have some other issue affecting your system/build

I'll try a few more runs, but all looks good so far.  Definitely no IDE hang, reboot, or re-install of Pelles C.

Don't know if this is exactly good news for you - -

John Z

One thing to note, I did not use the workspace - ? Could that have an impact ?
#24
Bug reports / Re: Debugging code that calls ...
Last post by John Z - August 18, 2025, 07:38:01 AM
Hi DMac,

I'll grab it look it over and possibly try.  I use GetOpenFileName() extensively in my programs, under all versions of Pelle and Windows.  Haven't see a problem, maybe some interaction.  Could be interesting but frustrating .... Perhaps I'll add your debug mode to one of my programs first....

John Z

My reply form is missing those smileys for some reason, the 'don't use option' is unchecked too.
Anyone else or just my Firefox?
#25
Bug reports / Debugging code that calls GetO...
Last post by DMac - August 18, 2025, 01:19:53 AM
While debugging code in POIDE v13 a call to GetOpenFileName() caused the application I was debugging to freeze.  Attempting to close the debugger when this happens mostly does not work, Task manager fails to work properly, and the only way to close the application and POIDE is to shut down the computer and reboot.

After reboot the POIDE open file dialog may not work, necessitating a reinstall of the IDE.

I have attached a test project to recreate this scenario.  I recommend testing this on a PC that does not contain critical data because of the ornery nature of the failure.

GetOpenFileName() does not cause lockups when compiled to Release.

Tested on Windows 10 Professional.
#26
Beginner questions / Re: HRSRC returned by FindReso...
Last post by DMac - August 17, 2025, 04:36:56 AM
Thanks for the example test project Timo.

After testing and looking at the code and comparing it to mine.  I began to suspect that the issue was was possibly related to my use of VLAs.  I tried debugging with optimizations off and the access violation would happen further down in the code.  I then swapped in your example code and it performed correctly even with optimizations on. 

Moving on to the next perplexing bug...

--DMac

#27
Beginner questions / Re: HRSRC returned by FindReso...
Last post by TimoVJL - August 16, 2025, 01:23:19 PM
A test with Windows 7
#28
Beginner questions / Re: HRSRC returned by FindReso...
Last post by Marco - August 16, 2025, 10:53:15 AM
Hi DMac,

I tried running your code on my PC and didn't encounter any errors. Pelles C (v13) compiled and ran the application test without any issues. I tried all the possible optimisation options. Perhaps the problem lies elsewhere in the code and is affecting that instruction somehow.

Have you also tried using the 'FindResourceEx' function?

Marco
#29
Beginner questions / HRSRC returned by FindResource...
Last post by DMac - August 16, 2025, 05:20:47 AM
I have an application that I am updating with the latest Pelles C (version 13).

Unfortunately my GetVersionInfo() function does not work when compiled with version 13.

HRSRC hVersion = FindResource(GetModuleHandle(NULL), MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);

    if (hVersion != NULL) //<-- This line causes an Access Violation

In my Resource file I have the following:

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,2,0
PRODUCTVERSION 1,3,2,0
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
{
  BLOCK "StringFileInfo"
  {
    BLOCK "040904B0"
    {
      VALUE "FileVersion", "1.3.2.0\0"
      VALUE "LegalCopyright", "2014 - 2025\0"
      VALUE "ProductName", "Instrument Snapshot\0"
      VALUE "ProductVersion", "1.3.2.0\0"
    }
  }
  BLOCK "VarFileInfo"
  {
    VALUE "Translation", 0x409, 0x4B0
  }
}

So I know it's there.  Has anyone encountered this?  I guess something has changed but I have no idea what.
Does anyone know of another way to get the version info?

--DMAC
#30
User contributions / Re: Treeview control with drag...
Last post by Vortex - August 10, 2025, 08:36:25 PM
Hi Fred,

Great job, thanks for sharing.