Author Topic: Observations for Codeblocks 64-bit version 8599  (Read 13081 times)

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Observations for Codeblocks 64-bit version 8599
« on: December 09, 2012, 03:18:31 pm »
My 32-bit PC gave up on me a little while ago and I had to get a new PC. It is a 64-bit PC and I installed 64-bit Ubuntu 12.04 LTS on it.

I receive and install new versions of Codeblocks via the Update function of Ubuntu and the version now is 8599 for 64-bit.

I have noticed some differences from the 32-bit Codeblocks:

1.  debug Step-into by keys shift-F7 does not work, but Step-into from Menu or from the Debug both work
2.  small things like entering { places the matching } next to it, not under it that I think it did for 32-bit and earlier codeblocks versions. There are other not-so-important things like this.


Sometimes codeblocks crashes on startup. Ubuntu alerts about this and a report is sent to codeblocks, so you may already know about it. Just in case, here is the main error message in the report: 
 
'codeblocks crashed with SIGABORT in std::Rb_tree<wxString.std::pair<wxString const,SquirrelObject>,std::Select1st<std::pair....'

I have only just started using the 64-bit codeblocks for a command-line application and have hit a major problem:

fopen ( logfilename , "w" ) does not work when using the Run command from the Build menu or the Start from the Debug menu. If the logfile does not exist the file is created, but the vfprintf and fprintf do not work. If the file exists logfile is not recreated (timestamp of the original file remains) , the vfprintf still does not add content to the file but fprintf works.

Running the program from the commandline works and also from the Nemiver GUI gdb front-end.

I will continue to work on this. If you can suggest some experiments at the user-level, please let me know.

Ken




Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Observations for Codeblocks 64-bit version 8599
« Reply #1 on: December 09, 2012, 03:28:49 pm »
I use C::b on 64-bit since several years and there are no issues relatred to 64-bit.
1.  debug Step-into by keys shift-F7 does not work, but Step-into from Menu or from the Debug both work

Shift-key is broken on some (?) newer gtk implemetations (or better it can not be recognized by wxWidgets), this is a known issue and stated in the forum several times, but can only be fixed in gtk.

fopen, etc have nothing to do with C::B which is "just" an IDE.
Make sure all paths are correctly set in the projects properties and you have the needed acces-rights.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Observations for Codeblocks 64-bit version 8599
« Reply #2 on: December 09, 2012, 04:19:58 pm »
This is the gtk+ bug report -> https://bugzilla.gnome.org/show_bug.cgi?id=661973

