|Anonymous | Login||2019-01-23 19:20 UTC|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000684||OMNeT++||runtime / Tkenv||public||2013-11-12 12:31||2013-12-11 15:36|
|Platform||OS||Mac OS X||OS Version||10.9|
|Target Version||Fixed in Version||4.4|
|Summary||0000684: Module icons are missing in Tkenv|
|Description||When running a simulation under Tkenv, module icons are missing (do not appear). All other icons (toolbar buttons, tree nodes, etc) are OK. No error in .tkenvlog.|
This bug appeared in version 10.9 of OS X, previous versions were OK.
Using the stock Tcl/TkAqua framework.
|Tags||No tags attached.|
edited on: 2013-11-12 12:38
Results of a brief investigation:
GIF files (e.g. old/*) seem to be displayed correctly.
In the Aloha sample, background/terrain.png appears OK, but module icons are missing. The difference between terrain.png and other PNGs (e.g. block/*) is depth: terrain.png is 8-bit, others are 32-bit. Converting block/queue.png to 8-bit PNG confirms that indeed 8-bit PNGs are displayed correctly.
Thus a possible workaround: convert all PNGs to 8-bit.
Since the same OMNeT++ version works on previous versions of OS X, problem is likely outside OMNeT++, e.g. in the shipped Tcl/Tk Aqua framework or (unlikely) OS X.
Upgrading TkPNG inside Tkenv to the latest version (1.6 to 1.18, see http://tkpng.cvs.sourceforge.net/viewvc/tkpng/tkpng/generic/ [^]) did not help.
Regarding the fact that only 8-bit images work, the strange thing is that Tk internally converts all images to 32-bit (see e.g. the colorize and resize functions in tkenv/tkcmd.cc -- they work on 4 bytes per pixel buffers).
Apparently the loading of 32-bit images results in a bogus data structure, different from the result of converting 8-bit images to 32 bits internally.
|Tk_PhotoGetImage + Tk_PhotoPutBlock doesn't fix a bogus image.|
Real cause: images with partial transparency are not displayed. I.e. if image contains 1 pixel where alpha is neither 0 not 255, it is not displayed!
Workaround: convert all alpha values to 0 or 255 on OS X.
|You can update tcl and tcllib with macports, It works for me http://dev.omnetpp.org/bugs/view.php?id=683 [^]|
But the macports version is X11 not the Aqua version, right? So it doesn't look as nice :)
Meanwhile I implemented quantizing the alpha channel to 1 bit in all images in the Tkenv code when the TkAqua lib is in use.
|With homebrew tcl-tck(aqua tk 8.6.0) and xcode 5.0, omnetpp 4.3 can be successfully compiled on Mac OS X Mavericks. And there is no image display problem. However, the C indexer problem of ide seems to remaim.|
|Thank you, we'll try it. Maybe it also solves other issues we have with Tkenv on OS X.|
Sorry, I forgot to mention that, to compile omnetpp 4.3, I have edited two files as follow:
omnetpp-4.3/src/nedxml/nederror.h add #include <string>
omnetpp-4.3/include/simutil.h #include <string.h> ----> #include <string>
|For OMNeT++ 4.4, we'll continue to use the bundled Apple Tcl/Tk version. I tried Tk 8.6.1 from MacPorts. It's TkAqua not X11, but it's no better than the Apple one with the Tkenv fixes I already implemented since 4.3.1. Still no partial transparency (it forces alpha to be 0 or 255 on images), Tkenv still comes up in the background, '-relief sunken' still not implemented for buttons, etc. In only fixes one minor issue, the flickering of the OK button on the initial 'choose config' dialog.|
|8 bit alpha channel is converted to 1 bit transparency aon Mac OS X as Tkenv in 10.9 does not display those images.|
|2013-11-12 12:31||andras||New Issue|
|2013-11-12 12:31||andras||Status||new => confirmed|
|2013-11-12 12:36||andras||Note Added: 0000820|
|2013-11-12 12:38||andras||Note Edited: 0000820|
|2013-11-12 12:46||andras||Note Added: 0000821|
|2013-11-12 13:18||andras||Note Added: 0000822|
|2013-11-15 16:10||andras||Note Added: 0000823|
|2013-11-19 08:02||merturk||Note Added: 0000829|
|2013-11-19 11:57||andras||Note Added: 0000830|
|2013-11-26 12:43||alexmajy||Note Added: 0000837|
|2013-11-26 19:44||andras||Note Added: 0000838|
|2013-11-27 00:39||alexmajy||Note Added: 0000839|
|2013-11-27 12:46||andras||Note Added: 0000840|
|2013-12-11 15:34||rhornig||Assigned To||=> andras|
|2013-12-11 15:36||rhornig||Note Added: 0000862|
|2013-12-11 15:36||rhornig||Status||confirmed => resolved|
|2013-12-11 15:36||rhornig||Fixed in Version||=> 4.4|
|2013-12-11 15:36||rhornig||Resolution||open => fixed|
|Copyright © 2000 - 2019 MantisBT Team|