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 » Copy and Paste changes colors in Icon Edit [BUG]
Copy and Paste changes colors in Icon Edit [BUG] [message #6021] Sat, 28 October 2006 19:32 Go to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
I have opend the following picture with "the gimp" and copied it, then pasted it into theIDE icon editor and the screwbar changed from red to blue ... looks good, too, but wasn't what I expected Wink

index.php?t=getfile&id=320&private=0

Bas

[edit: the format was png, and it happened with other icons, too. It seems like red and blue are always switched]
  • Attachment: copypaste.jpg
    (Size: 9.65KB, Downloaded 2433 times)

[Updated on: Sat, 28 October 2006 20:16]

Report message to a moderator

Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6148 is a reply to message #6021] Wed, 01 November 2006 09:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Interesting.

Are other colors in TheIDE icons ok?

If so, even more interesting... The format used to pass images through clipboard is (surprisingly) .bmp first and .png if .bmp is not available.

Maybe in 64-bits there is some problem with RGBA structure...

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6152 is a reply to message #6148] Wed, 01 November 2006 10:15 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
found another nice icon with all colors: green seems to be ok, only the red and blue channels seem to be switched
index.php?t=getfile&id=328&private=0

Bas

[Updated on: Wed, 01 November 2006 10:15]

Report message to a moderator

Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6153 is a reply to message #6152] Wed, 01 November 2006 10:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sure, that is obvious.

The question is when switching happens.

It can be in Draw or it can be in .bmp routines or in .png routines....

BTW, are "small" icon previes OK?

Or something else - could you please post complete screenshot so I can check more? This one is too small....

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6154 is a reply to message #6153] Wed, 01 November 2006 10:34 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
the preview is wrong, too

just have a look at the new (complete) screenshot

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6158 is a reply to message #6154] Wed, 01 November 2006 10:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fallingdutch wrote on Wed, 01 November 2006 04:34

the preview is wrong, too

just have a look at the new (complete) screenshot

Bas


OK, all colors seem to be correct EXCEPT for that pasted icon.

Therefore definitely looks like the bug in .bmp or .png decoder.

It would be interesting to find out which one Smile

Could you please build debug version of ide and place some LOGs to ReadClipboardImage (CtrlCore/X11ImgClip.cpp) to find out whether it is .bmp or .png?

Are you running 32 bit or 64 bit ide?

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6159 is a reply to message #6158] Wed, 01 November 2006 11:38 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
luzr wrote on Wed, 01 November 2006 10:56


Could you please build debug version of ide and place some LOGs to ReadClipboardImage (CtrlCore/X11ImgClip.cpp) to find out whether it is .bmp or .png?


When doing so my ide crashes with a heap error at the moment, that could be the Problem i found somewhere in the forum when using two iml files: http://www.arilect.com/upp/forum/index.php?t=msg&th=1617 &start=0&

* ide 01.11.2006 12:33:22, user: bas

GetProperty
XAtomName(property) = _NET_SUPPORTED
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 32
type = 4
after = 0
nitems = 25
GetProperty
XAtomName(property) = _NET_WORKAREA
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 32
type = 6
after = 0
nitems = 24
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0

Heap is corrupted

MemoryWatchFree(0x0x2aaaac3bed30);

Memory at 0x2AAAAC3BED30, size 0x240 = 576
    +0 0x00002AAAAC3BED30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
   +16 0x00002AAAAC3BED40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
   +32 0x00002AAAAC3BED50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF     ...............�
   +48 0x00002AAAAC3BED60 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00     ...........�....
Heap is corrupted
strerror_r(0, 1024) -> errno = 0
strerror_r(0, 1024) -> errno = 0

Will complete recompile to test again, in release mode, too

luzr wrote on Wed, 01 November 2006 10:56


Are you running 32 bit or 64 bit ide?


64 bit

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6162 is a reply to message #6159] Wed, 01 November 2006 12:00 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Icon Designer works in release mode, but i am unable to work with it in debug mode - crashes each time with a heap error
* ide 01.11.2006 13:05:18, user: bas

GetProperty
XAtomName(property) = _NET_SUPPORTED
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 32
type = 4
after = 0
nitems = 25
GetProperty
XAtomName(property) = _NET_WORKAREA
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 32
type = 6
after = 0
nitems = 24
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0
GetProperty
XAtomName(property) = _NET_FRAME_EXTENTS
X Error: BadAtom (invalid Atom parameter), request: X_GetAtomName, resource id: 0 = 0
XAtomName(rtype) = 
rsize = 65435
format = 0
type = 0
after = 0
nitems = 0


Heap is corrupted

MemoryWatchFree(0x0x2aaaac98fd30);

Memory at 0x2AAAAC98FD30, size 0x240 = 576
    +0 0x00002AAAAC98FD30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
   +16 0x00002AAAAC98FD40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
   +32 0x00002AAAAC98FD50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF     ...............�
   +48 0x00002AAAAC98FD60 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00     ...........�....
Heap is corrupted

[Updated on: Wed, 01 November 2006 12:01]

Report message to a moderator

Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6165 is a reply to message #6162] Wed, 01 November 2006 12:20 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Just an idea, recently we accidentally found a bug that most likely blows 64-bits.

Please check in Draw/RasterEncoder:

void RasterEncoder::WriteLine(const RGBA *s)
{
	memcpy(line, s, size.cx * sizeof(RGBA));
	WriteLine();
}


Buggy version is with "sizeof(s)" (typo), which unfortunately works in 32 bits, but not in 64...

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6167 is a reply to message #6165] Wed, 01 November 2006 13:04 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
yes, had the version with sizeof(s) - changed it and debug mode works now.
strange is: it works in release mode with the bug ...

The format was PNG.

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6169 is a reply to message #6167] Wed, 01 November 2006 13:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fallingdutch wrote on Wed, 01 November 2006 07:04

yes, had the version with sizeof(s) - changed it and debug mode works now.
strange is: it works in release mode with the bug ...

The format was PNG.

Bas


Well, in release heap corruption is not tested...

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6172 is a reply to message #6169] Wed, 01 November 2006 14:00 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
but the image is still not pasted correctly Sad

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6177 is a reply to message #6172] Wed, 01 November 2006 19:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Downloading suse 64bit now Smile

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6180 is a reply to message #6177] Wed, 01 November 2006 20:18 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
thanks a lot, Mirek

that is what you call SUPPORT! Very Happy

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6181 is a reply to message #6180] Wed, 01 November 2006 20:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fallingdutch wrote on Wed, 01 November 2006 14:18

thanks a lot, Mirek

that is what you call SUPPORT! Very Happy

Bas



Actually, do not stop complaining please! Wink

(there is a lot going on now, chances I forget about this problem are high...)

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6192 is a reply to message #6181] Thu, 02 November 2006 07:49 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
luzr wrote on Wed, 01 November 2006 20:27


Actually, do not stop complaining please! Wink


I won't, Mirek I won't Smile

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6252 is a reply to message #6192] Sat, 04 November 2006 20:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Fixed.

Mirek
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6258 is a reply to message #6252] Sun, 05 November 2006 00:17 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
luzr wrote on Sat, 04 November 2006 20:19

Fixed.

Mirek

thanks Mirek, sounds like a "recopy and paste all of your icons" Smile

can you give me a patch or how will i get it? next dev-version?

Bas
Re: Copy and Paste changes colors in Icon Edit [BUG] [message #6262 is a reply to message #6258] Sun, 05 November 2006 06:13 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
dev release will be today or tommorow... As there is one critical other problem fixed, I strongly recommend to download it...

If you want it even faster, in Draw/RasterFormat.cpp, remove LINUX versions of SetRGBA and IsRGBA method and make WIN32 the only one valid.

Mirek
Previous Topic: Ctrl * GetCallbackCtrl()
Next Topic: UPT documentation updated
Goto Forum:
  


Current Time: Fri Apr 19 08:36:35 CEST 2024

Total time taken to generate the page: 0.04503 seconds