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 » Crash on "package organizer" entry
Crash on "package organizer" entry [message #49188] Thu, 04 January 2018 20:41 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

I don't know if there is something wrong with my configuration, but recent version of TheIDE (11638) crashes every time I try to enter "Package organizer" menu:
index.php?t=getfile&id=5478&private=0

Stack trace:
20:04:19:466 INFO  GuiMainFn_(): Version: 11638-xenial-amd64-nogtk (64 bit) (GCC) (C++11) (Gtk) Compiled: 01/04/2018 20:01:54
****************** ASSERT FAILED: Assertion failed in /home/zbych/upp/uppsrc/Core/Value.cpp, line 339
type < 0x8000000

Stack trace:
Upp::AddStackTrace(char*, int)
Upp::AssertFailed(char const*, int, char const*)
Upp::Value::Serialize(Upp::Stream&)
Upp::Stream& Upp::operator%<Upp::Value>(Upp::Stream&, Upp::Value&)
Upp::Ctrl::Serialize(Upp::Stream&)
Upp::Stream& Upp::operator%<UppList>(Upp::Stream&, UppList&)
PackageEditor::Serialize(Upp::Stream&)
EditPackages(char const*, char const*, Upp::String&)
Ide::EditWorkspace()
Upp::CallbackN<> Upp::callback<Ide, Ide>(Ide*, void (Ide::*)())::{lambda()#1}::operator()() const
Upp::Function<void ()>::Wrapper<Upp::CallbackN<> Upp::callback<Ide, Ide>(Ide*, void (Ide::*)())::{lambda()#1}>::Execute()
Upp::Function<void ()>::operator()() const
Upp::Function<void ()>::Wrapper2<Upp::Function<void ()> >::Execute()
Upp::Function<void ()>::operator()() const
Upp::Ctrl::Action()
Upp::MenuItem::LeftUp(Upp::Point_<int>, unsigned int)
Upp::Ctrl::MouseEvent(int, Upp::Point_<int>, int, unsigned int)
Upp::Ctrl::MouseEvent0(int, Upp::Point_<int>, int, unsigned int)
Upp::Ctrl::MouseEventH(int, Upp::Point_<int>, int, unsigned int)
Upp::Ctrl::MEvent0(int, Upp::Point_<int>, int)
Upp::Ctrl::DispatchMouseEvent(int, Upp::Point_<int>, int)
Upp::Ctrl::DispatchMouseEvent(int, Upp::Point_<int>, int)
Upp::Ctrl::DispatchMouseEvent(int, Upp::Point_<int>, int)
Upp::Ctrl::DispatchMouse(int, Upp::Point_<int>, int)
Upp::Ctrl::DispatchMouseIn(int, int)


TheIDE fails this assertion:
void Value::Serialize(Stream& s) {
	RegisterStd();
	dword type;
	if(s.IsLoading()) {
		s / type;
		ASSERT(type < 0x8000000); // only Values with assigned real type ID can be serialized
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		Free();
		int st = type == VOID_V ? VOIDV : type == STRING_V ? STRING : type;
		if(st < 0)
			s.LoadError();



Correct me if I am wrong, but this assertion is not necessary and "if(st < 0)" correctly handles case when there is no more data in the stream.
Re: Crash on "package organizer" entry [message #49189 is a reply to message #49188] Thu, 04 January 2018 20:56 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
I guess that it is the same bug as in https://www.ultimatepp.org/forums/index.php?t=msg&th=101 73&goto=48976&#msg_48976
Re: Crash on "package organizer" entry [message #49277 is a reply to message #49189] Mon, 15 January 2018 12:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, I think that the correct should be:

void Value::Serialize(Stream& s) {
	RegisterStd();
	dword type;
	if(s.IsLoading()) {
		s / type;
		if(type >= 0x8000000)
			s.LoadError();
		Free();
		int st = type == VOID_V ? VOIDV : type == STRING_V ? STRING : type;
		if(st == STRING)
			s % data;


But that is fundametaly equivalent to current code in release AFAIK.

Now the real problem here seems to be that UppList->Serialize is called (which is Ctrl::Serialize) instead of UppList->SerializeSettings.

It looks like some stuck configuration of Upp:

void PackageEditor::Serialize(Stream& s) {
	int version = 3;
	s / version;
	if(version >= 3) {
		filelist.SerializeSettings(s);
		package.SerializeSettings(s);
	}
	else {
		s % filelist;
		s % package % package;
	}
	SerializePlacement(s);
	if(version >= 1 && version <= 2) {
		Splitter dummy;
		s % dummy % dummy % dummy % dummy % dummy % dummy;
	}
}


- we should be at version 3 now, calling UppList->SerializeSettings.

Anyway, it should not crash either. If you have it in debugger, on what line exactly in Value::Serialize does it crash?

(If it is ASSERT line, does the crash happens on debug mode only?)

Mirek

[Updated on: Mon, 15 January 2018 12:17]

Report message to a moderator

Re: Crash on "package organizer" entry [message #49278 is a reply to message #49277] Mon, 15 January 2018 13:15 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
mirek wrote on Mon, 15 January 2018 12:16
If you have it in debugger, on what line exactly in Value::Serialize does it crash?
(If it is ASSERT line, does the crash happens on debug mode only?)


Yes it crashes on line ASSERT(type < 0x8000000); and only in debug mode.
index.php?t=getfile&id=5484&private=0

So now I should ask Dolik to update his build scripts, to get rid of this assertion from ubuntu packages.
  • Attachment: 1.png
    (Size: 338.39KB, Downloaded 347 times)
Re: Crash on "package organizer" entry [message #49279 is a reply to message #49278] Mon, 15 January 2018 13:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Zbych wrote on Mon, 15 January 2018 13:15
mirek wrote on Mon, 15 January 2018 12:16
If you have it in debugger, on what line exactly in Value::Serialize does it crash?
(If it is ASSERT line, does the crash happens on debug mode only?)


Yes it crashes on line ASSERT(type < 0x8000000); and only in debug mode.
index.php?t=getfile&id=5484&private=0

So now I should ask Dolik to update his build scripts, to get rid of this assertion from ubuntu packages.


Well, now that would actually mean that it builds theide in debug mode, strange...

Have you tried with tarball?
Re: Crash on "package organizer" entry [message #49287 is a reply to message #49279] Mon, 15 January 2018 22:52 Go to previous message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
mirek wrote on Mon, 15 January 2018 13:35
Well, now that would actually mean that it builds theide in debug mode, strange...

Well, I received response from Honza, that debug version is made on purpose, to let users get debug symbols by installing one extra deb package.

mirek wrote on Mon, 15 January 2018 13:35
Have you tried with tarball?

Since the assertion is gone, I will stick with ubuntu package. It is just more convenient.

Thanks for your help.
Previous Topic: BUG: GtkThemeIcon() declared but not defined
Next Topic: bug? msvc implicit /mt switch
Goto Forum:
  


Current Time: Thu Mar 28 21:45:06 CET 2024

Total time taken to generate the page: 0.01851 seconds