Recent Posts

Pages: 1 2 3 4 5 [6] 7 8 9 10
51
Development / Re: Code folding is broken, still
« Last post by oBFusCATed on December 17, 2018, 05:54:02 pm »
What version are you actually using? After the 17.12 and relatively recently there was a rework of the folding. I'm not sure it has fixed your problem, but it will help with the further discussion...
52
Development / Code folding is broken, still
« Last post by deftware on December 17, 2018, 05:44:38 pm »

It seems this has been an issue for quite some time: http://forums.codeblocks.org/index.php?topic=18286.0

This is still happening, 5 years later. If you go into the code folding settings under Settings->Editor->Folding and enable "Fold all on file open" (be sure to enable folding itself at the top as well) and then open a source file it always "Toggles All Folds" instead of actually performing a "Fold All".

Case in point: open a source file, go Edit->Folding->Fold All. See it all folded nice and neat, then close it and re-open it. Now it's all unfolded. Close it and open it again and everything will be folded again!

Worse yet: unfold something, leaving everything else folded and close it. Re-open it and now what you unfolded will be folded while everything else that was already folded will be unfolded again. The "Fold All on Open" actually performs a Edit->Folding->Toggle All, which is the equivalent of pressing Shift+F12 instead of performing an Edit->Folding->Fold All, which is what the name of the option under the editor settings would suggest it's supposed to actually do - and would be vastly more useful than flip-flopping the folding state of everything each time you open a file.

Even if I disable "Fold All on Open" it doesn't even retain the folding state of everything properly, at all. It's constantly folding and unfolding random stuff until it 'settles' on a specific folding configuration when it finally stops toggling random things from being folded. Just having folding enables automatically entails having to deal with random stuff being folded and unfolded all the time - and having "Toggle All" as the only folding-related hotkey is totally useless in this situation.

It would be nice if there was a keyboard shortcut for Fold All because it would be WAY more useful than a "Toggle All" hotkey that just toggles everything - which is pretty useless with the bugs that are in play - but I'll settle for the issue above being fixed as it would make CodeBlocks darn well near perfect as an editor IMO.


53
Help / Re: Building C::B on Arch Linux - assert "image.IsOk()" failed in wxBitmap()
« Last post by BlueHazzard on December 17, 2018, 01:17:02 pm »
Quote
playing around with gdb it seems that C::B is repeatedly trying to access "breakpoint-" related PNG files from the "share/codeblocks/manager_resources.zip" archive - notice that those were some of the UI icons which don't render for me
Does the images exist? Are the paths valid?

Have you tried to kill codeblocks if the Assert dialog pops up with gdb and then go the call stack upwards to see why the image is not valid? You can use codeblocks to debug codeblocks:
Open the Codeblocks workspace, and start the debugger with the red arrow. Then select the "src" target. Codeblocks will open, then you do your things until you get the assert dialog. Hit "Ok" in the assert dialog. The other codeblocks instance should come to front with a call stack in the Debugger->Debugging windows->Call stack (if not make one step with F7 or Debug->One line).
Now you can double click in the stack window to switch to the selected frame. Then you can inspect the variables (specially the img variable) that caused the assert. Check why it is not valid...

I somehow can not reproduce this on mint... Will have to set up arch to investigate this, but i have no time at the moment -.-'
54
You have also to change your system variable path because it certainly contain the "old" path to your previous compiler and not the new one.
More, give this new path a higher priority (place it before the old one), because Windows will choose the first one : dll names are probably the same !
gd_on
55
General (but related to Code::Blocks) / New compiler can compile CodeBlocks won't execute
« Last post by Kat B on December 17, 2018, 06:23:41 am »
Codeblocks version: 10.05

Long story short -- I installed a new version of the MinGW compiler in a different folder (hoping to keep the old and new). I copied the default compiler in CodeBlocks (under Settings > Compiler and Debugger) and changed the name of the copy of the compiler and the path in CodeBlocks under Settings > Compiler and Debugger > Toolchain executables.

I can compile! Yay!

Codeblocks doesn't run the executable when going to Build > Run. Changing the compiler back to the previous default, the code compiles AND CodeBlocks can run the executable. I think this means I can rule out the execution path in Project settings.

Anyone have any idea why I can compile and run under one compiler but not the new? Is there a setting I need to change?

Thanks!

Kat
56
Help / Building C::B on Arch Linux - assert "image.IsOk()" failed in wxBitmap()
« Last post by aphirst on December 17, 2018, 01:26:19 am »
I've already reported this as a "bug" at https://sourceforge.net/p/codeblocks/tickets/775/ but since so far no-one else seems to be able to reproduce the problem, and since it doesn't seem especially consistent for me either, I think it makes sense to try to slog this one out on the forums rather than in a SF ticket.

I'm trying to build C::B from svn on my Arch Linux machine using the various -unix workspaces provided. I (now) have no issues using the bootstrap+configure+make approach, which I can use (in conjunction with a PKGBUILD) to make an installable package, but I also want to generate some "portable"-style builds as seems to be the intended output from these workspaces.

