Author Topic: IDE won't open files  (Read 229 times)

Offline edomingox

  • Single posting newcomer
  • *
  • Posts: 4
IDE won't open files
« on: December 09, 2017, 05:14:19 pm »
I started using this compiler and I was liking it until I started running into problems. 

main problem, i cannot open files to edit.  the only thing that may be related is that i updated windows.  it compiles fine.  i just can't open any files once I close them out.  really, really annoying. 

other problem i've always had is that debugging with break points does not work at all.  it skips right past it.  And yes, i did do all the checkboxes and uncheck whatever like i was supposed to.  the watch list is awful.  i wish you can add variables to it easily like visual express. 

i would like to know if this can be fixed.  otherwise, this IDE will get installed and i will not recommend it to anyone else.  the only reason i'm using it now is because dirent.h works and visual express doesn't have that.  otherwise, if i can't get this fixed, i'd rather spend 10 hours making visual express work than go back to this ide.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5991
    • My Best Post
Re: IDE won't open files
« Reply #1 on: December 09, 2017, 06:26:12 pm »
From http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

We need at lease this info
Code: [Select]
Code::Blocks version Code::BlocksVersionNumber on MyOperatingSystem
(version OperatingSystemVersionNumber). The compiler I use is CompilerName
version CompilerVersionNumber.

Edit: Problem on Windows OS like this is normally Anti-Virus, Anti-Ransomware, Windows Permission issue, or user error.

Tim S.
« Last Edit: December 09, 2017, 06:28:30 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10403
Re: IDE won't open files
« Reply #2 on: December 09, 2017, 07:13:01 pm »
i just can't open any files once I close them out.  really, really annoying. 
What do you mean by this? How do you try to open the files?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline edomingox

  • Single posting newcomer
  • *
  • Posts: 4
Re: IDE won't open files
« Reply #3 on: December 09, 2017, 10:51:35 pm »
it's the latest code blocks.  i also uninstalled the last windows update and restarted and it still fails.

What I mean by I just can't open any files is by using the editor.  Not through programming.  This is simply the IDE not working right. 

I open code blocks.  then I try to open a file.  The file editor says that the file is open when I look under "open files" box, but you cannot see anything.  there is no window for the file.  I'm sure i can probably fix this by uninstalling then reinstalling.

I don't want to because the fact that the breakpoints do not work and the watch list don't work. 

I just spent about 1-2 hours reworking my code to work for visual studio.  At least with that, the breakpoints work and adding variables to the watch list is easy.  I don't think I'm every going to download this again.  I did really like the appearance.  but the functionality is just awful. 

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7222
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: IDE won't open files
« Reply #4 on: December 09, 2017, 11:43:58 pm »
Do I understand correctly, that you don't want any help ?
Just say that C::B is not usable and you switch (back?) to Visual Studio ?

The latest Code::Blocks is not a version number, Windows is not a version.

The error description is not really clear.
You mean you click (e.g.) on "File -> Open" and it appears in the "Open files list", but you do not have an editor window ?
Do you see the "Start here"-page, when starting C::B ?
Did you try to switch to the file by clicking on it in the "Open files list" ?
Maybe the perspective/layout is screwed for whatever reason ?
In this case you can try to reset it by clicking "View -> Perspectives -> Delete current".

Offline edomingox

  • Single posting newcomer
  • *
  • Posts: 4
Re: IDE won't open files
« Reply #5 on: December 10, 2017, 03:16:25 pm »
Ultimately, yes, I won't need any help.  I been fighting this thing with code blocks for months.  I never switched to VS because I liked the looks of cb so much.  i figured i didn't need the debugging with breakpoints for a while until now.  porting my code from one IDE is such a pain.  I went from visual express to DevC to visual studio to CB and now finally going back to VS again. 

