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: Installation, Compiling and Running of theide » [BUG] TheIDE startup JPEG error
[BUG] TheIDE startup JPEG error [message #25808] Fri, 12 March 2010 18:26 Go to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi,

I get the following error before getting the package selection dialog when running ide -install:
terminate called after throwing an instance of 'Upp::JpegErrorException'

OS: CentOS 5.1
SVN: rev2221

Do you have any idea?

Matthias
Re: [BUG] TheIDE startup JPEG error [message #25812 is a reply to message #25808] Fri, 12 March 2010 22:29 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Strangely, on Ubuntu 8.04 I get:
terminate called after throwing an instance of 'Upp::PngErrorException'

Does it have something to do with shared linked library versions?

Matthias
Re: [BUG] TheIDE startup JPEG error [message #25813 is a reply to message #25808] Sat, 13 March 2010 09:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
masu wrote on Fri, 12 March 2010 12:26

Hi,

I get the following error before getting the package selection dialog when running ide -install:
terminate called after throwing an instance of 'Upp::JpegErrorException'

OS: CentOS 5.1
SVN: rev2221

Do you have any idea?

Matthias


Actually, yes, recently I have changed both jpg and png to use exceptions instead of setjmp.

Anyway, they should be correctly handled in the code.

Mirek
Re: [BUG] TheIDE startup JPEG error [message #25825 is a reply to message #25813] Sun, 14 March 2010 13:51 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
It seems there is a problem with "icon16x16.png" loading for the package selection dialog.
If I choose the bazaar directory it tries to load image
bazaar/DockCtrl/icon16x16.png which is not present!
Here ist the backtrace of debug session (the call is in step #17):
#0  0xb7faa410 in __kernel_vsyscall ()
#1  0xb7bda085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7bdba01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7dea480 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6
#4  0xb7de7d05 in ?? () from /usr/lib/libstdc++.so.6
#5  0xb7de7d42 in std::terminate () from /usr/lib/libstdc++.so.6
#6  0xb7de7e6a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7  0x08546a1c in png_user_error_fn (png_ptr=0x8990b68, error_msg=0x86a61a8 "Error reading input file!")
    at /home/masu/upp-svn/uppsrc/plugin/png/pngupp.cpp:38
#8  0xb7e3ec89 in png_error () from /usr/lib/libpng12.so.0
#9  0x085480d7 in png_read_stream (png_ptr=0x8990b68, buffer=0x8990e50 "", length=8) at /home/masu/upp-svn/uppsrc/plugin/png/pngupp.cpp:18
#10 0xb7e34c12 in ?? () from /usr/lib/libpng12.so.0
#11 0xb7e33d5c in png_read_info () from /usr/lib/libpng12.so.0
#12 0x085471b8 in Upp::PNGRaster::Init (this=0xb7730620) at /home/masu/upp-svn/uppsrc/plugin/png/pngupp.cpp:113
#13 0x0854776f in Upp::PNGRaster::Create (this=0xb7730620) at /home/masu/upp-svn/uppsrc/plugin/png/pngupp.cpp:126
#14 0x08461c71 in Upp::StreamRaster::Open (this=0xb7730620, _s=@0xbf93969c) at /home/masu/upp-svn/uppsrc/Draw/Raster.cpp:182
#15 0x08468a86 in Upp::StreamRaster::OpenAny (s=@0xbf93969c) at /home/masu/upp-svn/uppsrc/Draw/Raster.cpp:234
#16 0x08474ff1 in Upp::StreamRaster::LoadAny (s=@0xbf93969c, progress=@0xbf9396e0) at /home/masu/upp-svn/uppsrc/Draw/Raster.cpp:244
#17 0x084771e4 in Upp::StreamRaster::LoadFileAny (fn=0xb7903298 "/usr/share/upp/bazaar/DockCtrl/icon16x16.png", progress=@0xbf939780)
    at /home/masu/upp-svn/uppsrc/Draw/Raster.cpp:251
#18 0x080de7ed in SelectPackageDlg::Load (this=0xbf939f0c, upp=@0xbf939c10, dir=@0xbf939bf8, progress_pos=0, progress_count=1000, 
    case_fixed=@0xbf939b80, cache=@0xbf939afc) at /home/masu/upp-svn/uppsrc/ide/SelectPkg.cpp:561
#19 0x080df2e4 in SelectPackageDlg::Load (this=0xbf939f0c) at /home/masu/upp-svn/uppsrc/ide/SelectPkg.cpp:608
#20 0x080df6c5 in SelectPackageDlg::OnBase (this=0xbf939f0c) at /home/masu/upp-svn/uppsrc/ide/SelectPkg.cpp:383
#21 0x080ef621 in Upp::CallbackMethodAction<SelectPackageDlg, void (SelectPackageDlg::*)()>::Execute (this=0xb7732ef0)
    at /home/masu/upp-svn/uppsrc/Core/Cbgen.h:31
#22 0x083613e6 in Upp::Callback::Execute (this=0xbf93bbe4) at /home/masu/upp-svn/uppsrc/Core/Callback.cpp:11
#23 0x08116e7f in Upp::Callback::operator() (this=0xbf93bbe4) at /home/masu/upp-svn/uppsrc/Core/Cbgen.h:63
#24 0x08265725 in Upp::ArrayCtrl::SetCursor0 (this=0xbf93b18c, i=0, dosel=true) at /home/masu/upp-svn/uppsrc/CtrlLib/ArrayCtrl.cpp:1256
#25 0x08265d60 in Upp::ArrayCtrl::SetCursor (this=0xbf93b18c, i=0) at /home/masu/upp-svn/uppsrc/CtrlLib/ArrayCtrl.cpp:1273
#26 0x080df987 in SelectPackageDlg::SyncBase (this=0xbf939f0c, initvars=@0xbf939e90) at /home/masu/upp-svn/uppsrc/ide/SelectPkg.cpp:640
#27 0x080dfa77 in SelectPackageDlg::Run (this=0xbf939f0c, startwith=@0xbf93cd28) at /home/masu/upp-svn/uppsrc/ide/SelectPkg.cpp:350
#28 0x080e1b88 in SelectPackage (title=0xb79034d8 "Select main package (TheIDE  2010-03-14 12:25)", startwith=0xbf93dbe0 "", selectvars=true, 
    main=true) at /home/masu/upp-svn/uppsrc/ide/SelectPkg.cpp:721
#29 0x080e1e5b in Ide::OpenMainPackage (this=0xbf93ce6c) at /home/masu/upp-svn/uppsrc/ide/ide.cpp:167
#30 0x080e35ad in GuiMainFn_ () at /home/masu/upp-svn/uppsrc/ide/idewin.cpp:1000
#31 0x080e3bc6 in main (argc=Cannot access memory at address 0x1957
) at /home/masu/upp-svn/uppsrc/ide/idewin.cpp:706

Matthias
Re: [BUG] TheIDE startup JPEG error [message #25826 is a reply to message #25825] Sun, 14 March 2010 14:35 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
A quick fix for now is to replace ide/SelectPkg.cpp:562 with

cache[q].icon = IdeImg::Package();

This avoid try loading custom package items for each package in selection dialog.

Matthias
Re: [BUG] TheIDE startup JPEG error [message #25832 is a reply to message #25826] Sun, 14 March 2010 19:04 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
Well, this is really weird, as:

bool PNGRaster::Init()
{
	try {
		if(!(data->png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
		                                            NULL, png_user_error_fn, png_user_warning_fn)))
			return false;
		if(!(data->info_ptr = png_create_info_struct(data->png_ptr)))
			return false;
		png_set_read_fn(data->png_ptr, &GetStream(), png_read_stream);
		png_read_info(data->png_ptr, data->info_ptr); <<--- line 113
		return true;
	}
	catch(PngErrorException) {
		return false;
	}
}


So the last call from U++ is in try block, with catch provided....

So either I do not understand C++ exceptions well, or something is wrong with compiler? Perhaps it is not possible to catch exception over C code? (That would be pity, because I have switched from setjmp as it does not work in Win64...)

Mirek
Re: [BUG] TheIDE startup JPEG error [message #25833 is a reply to message #25832] Sun, 14 March 2010 19:23 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
luzr wrote on Sun, 14 March 2010 19:04



So either I do not understand C++ exceptions well, or something is wrong with compiler? Perhaps it is not possible to catch exception over C code? (That would be pity, because I have switched from setjmp as it does not work in Win64...)

Mirek


IIRC, C exceptions are handled quite differently than c++ ones, with __try and __exception blocks (I don't remember if names are exactly this...). I think you should enclose C code on a C exception, using c++ one won't work.

Ciao

Max
Re: [BUG] TheIDE startup JPEG error [message #25834 is a reply to message #25833] Sun, 14 March 2010 19:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
mdelfede wrote on Sun, 14 March 2010 14:23

luzr wrote on Sun, 14 March 2010 19:04



So either I do not understand C++ exceptions well, or something is wrong with compiler? Perhaps it is not possible to catch exception over C code? (That would be pity, because I have switched from setjmp as it does not work in Win64...)

Mirek


IIRC, C exceptions are handled quite differently than c++ ones, with __try and __exception blocks (I don't remember if names are exactly this...). I think you should enclose C code on a C exception, using c++ one won't work.

Ciao

Max



Well, I think it is the safe bet. I will encapsulate all calls in C library interface (with setjmp) that will be called by C++.

And I thought I have a free evening tonight...

Mirek
Re: [BUG] TheIDE startup JPEG error [message #25837 is a reply to message #25834] Sun, 14 March 2010 23:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
Should be fixed now, please check.

Mirek
Re: [BUG] TheIDE startup JPEG error [message #25844 is a reply to message #25837] Mon, 15 March 2010 12:27 Go to previous message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Mirek,

it works again Smile!

Thanx,
Matthias
Previous Topic: Problem installing theIDE 2224
Next Topic: [MINGW] WIN32 compile errors
Goto Forum:
  


Current Time: Sun Nov 17 00:51:11 CET 2019

Total time taken to generate the page: 0.02150 seconds