U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Library : Other (not classified elsewhere) » SERIOUS: Fatal error: invalid memory access
SERIOUS: Fatal error: invalid memory access [message #42030] Wed, 12 February 2014 10:54 Go to next message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
Using svn6883 on debian wheezy/sid

I don't know if this occur on other Linux distros:

The error (consistently) occur when:
1. I work on any package
2. I edit & compile this package 5 or more times
3. then a "invalid memory access" occur out of the blue and theide crashes
4. theide then continue to fail with this error when I try to reopen this package (it opens other packages ok)
5. theide only open the package again when I delete:
~/.upp/theide/cfg/packagename@mydevdirname.cfg, and
~/.upp/theide/cfg/*.cache
6. the above will occur with any package, regardless if from bazaar, uppsrc, examples, .., or one that I created

It is now so that I work for about 20 minutes & then above occur
and I need to do those deletions before I can work again for another about 20 minutes.

Any ideas, any help will be most appreciated.

Found this on tty1:
...
(grafix:11018): Gtk-CRITICAL **: IA__gtk_window_is_active: assertion `GTK_IS_WINDOW (window)' failed
(grafix:11276): Gtk-CRITICAL **: IA__gtk_window_is_active: assertion `GTK_IS_WINDOW (window)' failed
*** Error in `/home/slashupp/.upp/_out/mydevdir/GCC.Debug.Debug_Full.Gui.Mt.Shared.Sse2/grafix': corrupted double-linked list: 0x00000000026e0720 ***
(theide:11507): Gtk-CRITICAL **: IA__gtk_window_is_active: assertion `GTK_IS_WINDOW (window)' failed
...


('grafix' is one of my apps I just happen to be busy with)

ALSO: MOST SERIOUS:
I recompiled an app I wrote a while ago and is using constantly, with this svn6883 version and then used it for about 10 minutes before it also crashed with this error.
The old compiled executable (which I fortunately didn't overwrite) still works fine.
This means the error is somewhere in uppsrc and it gets propagated when compiling applications.

[Updated on: Wed, 12 February 2014 11:29]

Report message to a moderator

Re: SERIOUS: Fatal error: invalid memory access [message #42036 is a reply to message #42030] Wed, 12 February 2014 20:12 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hello slashup,

I also encountered the same kind of ide crash with a version compiled the 06/02/2014), so I just swithed back to my old version ( compiled the 6/12/2013 )

As for application crash, I am currently doing tests only, so no long time usage.
Re: SERIOUS: Fatal error: invalid memory access [message #42045 is a reply to message #42036] Thu, 13 February 2014 09:08 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
thx Didier

for confirming ... I will now also switch to the 6/12/2013 - version as that seems to be a ok one

PS: I (again) tried Qt, wxWidgets(with codeblocks) in the meantime, and
realized (again!) why theide is so much better for GUI-development.
(There just isn't any alternative once you started using theide, it spoils you - it's so easy, intuitive, right, )

EDIT:
seems the nightlies start at earliest 22 Jan 2014
is there a way I can get earlier versions?

[Updated on: Thu, 13 February 2014 09:22]

Report message to a moderator

Re: SERIOUS: Fatal error: invalid memory access [message #42049 is a reply to message #42045] Thu, 13 February 2014 14:39 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1118
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello slashupp,

Can you describe your operating system. The main question here is do you use KDE?

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: SERIOUS: Fatal error: invalid memory access [message #42050 is a reply to message #42049] Thu, 13 February 2014 15:55 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
debian 7

some KDE apps e.g. kdevelop, konsole, some games, kolourpaint, and
I guess some background run-times got installed as dependencies,
but not the full KDE.

There's some Gnome stuff as well, but again not the full Gnome either.

Same goes for LXDE.

I use LXPanel with openbox as my Desktop/WM. No session manager.

I've now installed 6806 (oldest I found) and have been using it for a few hours
now without the error occuring so far ...
If this keeps up then it would be safe to assume the cause of the bug was introduced in a later version


This morning won't open my package giving the error (sigh)
Problem gets propagated to generated executables as well

Cannot revert to stable 5485 on home-page: Sourceforge gives Server not found!


[Updated on: Fri, 14 February 2014 06:42]

Report message to a moderator

Re: SERIOUS: Fatal error: invalid memory access [message #42108 is a reply to message #42050] Thu, 20 February 2014 12:03 Go to previous messageGo to next message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Hi,

I can confirm this same behavior: 'Invalid memory access' error + crash running the latest SVN.6937 (GTK) on Lubuntu 13.10 x64. I could recover from it only by:

rm 'main package'@'nest'.cfg

in ~/.upp/theide/cfg.

cat theide.log shows:

****************** PANIC: Out of memory!
Requested size: 5433259740 B
U++ allocated memory: 3616 KB

Best regards,

Tom
Re: SERIOUS: Fatal error: invalid memory access [message #42109 is a reply to message #42108] Thu, 20 February 2014 14:00 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1118
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I added this bug to Redmine (Ultimate++ bug tracker).

URL: Bug #694.

Sincerely,
Klugier
Re: SERIOUS: Fatal error: invalid memory access [message #42111 is a reply to message #42109] Thu, 20 February 2014 20:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Investigating...

Mirek
Re: SERIOUS: Fatal error: invalid memory access [message #42113 is a reply to message #42045] Fri, 21 February 2014 11:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
slashupp wrote on Thu, 13 February 2014 03:08



EDIT:
seems the nightlies start at earliest 22 Jan 2014
is there a way I can get earlier versions?




You can always checkout particular revision from svn. Recompiling ide is trivial (once you have some ide or umk compiled)
Re: SERIOUS: Fatal error: invalid memory access [message #42115 is a reply to message #42113] Fri, 21 February 2014 17:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Well, I have not found a reason yet, but at least I now believe to have eliminated all those GTK errors popping in the console.

Maybe it will solve the problem. Please test (svn >6944) and report!

Mirek
Re: SERIOUS: Fatal error: invalid memory access [message #42155 is a reply to message #42115] Mon, 24 February 2014 10:01 Go to previous messageGo to next message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Hi,

I have now worked for about 15 minutes on the latest SVN.6947 64-bit TheIDE (Gtk) from this morning on Lubuntu. (This was installed from Honza's PPA).

While tracking compiler warnings on my own code, I crashed into a dialog with the following content:

Fatal error: Assertion failed in uppsrc/Core/Vcont.h, line 33
i >= 0 && i < items

Stack trace:
() [0x7502fc]
() [0x75074c]
() [0x6688c9]
() [0x668034]
() [0x665054]
() [0x66b0b1]
() [0x8645ad]
() [0x802364]
() [0x759a17]
() [0x94b7b7]
() [0x94b85d]
() [0x7e8138]
() [0x663dd1]
() [0x6694cc]
() [0x86eb7a]
() [0x86a22c]
() [0x86bc8d]
() [0x861e02]
() [0x8632d1]
() [0x802364]
() [0x759a17]
() [0x465a80]
() [0x853ac3]
() [0x61cd5e]
() [0x61c5dc]
() [0x61c8f8]
() [0x61dd65]
() [0x61fd70]
() [0x61fd2c]
() [0x61fd2c]
() [0x61fd2c]
() [0x61fd2c]
() [0x61f8dc]
() [0x638127]
() [0x6381c7]
() [0x638381]
() [0x638a46]
() [0x638b2b]
() [0x638c45]
() [0x638d69]
() [0x628d92]
() [0x8089f0]
() [0x8076ca]
(__libc_start_main
() [0x40b0cf]



I'll keep testing and will report on progress.

Best regards,

Tom
Re: SERIOUS: Fatal error: invalid memory access [message #42156 is a reply to message #42155] Mon, 24 February 2014 11:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Perhaps run from debugger to get complete bactrace?

Mirek
Re: SERIOUS: Fatal error: invalid memory access [message #42160 is a reply to message #42156] Mon, 24 February 2014 20:52 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hi,

I think there are probably two different problems:
  • crash in ide
  • crash in applications

I am saying this because of some observations I made:
  • ide still seems to be crashing (lattest posts)
  • apps don't seem to be crashing any more ==> a test I did this WE

One week ago, I just leaved my test application running and forgot about it (so I wasn't doing anything with it, nor with my computer) ... and it crashed all by itself.
I did the same test this WE and left it running all day while playing with it from time to time : NO CRASH

[Updated on: Mon, 24 February 2014 21:39]

Report message to a moderator

Re: SERIOUS: Fatal error: invalid memory access [message #42164 is a reply to message #42156] Tue, 25 February 2014 12:05 Go to previous messageGo to next message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Hi,

I compiled a debug build for TheIDE x64 Linux SVN.6947 and then started it in debugger (F5). Now I have worked with it for about 6 hours without any problem.

I guess no news is good news in this case. I'll keep you posted if it crashes in one way or another -- although, soon I will need to switch back to Windows again...

Best regards,

Tom
Re: SERIOUS: Fatal error: invalid memory access [message #42165 is a reply to message #42164] Tue, 25 February 2014 15:17 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
Yesterday in the evening I had the same suspicious crash with theide like Tom1 on Ubuntu 12.04. I started several times and working time became shorter and shorter ( ca 1 min). I had a look at the crash report and saw that it was thread 1 (out of 3) in module Line Edit that produced this error.

I then switched tasks to cool down a bit but returned after an hour or so with the idea to run theide under the control of gdb. No crash anymore for a good hour of usage. Really strange ...
Re: SERIOUS: Fatal error: invalid memory access [message #42171 is a reply to message #42165] Tue, 25 February 2014 20:36 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
ManfredHerr wrote on Tue, 25 February 2014 09:17

Yesterday in the evening I had the same suspicious crash with theide like Tom1 on Ubuntu 12.04. I started several times and working time became shorter and shorter ( ca 1 min). I had a look at the crash report and saw that it was thread 1 (out of 3) in module Line Edit that produced this error.



Well, you have 3 threads in theide?

That is really weird, current version is supposed to run single-threaded... (and it does for me).

Re: SERIOUS: Fatal error: invalid memory access [message #42172 is a reply to message #42165] Tue, 25 February 2014 20:37 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Well an app that crashes when used mormally and that doesn't crash anymore when using GDB ... sounds like uninitialised var or data overflow ( array or something like that )
Re: SERIOUS: Fatal error: invalid memory access [message #42173 is a reply to message #42172] Tue, 25 February 2014 20:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Didier wrote on Tue, 25 February 2014 14:37

Well an app that crashes when used mormally and that doesn't crash anymore when using GDB ... sounds like uninitialised var or data overflow ( array or something like that )


Actually, AFAIK, gdb does not influence these kinds of errors.
Re: SERIOUS: Fatal error: invalid memory access [message #42174 is a reply to message #42173] Tue, 25 February 2014 20:46 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
In theory it shouldn't but experience has showed me the contrary (many times).
I never looked into the precise reason but I guess the memory mapping changes du to the extra gdb libs loaded
Re: SERIOUS: Fatal error: invalid memory access [message #42175 is a reply to message #42174] Tue, 25 February 2014 21:39 Go to previous messageGo to next message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Please note that I ran the DEBUG build in gdb. When I experienced the crashes, I was running a release binary from Honzas PPA.

Best regards,

Tom
Re: SERIOUS: Fatal error: invalid memory access [message #42184 is a reply to message #42175] Wed, 26 February 2014 20:46 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
Attached you will NOT find the gzipped crash report dated 2014/2/24 21:14 because it exceeds maximum file size. It was uploaded by whoopsie to launchpad (or nowhereland?).
So I collected the begin of the report and a stack trace. Perhaps somebody can decode the text file attached.

Re: SERIOUS: Fatal error: invalid memory access [message #42200 is a reply to message #42030] Thu, 27 February 2014 16:56 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
Today it is a segmentation fault and I have a complete Stacktrace. It is within the appended text file.

When I noticed that there is a parameter version=-2147483648 I remembered the comment of uninitialized variable. And indeed, in ide.cpp function SetMain there is a call of LoadFromFile with two parameters only. In Stream.cpp the function LoadFromFile expects three parameters, the third of which is version.

The compiler does not complain because LoadFromFile is not in any header file.

I don't know whether this is the reason but it is worth to look at.
Re: SERIOUS: Fatal error: invalid memory access [message #42203 is a reply to message #42200] Thu, 27 February 2014 17:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
ManfredHerr wrote on Thu, 27 February 2014 10:56

Today it is a segmentation fault and I have a complete Stacktrace. It is within the appended text file.

When I noticed that there is a parameter version=-2147483648 I remembered the comment of uninitialized variable. And indeed, in ide.cpp function SetMain there is a call of LoadFromFile with two parameters only. In Stream.cpp the function LoadFromFile expects three parameters, the third of which is version.

The compiler does not complain because LoadFromFile is not in any header file.



Third parameter has default Null, which is equal to -2147483648 -> this is OK.

However, stack trace leads to conclusion that the problem is in TabBar - and perhaps it only got visible by GTK.

Also, it is very consistent with report about out of memory (while allocating buffer for Image). And with the fact that I do not normally get the crash (I have tabs off).

Thanks a lot, now we are getting somewhere... Smile

Mirek
Re: SERIOUS: Fatal error: invalid memory access [message #42227 is a reply to message #42203] Fri, 28 February 2014 17:50 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
I can support the suspicion of tab bar being the bad. I have a project that reproduced that error when set as main package. As soon as I took away the check mark at persistent tabs the project loaded without problems.
Re: SERIOUS: Fatal error: invalid memory access [message #42230 is a reply to message #42227] Fri, 28 February 2014 19:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Well, I have found another issue, which is easily reproducible (and related GTK in a way that order of some operations, while correct, is different in GTK).

To reproduce:

* Load 'ide' project, go to TabBar.cpp, start searching (Ctrl+F) for "Repos", then click on FileTabs.h.

Basically, it is clicking on file with file dialog in bottom or top of screen (after succesful find).

This second issue is now fixed. I am still investigating TabBar. I think I can fix it easily, but I would like to understand the code more before doing hastily patch.

Mirek
Re: SERIOUS: Fatal error: invalid memory access [message #42231 is a reply to message #42230] Fri, 28 February 2014 20:27 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1118
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

BTW, Mirek can you patch obvious GTK bug: #619.

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: SERIOUS: Fatal error: invalid memory access [message #42239 is a reply to message #42200] Sat, 01 March 2014 11:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
ManfredHerr wrote on Thu, 27 February 2014 10:56

Today it is a segmentation fault and I have a complete Stacktrace. It is within the appended text file.

When I noticed that there is a parameter version=-2147483648 I remembered the comment of uninitialized variable. And indeed, in ide.cpp function SetMain there is a call of LoadFromFile with two parameters only. In Stream.cpp the function LoadFromFile expects three parameters, the third of which is version.

The compiler does not complain because LoadFromFile is not in any header file.

I don't know whether this is the reason but it is worth to look at.


After further analysis of posted crashdump, I was finally able to deduce what went wrong....

Thing is that TabBar::Serialize (at theide start) left TabBar::Tab attributes like 'size' and 'pos' uninitialized.

So on theide start, these start unitialized, then it gets Paint called BEFORE having chance to initialize records by calling Repos.

I have fixed the issue by adding Repos at the end of Serialize, and also (just to be sure) by initializing them in the constructor.

So hopefully, both issues should be now fixed....

Mirek
Re: SERIOUS: Fatal error: invalid memory access [message #42240 is a reply to message #42239] Sat, 01 March 2014 11:34 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
P.S.: The reason why it has started crashing with GTK is that in GTK the Paint call comes sooner that with other platforms - which is really legal by API contract, but different. That exposed the bug...
Previous Topic: GLCtrl problem in Linux after switching to GTK backend
Next Topic: Bug: problem with special characters on Button
Goto Forum:
  


Current Time: Mon Jun 15 03:28:54 GMT+2 2026

Total time taken to generate the page: 0.00824 seconds