well, what i mean by latest CB is going to the website right now and downloading it.  That's the one i'm using.  I just havent taken the time to find the version (and i don't want to open it up again).

I selected to open my last project as my start page, but yes, I'd imagine the start page works. 
And yes, I tried accessing a file through the open files list and that doesn't work.  it says the file is open, but it won't display on screen.  there's no minimized windows or anything.  those little tabs each file shows (from before) with little arrows, I do see that but no file name next to it.  It's almost like the tabs are "super" minimized.

I have not found any other users with this problem in my attempts to google it.

I tried resetting my perspective to defaults and that didn't help.  And yes, I even deleted the current perspective with no effect.  I experienced this once before a few months ago.  I just reinstalled it.  but i still can't get the breakpoints to work or to get the watch list to work properly.  Visual studio handles these features much more easily for me so I'm going back to it.

I was just hoping for a quick fix here but it seems more hassle than it's worth.  Thanks everyone for you assistance in this.  It's just that nothing frustrates me more than working with an IDE that gives unexpected results.

Edit:  another reason i never switched earlier is that i had about 33,000 lines of code in my program with code blocks.  porting it over to visual studio was overwhelming.  But, I've decided to start over with my code (which I can fortunately recycle most of the code) so I can include menu driven commands and  other dialog boxes.  As one example, some of the things I had to fix when porting over was having to type cast strlen within "if" statements with Visual studio, as code blocks didn't come up with this error.

I also really like how CB toggles the code.  That's one thing I have a problem with Visual Studio as it tends to toggle comments, conditional statements and loops as well.  I'm sure there's a setting on the depth of toggling, but i have yet to find it.  I also liked using dirent.h in CB, yet VS doesn't have that.  I had to rewrite a loading function entirely because of this.
« Last Edit: December 10, 2017, 03:25:56 pm by edomingox »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10403
Re: IDE won't open files
« Reply #6 on: December 10, 2017, 03:30:02 pm »
And yes, I tried accessing a file through the open files list and that doesn't work.  it says the file is open, but it won't display on screen.  there's no minimized windows or anything.  those little tabs each file shows (from before) with little arrows, I do see that but no file name next to it.  It's almost like the tabs are "super" minimized.
Screenshot?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1585
Re: IDE won't open files
« Reply #7 on: December 10, 2017, 05:21:59 pm »
First of all: Codeblocks is NOT a compiler. Codeblocks is an IDE that can use different compiler. Wording is important, because else we have a thread with 100 pages only to find out you are talking about compiler issues and try to blame codeblocks!

Quote
  it says the file is open, but it won't display on screen
I have never seen a message that a file is "already open". I don't think that this message is anywhere implemented in codeblocks. So to help us, helping you, i would suggest to nag less and give more detailed description without generalizing or using "it does not work". Exact error messages or a screenshot are the best way to describe problems. This costs a view minutes to write or make but at the end you will have a fix and we don't have to complain and ask the same question 1000 times and always get the same useless answer and frustrating you...

One example to describe the problem:
1) Open codeblocks
2) Open project over the start page by clicking on its name
3) Trying to open a file from the project tree by double click on the file in the project tree.
Expected: Show the file
Result: The title bar changes the name to the expected file but the editor shows the line numbering but the text is only blank

Or:
1) Open codeblocks
2) Open project over the start page by clicking on its name
3) Trying to open a file over File->Open file
Expected: Show the file in the editor
Result: Codeblocks shows a error message box with the wording "Can not read the file. Do you have read permissions?"
4) I have checked the file permissions and i have read permission but not write permission. What is going on?

Quote
well, what i mean by latest CB is going to the website right now and downloading it.  That's the one i'm using.  I just havent taken the time to find the version (and i don't want to open it up again).
Ok this is lazy as it can get. First of all on the website of codeblocks are 6 download links for windows alone. To find the version every decent program has his exact version number in Help->About ....

Quote
I have not found any other users with this problem in my attempts to google it.
So it is a difficult bug to reproduce and it would be good that you describe the problem as good as possible, or it is a osi level 8 error, also there describing the problem and not repeating the same useless text would help a lot...

Quote
I tried resetting my perspective to defaults and that didn't help.  And yes, I even deleted the current perspective with no effect.  I experienced this once before a few months ago.  I just reinstalled it.
This leads to a config bug. But we don't even know how the problem is manifested...

Quote
  but i still can't get the breakpoints to work or to get the watch list to work properly.
The breakpoints not working can have a lot reasons. User and codeblocks errors, all fixable:
1) You don't use the debug target or don't use the "-g" compiler option
2) GDB can not work with the paths codeblocks provides. We had a bug report about this and wait for user feedback to fix this. So if you too have this problem, it would be great to help us fix this by providing some detailed feedback. We can not reproduce it so it is hard (impossible) to fix without feedback from a user with this problem.
3) What do you mean with "to work properly"? For me it is easy as fuck...
Code: [Select]
Right click on the variable ->Add to watch What is there not "work probably"? Are you talking about displaying the value? Adding new watches? Deleting watches? Are you getting any error messages?

