Strange MaxIDE bug

Started by TomToad, July 16, 2018, 21:05:41

Previous topic - Next topic

TomToad

ran across a very odd bug in MaxIDE today.  It affects both vanilla and NG versions.  It's not a major bug, but the results were very interesting.  Thought I'd share it via YouTube video. :)
------------------------------------------------
8 rabbits equals 1 rabbyte.

Derron

That is a windows-only thing I assume.

Why?
In Linux the Drag'n'Drop or "ctrl + c" is actually copying the URI (file path) of the image. So pasting it into MaxIDE (does not matter if GTK, FLTK - or a scintilla-textarea instead of the maxgui-one) results in pasting eg.
/home/ronny/Arbeit/Programmieren/Tools/cerberus/examples/mojo2/rendererdemo/rendererdemo.data/t3_SPECULAR.png
instead of the content of this image file.



I tried it in my XP-vm and it did not paste the image there - so maybe the underlaying textarea-widget changed from then to yours? BTW it pasted "nothing", so no URI, no image.


bye
Ron

therevills

I first I thought the bug was the bubbles ;)

It would be cool if the tank was saved in the code... imagine the code you could write!

TomToad

This is a very strange "bug" indeed.  Seems that it is actually the unicode character $FFFC being saved in the file.  This "bug" also appears in a maxgui textarea, GadgetText(TextArea) also returns the code $FFFC.  Where does the actual image exist?

Screenshot shows a textarea with a bunch of images.  The status bar on the bottom shows the hex value of what is actually written to the text area.
------------------------------------------------
8 rabbits equals 1 rabbyte.

col

#4
Nice find!  :)

As far as I can remember the win32 text area is a richedit control backed by an OLE object for the data. The image would be stored in the OLE object data. The text is only a part of the data available so I would expect you need to use other win32 APIs to extract correct information regarding the image, including saving and loading it correctly in order to keep image intact.

Correct me if I'm wrong but I believe the MaxIDE uses the same textarea gadget from MaxGUI, and the NG IDE now uses scintilla... which also has the 'image in text' feature.
https://github.com/davecamp

"When you observe the world through social media, you lose your faith in it."