Essentially, as far as I'm concerned, I'm doing nothing exotic, and am following the instructions each time from a completely clean C::B profile, and yet my resulting binaries by this approach (regardless of which wx version I choose) all suffer from the same issue.

How I built C::B
  • install vanilla codeblocks stable (17.12) from my package manager
  • download codeblocks fresh from svn
  • open one of the -unix .workspace files from the /src subfolder
  • since it's a fresh C::B profile, set the "base" variable to something like "-Og -g" or "-O0 -g"
  • (for the -wx30 option, change a reference from "hunspell-1.6" to "hunspell" to avoid a missing library linker error)
  • right-click on the entire Workspace in the left panel and choose "Build Workspace"
  • after a long time (>30 minutes), the build finishes with 0 errors - close C::B and run the "update" script (or "update30" if I chose the wx30 build)

How I produce the bug
  • launch my freshly-build C::B via the "/devel/run.sh" script
  • observe all images/icons in the application working fine (including in the About dialog)
  • open a source file or a project/workspace
  • observe that some icons (e.g. the breakpoint icons) don't render (e.g. when I set breakpoints by clicking to the side of the source lines)
  • observe an Assertion Error dialog when trying to open the About page, and after clearing the chain of these error dialogs, mysteriously observe no splash image in the About dialog
  • close any open source files
  • observe no errors when opening the About dialog, and observe the splash image mysteriously reappearing

The error messages were something like this:
Code: [Select]
./src/gtk/bitmap.cpp(627): assert "image.IsOk()" failed in wxBitmap(): invalid image
./src/gtk/dcclient.cpp(1832): assert "IsOk()" failed in SetTextForeground(): invalid window dc
./src/common/image.cpp(1746): assert "IsOk()" failed in GetHeight(): invalid image
./src/common/image.cpp(1739): assert "IsOk()" failed in GetWidth(): invalid image
./src/gtk/bitmap.cpp(924): assert "IsOk()" failed in GetWidth(): invalid bitmap
./src/gtk/bitmap.cpp(917): assert "IsOk()" failed in GetHeight(): invalid bitmap
./src/gtk/dcclient.cpp(1088): assert "bitmap.IsOk()" failed in DoDrawBitmap(): invalid bitmap
./src/gtk/dcclient.cpp(1088): assert "bitmap.IsOk()" failed in DoDrawBitmap(): invalid bitmap

On advice from Obfuscated, I tried launching my C::B binary in gdb (by prepending "gdb" to the final line in run.sh), and setting a breakpoint for "cbLoadBitmap", from which I learned the following:

  • images seem to get loaded in two "waves", one while first opening the application, and another while opening a source file (or project/workspace) - NOT while actually trying to view UI elements with images (e.g. the About dialog)
  • it's after this second wave of calls to "cbLoadBitmap" that the issue manifests itself
  • playing around with gdb it seems that C::B is repeatedly trying to access "breakpoint-" related PNG files from the "share/codeblocks/manager_resources.zip" archive - notice that those were some of the UI icons which don't render for me

I initially thought I'd devised a workaround based on clearing parts of the build space, but I am no longer able to reproduce this, so am still stuck with the issue. As mentioned, I don't get this issue when building via (bootstrap+)configure+make, so I'm inclined to believe that there's something flakey about the .cbp or .workspace files themselves, as opposed to it being an issue with my system configuration.

If anyone can suggest any further modes of enquiry, I'd really appreciate it. I'm at a bit of a loss, and given how long it takes each build, I'm starting to get driven a little bit mad by it.
57
Help / Re: WinAPI > Executing a program
« Last post by Hachem on December 16, 2018, 09:30:22 pm »
ah, yeah i didn't notice the first rule. Ugh i'm just in need of someone's help thought that i can ask about it on this forum, cuz i can't find any useful one, thanks anyways...
58
Help / Re: WinAPI > Executing a program
« Last post by stahta01 on December 16, 2018, 08:54:42 pm »
Please read and follow the rules for this website http://forums.codeblocks.org/index.php/topic,9996.0.html

I see no Code::Blocks question in your last post!

Tim S.
59
Plugins development / Re: wxSmith isues
« Last post by BlueHazzard on December 16, 2018, 08:37:05 pm »
Don't know if wxSmith supports it, to modify the tree control context menu... Have to look into it...
60
Help / Re: WinAPI > Executing a program
« Last post by Hachem on December 16, 2018, 08:16:00 pm »
Thank your for replies but yeah i know the basics of Codeblocks i'm always using it but now i'm trying somethign new to create a window filled with programs etc. That's my project. It has to be in C and not C++. i made a window and attached to it some animations etc but the purpose of my project is missing which is executing programs like for example i want to enter some I/O like i want to read a variable N that's it for now but i don't actually know how to do.
When i execute my program a window appears i want now for example when i press Left arrow i get a a .exe file that tells me to enter a variable 'N'.
Conclusion: i want to combine a normal C program with my window. Hope that you get it, thank you for your help.
Pages: 1 2 3 4 5 [6] 7 8 9 10