The issue has been fixed and gtk+ should be updated. Talk to your distro maintainers about it.
(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 Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Observations for Codeblocks 64-bit version 8599
« Reply #3 on: December 09, 2012, 07:28:59 pm »
2.  small things like entering { places the matching } next to it, not under it that I think it did for 32-bit and earlier codeblocks versions. There are other not-so-important things like this.
The Code::Blocks repository for Ubuntu linux is ppa: https://launchpad.net/~pasgui/+archive/ppa/
I checked into this ppa, and it appears that the most recent build does not contain the SmartIndent* plugins (lost during packaging??).
After discussion with pasgui, the plugins apparently do exist, /usr/lib/codeblocks/plugins, but for some reason have the file extension *.do_not_load.  You can manually rename them, or re-install Code::Blocks.  I found a purge necessary for the re-install to work:
Code
sudo apt-get purge codeblocks
sudo rm -rf /usr/lib/codeblocks/
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib
For other users:
if that happens to you, please try first to run sudo dpkg-reconfigure codeblocks-contrib .
Maybe?

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Observations for Codeblocks 64-bit version 8599
« Reply #4 on: December 10, 2012, 11:43:21 am »
Have done a bit of experimenting and ended up with the following minimal test program:

Code
extern char ** environ ;
int main ( int argc , char * argv [ ] )
   {
   printf ( "Press key to continue...\n" ) ;
   int val = getchar();

   setenv ( "MYVAR" , "123456" , 1 ) ;
   int k = 0 ;
   while ( environ [ k ] )
      {
      printf ( "%s\n"  , environ[k] ) ;
      k++ ;
      }
   return 0 ;
   }

which prints the 'Press key' prompt, waits for user to input from keyboard and sets and displays environment variable MYVAR.

This does not work (nothing comes out on the screen) when clicking Run on the Build menu. I assume the main is never entered.

It works for Start/Continue on the Debug menu, for Go-to-cursor F4 (placing cursor at the return statement for example) and when running the program from the command line or via GDB from the command line.
 
Codeblocks comes with xterm as console terminal. I did not notice this at first. The program worked when I changed the console terminal to gnome-terminal.

I remember using xterm and gnome-terminal without problems on the 32-bit PC though...

Ken

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Observations for Codeblocks 64-bit version 8599
« Reply #5 on: December 10, 2012, 11:48:35 am »
Do you have the xterm package installed ?

I use(d) it successufully on Debian, Ubuntu, Fedora, Mint and CentOS (all 64-bit) !

And if it would have different commandlines (or calling conventions) on 64 and 32-bit, it would be a bug.
« Last Edit: December 10, 2012, 11:51:57 am by jens »

Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Observations for Codeblocks 64-bit version 8599
« Reply #6 on: December 10, 2012, 12:26:21 pm »
Many thanjs Jens,

xterm is installed as part of the Ubuntu 12.04 LTS distro.

I don't know if the commandline structure is the same for 32 and 64 bit, but here is the output from xterm -h  64-bit:
Code
XTerm(271) usage:
    xterm [-options ...] [-e command args]

where options include:
    -/+132                       turn on/off 80/132 column switching
    -C                           intercept console messages
    -Sccn                        slave mode on "ttycc", file descriptor "n"
    -T string                    title name for window
    -/+ah                        turn on/off always highlight
    -/+ai                        turn off/on active icon
    -/+aw                        turn on/off auto wraparound
    -b number                    internal border in pixels
    -/+bc                        turn on/off text cursor blinking
    -bcf milliseconds            time text cursor is off when blinking
    -bcn milliseconds            time text cursor is on when blinking
    -bd color                    border color
    -/+bdc                       turn off/on display of bold as color
    -bg color                    background color
    -bw number                   border width in pixels
    -/+cb                        turn on/off cut-to-beginning-of-line inhibit
    -cc classrange               specify additional character classes
    -/+cjk_width                 turn on/off legacy CJK width convention
    -class string                class string (XTerm)
    -/+cm                        turn off/on ANSI color mode
    -/+cn                        turn on/off cut newline inhibit
    -cr color                    text cursor color
    -/+cu                        turn on/off curses emulation
    -/+dc                        turn off/on dynamic color selection
    -display displayname         X server to contact
    -e command args ...          command to execute
    -fa pattern                  FreeType font-selection pattern
    -fb fontname                 bold text font
    -/+fbb                       turn on/off normal/bold font comparison inhibit
    -/+fbx                       turn off/on linedrawing characters
    -fd pattern                  FreeType Doublesize font-selection pattern
    -fg color                    foreground color
    -fi fontname                 icon font for active icon
    -fn fontname                 normal text font
    -fs size                     FreeType font-size
    -/+fullscreen                turn on/off fullscreen on startup
    -fw fontname                 doublewidth text font
    -fwb fontname                doublewidth bold text font
    -fx fontname                 XIM fontset
    %geom                        Tek window geometry
    #geom                        icon window geometry
    -geometry geom               size (in characters) and position
    -help                        print out this message
    -/+hm                        turn on/off selection-color override
    -/+hold                      turn on/off logic that retains window after exit
    -iconic                      start iconic
    -/+ie                        turn on/off initialization of 'erase' from pty
    -/+im                        use insert mode for TERMCAP
    -into windowId               use the window id given to -into as the parent window rather than the default root window
    -/+j                         turn on/off jump scroll
    -/+k8                        turn on/off C1-printable classification
    -kt keyboardtype             set keyboard type: tcap sun vt220
    -/+l                         turn on/off logging
    -/+lc                        turn on/off locale mode using luit
    -lcc path                    filename of locale converter (/usr/bin/luit)
    -leftbar                     force scrollbar left
    -lf filename                 logging filename
    -/+ls                        turn on/off login shell
    -/+maximized                 turn on/off maxmize on startup
    -/+mb                        turn on/off margin bell
    -mc milliseconds             multiclick time in milliseconds
    -/+mesg                      forbid/allow messages
    -/+mk_width                  turn on/off simple width convention
    -ms color                    pointer color
    -n string                    icon name for window
    -name string                 client instance, icon, and title strings
    -nb number                   margin bell in characters from right end
    -/+nul                       turn off/on display of underlining
    -/+pc                        turn on/off PC-style bold colors
    -/+pob                       turn on/off pop on bell
    -rightbar                    force scrollbar right (default left)
    -/+rv                        turn on/off reverse video
    -/+rvc                       turn off/on display of reverse as color
    -/+rw                        turn on/off reverse wraparound
    -/+s                         turn on/off multiscroll
    -/+samename                  turn on/off the no-flicker option for title and icon name
    -/+sb                        turn on/off scrollbar
    -selbg color                 selection background color
    -selfg color                 selection foreground color
    -/+sf                        turn on/off Sun Function Key escape codes
    -/+si                        turn on/off scroll-on-tty-output inhibit
    -/+sk                        turn on/off scroll-on-keypress
    -sl number                   number of scrolled lines to save
    -/+sm                        turn on/off the session-management support
    -/+sp                        turn on/off Sun/PC Function/Keypad mapping
    -/+t                         turn on/off Tek emulation window
    -ti termid                   terminal identifier
    -title string                title string
    -tm string                   terminal mode keywords and characters
    -tn name                     TERM environment variable name
    -/+u8                        turn on/off UTF-8 mode (implies wide-characters)
    -/+uc                        turn on/off underline cursor
    -/+ulc                       turn off/on display of underline as color
    -/+ulit                      turn off/on display of underline as italics
    -/+ut                        turn on/off utmp support
    -/+vb                        turn on/off visual bell
    -version                     print the version number
    -/+wc                        turn on/off wide-character mode
    -/+wf                        turn on/off wait for map before command exec
    -xrm resourcestring          additional resource specifications
    -ziconbeep percent           beep and flag icon of window having hidden output

Fonts should be fixed width and, if both normal and bold are specified, should
have the same size.  If only a normal font is specified, it will be used for
both normal and bold text (by doing overstriking).  The -e option, if given,
must appear at the end of the command line, otherwise the user's default shell
will be started.  Options that start with a plus sign (+) restore the default.


Offline resander

  • Multiple posting newcomer
  • *
  • Posts: 49
Re: Observations for Codeblocks 64-bit version 8599
« Reply #7 on: December 11, 2012, 08:57:22 am »
One more...

Codeblocks also crashes with same error message on close-down. Seen that once. At start-up it crashes once in about ten.