Author Topic: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault  (Read 4426 times)

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #15 on: November 09, 2023, 11:54:08 am »
The plugin is unable to find the images, hence the exceptions.

Does codecompletion.zip contain 50 SVG files in the images\svg folder?. I refer to the file in the 'share\Codeblocks' folder near the executable.

Thanks for the GDB report, I have just commited a fix for that exception, see r13391. If you update to current trunk the CodeCompletion plugin should work (or give a new exception).

Offline manugoswami

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #16 on: November 10, 2023, 04:44:40 am »
Hi,

Many Thanks. This worked and all plugins of codeblocks are enabled

2 problems remain. First is several image files are not loaded (one line i have mentioned below complete log is in attachment), and Second when i tried to build on another computer this line fails

zip -jq9 devel32_64\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc"



Code
cbLoadBitmapBundleFromSVG: Cannot load 'D:\ons_codeblocks_msys\ons_codeblocks_2003_svn_master\src\output32_64\share\codeblocks/resources.zip#zip:/images/svg/dbgstepi.svg'

Kind regards,
Manu


Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #17 on: November 10, 2023, 12:03:55 pm »
Looks like all images fail to load, That is a problem in your side, I still suspect of zip.exe not being found. Verify the zip files under output32_64\share\codeblocks are there (for example resources.zip) and have valid images in the svg folder.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #18 on: November 10, 2023, 03:44:07 pm »
Looks like all images fail to load, That is a problem in your side, I still suspect of zip.exe not being found. Verify the zip files under output32_64\share\codeblocks are there (for example resources.zip) and have valid images in the svg folder.

If the all zip files are missing, then verify you have a good zip command in the PATH.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline manugoswami

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #19 on: November 10, 2023, 05:29:54 pm »
Hi,

Many thanks again for the reply. I am getting confused regarding setting zip file and its path. on 2nd computer i have set the path of zip.exe in environment variables.(path to C:\ons_msys64\usr\bin\zip.exe) and on running zip.exe i get below message. I dont know if this is the correct zip.exe. Build gets stuck up on 2nd computer at this level even when both computers have same zip.exe. Kindly help to resolve this. (zip.exe backslash problem)


Code
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th 2008). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete OS files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -y   store symbolic links as the link instead of the referenced file
  -e   encrypt                      -n   don't compress these suffixes
  -h2  show more help

Code
zip -jq9 devel32_64\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc
cmd /c "cd sdk\resources & zip -0 -q ..\..\devel32_64\share\CodeBlocks\manager_resources.zip images\*.png images\8x8\*.png images\10x10\*.png images\12x12\*.png images\16x16\*.png images\20x20\*.png images\24x24\*.png images\28x28\*.png images\32x32\*.png images\40x40\*.png images\48x48\*.png images\56x56\*.png images\64x64\*.png images\svg\*.svg"
zip error: Nothing to do! (devel32_64\share\CodeBlocks\manager_resources.zip)


Kind regards,
manu
« Last Edit: November 10, 2023, 05:31:36 pm by manugoswami »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #20 on: November 10, 2023, 05:54:13 pm »
When zip says "Nothing to do" means "I did not find any file to compress". Check if this files
Code
images\*.png images\8x8\*.png images\10x10\*.png images\12x12\*.png images\16x16\*.png images\20x20\*.png images\24x24\*.png images\28x28\*.png images\32x32\*.png images\40x40\*.png images\48x48\*.png images\56x56\*.png images\64x64\*.png images\svg\*.svg
are in src\sdk\resources. My 'images' folder contains 69 files and 13 folders.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #21 on: November 10, 2023, 06:01:48 pm »
When zip says "Nothing to do" means "I did not find any file to compress". Check if this files
Code
images\*.png images\8x8\*.png images\10x10\*.png images\12x12\*.png images\16x16\*.png images\20x20\*.png images\24x24\*.png images\28x28\*.png images\32x32\*.png images\40x40\*.png images\48x48\*.png images\56x56\*.png images\64x64\*.png images\svg\*.svg
are in src\sdk\resources. My 'images' folder contains 69 files and 13 folders.