Quote
I was just hoping for a quick fix here but it seems more hassle than it's worth. 
Describe the problem, provide screenshots, nag less and it is (probably) a quick fix

Quote
As one example, some of the things I had to fix when porting over was having to type cast strlen within "if" statements with Visual studio, as code blocks didn't come up with this error.
Codeblocks does not care about your code or any include file. The compiler does. And what the fu is "type cast strlen within if" are you talking about "type cast the return value of stlen" for comparing with a non size_t type? Be careful there are sneaky c traps to fall into....

Quote
I also liked using dirent.h in CB, yet VS doesn't have that.  I had to rewrite a loading function entirely because of this.
This has nothing to do with codeblocks but with the compiler / standard library you are working...

I would recommend you to read this: http://www.catb.org/esr/faqs/smart-questions.html


Sorry for this long post. All in all, I am pissed off by people that nag and blame things but are not willing to describe their problem or are to lazy to provide any useful information. Tell developer of one IDE how great the other IDE is, without describing the feature or problem in detail is a dick move
« Last Edit: December 10, 2017, 05:29:50 pm by BlueHazzard »

Offline edomingox

  • Single posting newcomer
  • *
  • Posts: 4
Re: IDE won't open files
« Reply #8 on: December 10, 2017, 06:11:01 pm »
Ok.  that's a lot to take in so I'll try to answer as best I could.

As for a screenshot, I was going to get one just now.  But the IDE failed to open since I migrated my code from one directory to another.  since it can't find the existing project, the IDE just crashed.  i reopened it again and it actually started up fine this time.  It began to work fine but all the project info is invalid so it just keeps saying it can't find the files.  i opened up another project that wasn't showing files, and now it's showing them again.  So as far as this "cannot open files" bug, I cannot reproduce it now. 

First of all: Codeblocks is NOT a compiler. Codeblocks is an IDE that can use different compiler. Wording is important, because else we have a thread with 100 pages only to find out you are talking about compiler issues and try to blame codeblocks!
I understand it's an IDE.  The problem I have is with the IDE when files do not open. 

Quote
 
I have never seen a message that a file is "already open". I don't think that this message is anywhere implemented in codeblocks. So to help us, helping you, i would suggest to nag less and give more detailed description without generalizing or using "it does not work". Exact error messages or a screenshot are the best way to describe problems. This costs a view minutes to write or make but at the end you will have a fix and we don't have to complain and ask the same question 1000 times and always get the same useless answer and frustrating you...
you are correct, it doesn't say any message, but when i say it's already open, it's because i see it in the open files list.  I know I'm nagging more than helping but i've never had as much problems with an IDE before.  I'll try to describe what I see here:

When it was working (prior to applying windows updates, automatic updates)
1. open CB.
2. existing project shows up.
3. I edit, program, whatever my source files, headers, etc.

When it's not working (after restarting my laptop from the windows updates)
1. open CB.
2. existing project shows up, EXCEPT, no files are open.  no tabs, no nothing.
3. I cannot edit my source, headers, etc., because the files won't open up in the IDE.

I don't know how much simpler I can say this.  This was the main issue I have.  It's basically a blocker.  i could easily open up the files in another editor, save them, then let CB compile it.  But why would I have to do that? 

Quote
Ok this is lazy as it can get. First of all on the website of codeblocks are 6 download links for windows alone. To find the version every decent program has his exact version number in Help->About ....
yes, i was being lazy.  here's the about info:
release 16.01 rev 10702
sdk version 1.29.0

Quote
So it is a difficult bug to reproduce and it would be good that you describe the problem as good as possible, or it is a osi level 8 error, also there describing the problem and not repeating the same useless text would help a lot...
yes, it must be a difficult bug to reproduce.  i'm willing to bet it may have something to do with my windows update since it only occurred directly after i restarted my laptop from the updates.

Quote
This leads to a config bug. But we don't even know how the problem is manifested...
i still don't think it's a config bug.  it worked fine prior to the update.

