OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000684OMNeT++runtime / Tkenvpublic2013-11-12 12:312013-12-11 15:36
Reporterandras 
Assigned Toandras 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSMac OS XOS Version10.9
Product Version4.3 
Target VersionFixed in Version4.4 
Summary0000684: Module icons are missing in Tkenv
DescriptionWhen 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000820)
andras (administrator)
2013-11-12 12:36
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.

(0000821)
andras (administrator)
2013-11-12 12:46

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.
(0000822)
andras (administrator)
2013-11-12 13:18

Tk_PhotoGetImage + Tk_PhotoPutBlock doesn't fix a bogus image.
(0000823)
andras (administrator)
2013-11-15 16:10

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.
(0000829)
merturk (reporter)
2013-11-19 08:02

You can update tcl and tcllib with macports, It works for me http://dev.omnetpp.org/bugs/view.php?id=683 [^]
(0000830)
andras (administrator)
2013-11-19 11:57

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.
(0000837)
alexmajy (reporter)
2013-11-26 12:43

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.
(0000838)
andras (administrator)
2013-11-26 19:44

Thank you, we'll try it. Maybe it also solves other issues we have with Tkenv on OS X.
(0000839)
alexmajy (reporter)
2013-11-27 00:39

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>
(0000840)
andras (administrator)
2013-11-27 12:46

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.
(0000862)
rhornig (administrator)
2013-12-11 15:36

8 bit alpha channel is converted to 1 bit transparency aon Mac OS X as Tkenv in 10.9 does not display those images.

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker