Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Fatal error invalid memory access
Fatal error invalid memory access [message #41886] Mon, 03 February 2014 18:00 Go to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
..while I'm in the complaints department:

Don't know if it's a bug or not, but if I create a .cpp-file in
a package with the same name as the package, then after a small
number of edit's and compile's, theide crashes and then refuses to
load the package when I select it at start-up giving the above error-message.

I get it to reload the package only if I rename the package &
.upp-file OR the .cpp-file to something else.

Could be something that needs attention.
Re: Fatal error invalid memory access [message #41892 is a reply to message #41886] Tue, 04 February 2014 08:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3246
Registered: August 2008
Senior Veteran
Hello slashupp

Could you upload a sample package just "ready to crash"?

What system are you using?: Windows, Linux.


Best regards
Iñaki
Re: Fatal error invalid memory access [message #41901 is a reply to message #41892] Wed, 05 February 2014 08:44 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
I'm using upp nightly 6840 on debian wheezy/sid.

I'll try to create such a package...(at moment am fire-fighting)

Another couple of things:

Irregularly (difficult to isolate) I get a segmentation-fault
when editing a layout; I restart theide again & all is OK - for
now I just live with it.

Had a strange case getting a theide seg-fault when loading my
package where in my source-code I called at(0) on an empty
std::string - changed my source (debugging uppsrc/ide-package in
theide itself) to check that the string is not empty and theide
then loaded my package:
Changed: if (s.at(0)!='#') { ... }
to: if (s.length() && (s.at(0)!='#')) {...}
(strange one this)

REALLY REALLY NEED a working debian package for theide
especially a NOGTK version - I failed to create a stable NOGTK
compile using input from another thread and is currently using
the standard make / make install version from 6840

(I'm using theide to develop UI's for my own apps that has some
urgency; I would have liked to but cannot really afford the time
at the moment to assist in full debugging of theide - will do so
once the urgent stuff is done)

Praise & thanks where it is deserved:
theide makes building GUI's really easy and straight-forward
and I like the intuitive-ness of it - thanks to all you devs

Re: Fatal error invalid memory access [message #41903 is a reply to message #41901] Wed, 05 February 2014 10:32 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 227
Registered: July 2011
Location: Bangalore
Experienced Member
Hi,


Quote:

then loaded my package:
Changed: if (s.at(0)!='#') { ... }
to: if (s.length() && (s.at(0)!='#')) {...}
(strange one this)


Try this.

if (s.length()) {
 if (s.at(0)!='#')) {...}
}



Warm Regards

Deepak
Re: Fatal error invalid memory access [message #41913 is a reply to message #41901] Wed, 05 February 2014 14:58 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 821
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello slashupp,

You can use my script to compile Ultimate++ in X11 mode.

1. Copy all files included by me in this message to upp directory.
2. Execute following commands:
chmod +x compile.sh
./compile.sh

3. Enjoy X11 IDE!

P.S.
Use at your own risk! (First, please check what script do).

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.

[Updated on: Wed, 05 February 2014 15:00]

Report message to a moderator

Re: Fatal error invalid memory access [message #41947 is a reply to message #41903] Sat, 08 February 2014 08:59 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
Hi deep
You're right with that, but you miss the point:
The entire theide crashes when it is loading my application's
source (which contains that line) - THIS SHOULD NOT HAPPEN!
I should be able to write any kind of junk in my source files
and fully expect theide to load them without complaint.
Re: Fatal error invalid memory access [message #41948 is a reply to message #41913] Sat, 08 February 2014 09:10 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
@klugier:

((P.S. Use at your own risk! (First, please check what script do). )) - noted: I am NOT a fan of bash (actually dislike[-hate-] the convoluted, cryptic, obscure syntax with a passion)


Quote:


1. Copy all files included by me in this message to upp directory.


Is this the installed upp-directory or the extracted sources one?

will give it a bash Wink
thx
Re: Fatal error invalid memory access [message #41949 is a reply to message #41886] Sat, 08 February 2014 11:01 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
I've managed to narrow-down somewhat to a possible cause for
theide crashing: it seems to have something to do with the
<UUID?>.cache-files and/or "MyPkgName@MyWorkDir.cfg" that theide
creates in ~/.upp/theide/cfg

If I delete "MyPkgName@MyWorkDir.cfg" theide loads the package
most-times without crashing with the above error, other times I
need to delete all the <UUID?>.cache-files as well

What I do now before I open a project is to delete both the above
sets of files from ~/.upp/theide/cfg

What are these files for anyway? Are they really needed?
For me they cause more harm, hassle and frustration than any
perceivable benefit whatsoever.
Re: Fatal error invalid memory access [message #41950 is a reply to message #41948] Sat, 08 February 2014 12:48 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 821
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello slashupp,

Quote:


((P.S. Use at your own risk! (First, please check what script do). )) - noted: I am NOT a fan of bash (actually dislike[-hate-] the convoluted, cryptic, obscure syntax with a passion)


So, what do you recomend insted of bash?

Quote:


Is this the installed upp-directory or the extracted sources one?


You should put it in "extracted sources" directory. Exactly the same place where you are typing "make" command.

Sincerely,
klugier


Ultimate++ - one framework to rule them all.

[Updated on: Sat, 08 February 2014 13:01]

Report message to a moderator

Re: Fatal error invalid memory access [message #41956 is a reply to message #41886] Sat, 08 February 2014 18:38 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
@klugier:

Done as you said with the scripts:

copied the new theide to my ~/bin (it is in my PATH)
and ran it ...

1. doesn't do setup

I manually copied bazaar, ..., uppsrc, to ~/upp
ran theide again:

2. no build methods

found GCC.bm and imported it

Tried to compile Addressbook example: failed because it could
not find a load of headers from "/usr/include/gtk-2.0/..."
Why is looking for gtk-stuff?

3. not "Enjoy X11 IDE!" yet

any suggestions?




Re: Fatal error invalid memory access [message #41958 is a reply to message #41956] Sat, 08 February 2014 19:45 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 821
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello slashupp,

Quote:


copied the new theide to my ~/bin (it is in my PATH)
and ran it ...


It seems that you compile "x11 ide" successfully.

Quote:


I manually copied bazaar, ..., uppsrc, to ~/upp
ran theide again:


Does IDE detect all necessary ultimate++ packages like CtrlLib, CtrlCore etc?

Quote:


found GCC.bm and imported it


Did you copy GCC.bm.in also?

Quote:


Tried to compile Addressbook example: failed because it could
not find a load of headers from "/usr/include/gtk-2.0/..."


It is only the path for gtk headers. Remember that even if you have X11 IDE the executable is still compiling in full GTK mode. If you want to fully remove GTK from your project try following compilation flags:
X11 - Deletes GTK backend, but GTK theme can still be used. (GTK libraries are linked to yours executable file).
NOGTK - Fully remove gtk, no GTK theme. (GTK libraries are NOT linked to yours executable file).

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: Fatal error invalid memory access [message #41959 is a reply to message #41956] Sat, 08 February 2014 20:58 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1779
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

slashupp wrote on Sat, 08 February 2014 18:38

copied the new theide to my ~/bin (it is in my PATH)
and ran it ...

1. doesn't do setup

TheIDE only does setup when it detects ~/.upp doesn't exist. You can run it explicitly from theide itself, it is accessible from Setup -> Source management...

Best regards,
Honza
Re: Fatal error invalid memory access [message #41965 is a reply to message #41886] Sun, 09 February 2014 06:35 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 209
Registered: July 2009
Experienced Member
I've copied mkfile and compile.sh into extracted source dir.
I ran ./compile in extracted source dir - it compiled
I deleted existing ~/.upp and ~/upp dirs.
I copied theide into path-dir.
I ran theide and I got what looks like X11 windows, it did not do setup; build methods are empty.
I copied bazaar, ..., uppsrc to ~/upp
I created build method GCC, and selected builder GCC.
I create a new package (helloworld-style) and specify 'GUI SSE2 NOGTK'.
Tried to do 'GCC Debug'-build and got:
----- CtrlLib ( GUI SSE2 NOGTK GCC DEBUG LINUX POSIX ) (1 / 9)
ChGtk.cpp
In file included from /home/slash/upp/uppsrc/CtrlLib/ChGtk.cpp:2:0:
/home/slash/upp/uppsrc/CtrlLib/ChGtk.h:9:21: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>
                     ^
compilation terminated.
CtrlLib: 1 file(s) built in (0:00.70), 701 msecs / file, duration = 713 msecs, parallelization 0%

There were errors. (0:00.71)


Can I ever become rid of gtk?

[Updated on: Sun, 09 February 2014 09:00]

Report message to a moderator

Re: Fatal error invalid memory access [message #41967 is a reply to message #41965] Sun, 09 February 2014 09:42 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1779
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

slashupp wrote on Sun, 09 February 2014 06:35

I create a new package (helloworld-style) and specify 'GUI SSE2 NOGTK'.
Tried to do 'GCC Debug'-build and got:
----- CtrlLib ( GUI SSE2 NOGTK GCC DEBUG LINUX POSIX ) (1 / 9)
ChGtk.cpp
In file included from /home/slash/upp/uppsrc/CtrlLib/ChGtk.cpp:2:0:
/home/slash/upp/uppsrc/CtrlLib/ChGtk.h:9:21: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>
                     ^
compilation terminated.
CtrlLib: 1 file(s) built in (0:00.70), 701 msecs / file, duration = 713 msecs, parallelization 0%

There were errors. (0:00.71)


Can I ever become rid of gtk?


What version of U++ sources do you have? This seems a lot like problem that was solved in revision 6698...

Best regards,
Honza
Re: Fatal error invalid memory access [message #41968 is a reply to message #41967] Sun, 09 February 2014 09:54 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1779
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

slashupp

ah! now I'm starting to get the picture ...
The reason I need get rid of GTK is that I have build (B)LFS with minimal extras, only X11 with openbox for window management
Ok, that brings more sense into what you're trying to do Wink

Quote:

Can I add these flags to 'make -C uppsrc' in the domake script?
Unfortunately, some things are pretty hard-coded in the makefile Sad I would recommend you to rather use the universal makefile. Just download the file, put it in the directory with unpacked sources and run this:
make -f mkfile PKG=ide NESTS=uppsrc LDFLAGS="-Wl,--gc-sections -Wl,-O,2" TIME= COLOR=0 USEMAINCFG=0 FLAGS="GUI NOGTK GCC" TARGET=$(pwd)/theide JOBS=5

This should build theide without GTK. You can also use this for any other U++ package, just by tweaking the parameters a bit. Detailed documentation is inside the makefile.

Best regards,
Honza
Previous Topic: Problematic hack in upp::Build.cpp
Next Topic: Bug: Searching finds the end of the line instead of in text
Goto Forum:
  


Current Time: Sat Jan 16 09:23:47 CET 2021

Total time taken to generate the page: 0.02071 seconds