Quote
The breakpoints not working can have a lot reasons. User and codeblocks errors, all fixable:
1) You don't use the debug target or don't use the "-g" compiler option
2) GDB can not work with the paths codeblocks provides. We had a bug report about this and wait for user feedback to fix this. So if you too have this problem, it would be great to help us fix this by providing some detailed feedback. We can not reproduce it so it is hard (impossible) to fix without feedback from a user with this problem.
3) What do you mean with "to work properly"? For me it is easy as fuck...
Code: [Select]
Right click on the variable ->Add to watch What is there not "work probably"? Are you talking about displaying the value? Adding new watches? Deleting watches? Are you getting any error messages?
i thought it would be easy too.  i saw the "add to watch" but it did not add it to watch.  it just opened up the watch window.  and since i never had to actually "fill in the blanks" with a watch list before, i had no idea what to do at that point.  Visual express did it exactly the way you described it.  I couldn't figure out why mine wasn't working.

Quote
Describe the problem, provide screenshots, nag less and it is (probably) a quick fix
i will do that next time. 

Quote
Codeblocks does not care about your code or any include file. The compiler does. And what the fu is "type cast strlen within if" are you talking about "type cast the return value of stlen" for comparing with a non size_t type? Be careful there are sneaky c traps to fall into....
yes, it was comparing an int with a size_t.  visual studio came up with the error but CB did not.  I fell into the same kind of traps when using DevC, which is why i switched IDE/compilers. 

Quote
This has nothing to do with codeblocks but with the compiler / standard library you are working...
Yes, i understand that.  but CB came with a compiler that provided it, just by chance, when i was looking for a way to read all files in a directory as if using wildcards.  It's just that visual studio didn't have that include in the compiler.  I was trying to figure out how to copy all the headers from one to the other, but i had no success.

Quote
Sorry for this long post. All in all, I am pissed off by people that nag and blame things but are not willing to describe their problem or are to lazy to provide any useful information. Tell developer of one IDE how great the other IDE is, without describing the feature or problem in detail is a dick move
i understand.  I just had a bad day when i posted it.  i apologize for my attitude.  i was beginning to blame this on windows 10.  i felt like taking my laptop and breaking it over my knee, but i knew that wouldn't of accomplished anything.  i still like CB's IDE more than what i've seen out there.  I just don't have the knowledge to work through the advanced features.  I was going to try Eclipse but I couldn't even get the compiler configured on it.  I needed something more beginner friendly.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1585
Re: IDE won't open files
« Reply #9 on: December 10, 2017, 10:07:08 pm »
Quote
When it was working (prior to applying windows updates, automatic updates)
1. open CB.
2. existing project shows up.
3. I edit, program, whatever my source files, headers, etc.

When it's not working (after restarting my laptop from the windows updates)
1. open CB.
2. existing project shows up, EXCEPT, no files are open.  no tabs, no nothing.
3. I cannot edit my source, headers, etc., because the files won't open up in the IDE.
Thank you.
If this happens again try to close codeblocks and move the *.layout file found in your project folder to a other place. Then restart codeblocks and open the project. If this fixes the problem please .zip and upload this layout file here.

Quote
But the IDE failed to open since I migrated my code from one directory to another.  since it can't find the existing project, the IDE just crashed.
Did codeblocks crashed when you tried to open a project from the start page that no longer exists? Did you get any error message like "file not found"? Or did it crashed like "program stopped working" message from windows? If the later is there a crash report generated by codeblocks? Can you upload it?


Quote
i thought it would be easy too.  i saw the "add to watch" but it did not add it to watch.  it just opened up the watch window.  and since i never had to actually "fill in the blanks" with a watch list before, i had no idea what to do at that point.
Can you give a minimal project where this is not working? Can you reproduce this with a minimal hello world project? Never had this problem.... Have you tried to highlight the variable and then right click->add watch? You can also use the watch window to evaluate complex source, like function calls and calculations.

Quote
yes, it was comparing an int with a size_t.  visual studio came up with the error but CB did not.
I really don't like this wording ;) CB is still a ide and don't gives a s**t about your code. GCC did not print a error but for sure it printed a warning like "comparing signed with unsigned int" or something like this. You can add the compiler flag
Code: [Select]
-Werrorto make all warnings errors and stop compiling after a warning (this should be good programing practice, because warnings will tell you something important about your code).

Code: [Select]
I was trying to figure out how to copy all the headers from one to the other, but i had no success.really bad idea... Let compiler headers be compiler headers and do not copy them from one to a other. This screams for errors, bugs, crashes and compiling problems.

greetings