I think I had this problem when using a bad zip command; example the zip command from MSys2 had an issue like this.
Edit: The MSys2 zip expects to be ran under sh.exe instead of cmd.exe; therefore it has issuses with backslash and wildcards "\*".

Tim S.
« Last Edit: November 10, 2023, 06:04:02 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline manugoswami

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #22 on: November 10, 2023, 06:10:39 pm »
Hi,

Many Many thanks for your support. I have finally understood and resolved the zip issue though the some images are still not loading.

There need to be TWO versions of gnuwin32 zip.exe on the persons computers. The first is the windows version in C or D drive and second is the gnuwin32 of MSYS2.
The zip of c or d drive should be in PATH but MSYS2 zip.exe should NOT be in path. Everything will work fine then.

codeblocks is a nice IDE. I was very much impressed by emacs-w32 also. Hope we can integrate both and make more wonderful codeblocks  + emacs w32 combined !  8)

Only image problem is remaining.

Kind regards,
Manu

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #23 on: November 10, 2023, 06:13:58 pm »
You must rebuild the whole workspace so the correct zip is called. Afterwards, change to 'src' and run 'update32_64.bat' again.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #24 on: November 10, 2023, 07:04:09 pm »
In my CB toolchain setting additional paths I have this entry first to fix issues with zip.
Code
C:\misctools\zip

The above is where I extracted an zip command that works with cmd.exe.
Edit: The batch file and some CB projects both need a good zip command.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline manugoswami

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #25 on: November 11, 2023, 07:38:06 am »
Hi,

I have rectified the zip issue completely for resources. The correct command is below. Kindly modify your project file accordingly.

in D:\ons_codeblocks_msys\ons_codeblocks_2003_svn_master\src\src\resources
zip -rq resources.zip . -i \*.xrc \*.svg

and in D:\ons_codeblocks_msys\ons_codeblocks_2003_svn_master\src\plugins\codecompletion\resources
zip -rq codecompletion.zip . -i manifest.xml \*.xrc  \*.svg

Now codeblocks build is complete. This issue is closed
Many Thanks again to all for support.


Kind regards,
Manu




Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #26 on: November 11, 2023, 10:09:38 am »
Hi,

I have rectified the zip issue completely for resources. The correct command is below. Kindly modify your project file accordingly.

in D:\ons_codeblocks_msys\ons_codeblocks_2003_svn_master\src\src\resources
zip -rq resources.zip . -i \*.xrc \*.svg

and in D:\ons_codeblocks_msys\ons_codeblocks_2003_svn_master\src\plugins\codecompletion\resources
zip -rq codecompletion.zip . -i manifest.xml \*.xrc  \*.svg

Now codeblocks build is complete. This issue is closed
Many Thanks again to all for support.


Kind regards,
Manu

Please ignore this suggestion; the user is likely still using the bad zip command from MSys2.

Tim S.
« Last Edit: November 11, 2023, 10:17:02 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline manugoswami

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #27 on: November 11, 2023, 10:19:05 am »
Hi Tim,

Kindly share meaning of bad zip command as it is standard msys2 and gnuwin32 zip exes.

Kindly regards,
Manu

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code Blocks -- Mingw64 - run error -- CodeComSegmentation fault
« Reply #28 on: November 11, 2023, 10:24:22 am »
Hi Tim,

Kindly share meaning of bad zip command as it is standard msys2 and gnuwin32 zip exes.

Kindly regards,
Manu

The project works for several people that does not have MSys2 installed; it works for me with MSys2 installed; but, I have the path to a good zip in the CB toolchain setting as I already posted.

If the update batch is having zip problem you need to make sure the good zip is in the PATH of the cmd.exe
If CB is having problems with zips then you need to add the path to the zip command to the toolchain additional paths.
Edit: Link CB Wiki likely where I got my zip command https://wiki.codeblocks.org/index.php/MinGW_installation#ZIP

Tim S.
« Last Edit: November 11, 2023, 10:27:49 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org