macOS. "ImageIO PNGReadPlugin" Crash (Issue #23547)

211 views
Skip to first unread message

Mark Yang

unread,
May 14, 2023, 5:08:30 PM5/14/23
to wx-...@googlegroups.com, Subscribed

Description

Below Error Happened from time to time.

frame #0: 0x000000000bad4007
error: memory read failed for 0xbad4000
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xbad4007)
  * frame #0: 0x000000000bad4007
    frame #1: 0x00007ff821b71d6f ImageIO`PNGReadPlugin::InitializePluginData(IIOImageReadSession*, IIODictionary*, IIODictionary*, CGImageMetadata*, CGColorSpace**, ReadPluginData&, PNGPluginData&, __CFDictionary*) + 917
    frame #2: 0x00007ff821b719d2 ImageIO`PNGReadPlugin::initialize(IIODictionary*) + 62
    frame #3: 0x00007ff821b692e9 ImageIO`IIOReadPlugin::callInitialize() + 113
    frame #4: 0x00007ff821b68fad ImageIO`IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 79
    frame #5: 0x00007ff821b6688b ImageIO`IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 715
    frame #6: 0x00007ff821b7357f ImageIO`IIOImageSource::createImageAtIndex(unsigned long, IIODictionary*) + 57
    frame #7: 0x00007ff821b73473 ImageIO`CGImageSourceCreateImageAtIndex + 268
    frame #8: 0x00007ff81d568188 HIServices`setCursorFromBundle + 1819
    frame #9: 0x00007ff81d5673df HIServices`CoreCursorSetAndReturnSeed + 170
    frame #10: 0x00007ff81aff8dfd AppKit`-[NSCursor _reallySet] + 678
    frame #11: 0x00007ff81b000d48 AppKit`+[NSCursor _setOverrideCursor:type:] + 296
    frame #12: 0x00007ff81b0003ac AppKit`-[NSWindow(NSWindowResizing) _edgeResizingCursorUpdate:atLocation:] + 281
    frame #13: 0x00007ff81b04fadb AppKit`-[NSThemeFrame mouseEntered:] + 65
    frame #14: 0x00007ff81b04fa30 AppKit`-[NSTrackingArea _dispatchMouseEntered:] + 146
    frame #15: 0x00007ff81b5172d2 AppKit`-[_NSTrackingAreaAKManager _updateActiveTrackingAreasForWindowLocation:modifierFlags:] + 6776
    frame #16: 0x00007ff81b518707 AppKit`-[_NSTrackingAreaAKManager mouseMoved:] + 463
    frame #17: 0x00007ff81b82cb5a AppKit`_routeMouseMovedEvent + 281
    frame #18: 0x00007ff81afccd33 AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 472
    frame #19: 0x00007ff81afcc93f AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 345
    frame #20: 0x00000001002c2002 crossbow`-[wxNSWindow sendEvent:](self=0x00000001043197c0, _cmd="sendEvent:", event=0x00006000037312c0) at nonownedwnd.mm:177:9
    frame #21: 0x00007ff81b633d02 AppKit`routeMouseMovedEvent + 140
    frame #22: 0x00007ff81afcb808 AppKit`-[NSApplication(NSEvent) sendEvent:] + 1608
    frame #23: 0x00000001001d6851 crossbow`-[wxNSApplication sendEvent:](self=0x0000000104305b20, _cmd="sendEvent:", anEvent=0x00006000037312c0) at utils.mm:359:9
    frame #24: 0x00007ff81b285bbe AppKit`-[NSApplication _handleEvent:] + 65
    frame #25: 0x00007ff81ae5acdd AppKit`-[NSApplication run] + 623
    frame #26: 0x00000001002b04f4 crossbow`wxGUIEventLoop::OSXDoRun(this=0x0000600002640b40) at evtloop.mm:301:13
    frame #27: 0x0000000100119b84 crossbow`wxCFEventLoop::DoRun(this=0x0000600002640b40) at evtloop_cf.cpp:326:13
    frame #28: 0x0000000100056221 crossbow`wxEventLoopBase::Run(this=0x0000600002640b40) at evtloopcmn.cpp:87:12
    frame #29: 0x000000010000da4a crossbow`wxAppConsoleBase::MainLoop(this=0x00000001043041c0) at appbase.cpp:363:37
    frame #30: 0x000000010000d589 crossbow`wxAppConsoleBase::OnRun(this=0x00000001043041c0) at appbase.cpp:281:12
    frame #31: 0x000000010030eeb8 crossbow`wxAppBase::OnRun(this=0x00000001043041c0) at appcmn.cpp:334:26
    frame #32: 0x000000010023b676 crossbow`wxApp::OnRun(this=0x00000001043041c0) at app.cpp:356:23
    frame #33: 0x000000010009127d crossbow`wxEntry(argc=0x00000001009b569c, argv=0x00006000000041c0) at init.cpp:473:26
    frame #34: 0x0000000100091426 crossbow`wxEntry(argc=0x00007ff7bfeff588, argv=0x00007ff7bfeff840) at init.cpp:483:12
    frame #35: 0x0000000100762ed3 crossbow`main(argc=1, argv=0x00007ff7bfeff840) at main.cpp:4:1
    frame #36: 0x00007ff8179a341f dyld`start + 1903
(lldb) 

Platform and version information

  • wxWidgets version 3.2.2
  • wxWidgets port wxOSX
  • OS macOS 13.3.1


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547@github.com>

oneeyeman1

unread,
May 14, 2023, 6:54:20 PM5/14/23
to wx-...@googlegroups.com, Subscribed

@markyang59 ,
Do you have a PNG that produces it?
And a simple code that can be run to see the crash?

Thank you.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547019735@github.com>

Mark Yang

unread,
May 14, 2023, 8:00:48 PM5/14/23
to wx-...@googlegroups.com, Subscribed

Here is the only part uses PNG files

	 toolbar->AddTool(ID_TOOL_CONNECT      , wxT("CONNECT")     , wxBitmapPNG(L"/img/connect_b.png"));
	 toolbar->AddTool(ID_TOOL_DISCONNECT   , wxT("DISCONNECT")  , wxBitmapPNG(L"/img/disconnect_b.png"));		
	 toolbar->AddSeparator();
	 toolbar->AddSpacer(10);
	 toolbar->AddTool(ID_TOOL_SEND         , wxT("SEND")        , wxBitmapPNG(L"/img/send_b.png"));
	 toolbar->AddSpacer(10);
	 toolbar->AddTool(ID_TOOL_RECV         , wxT("RECV")        , wxBitmapPNG(L"/img/recv_b.png"));
	 toolbar->AddSpacer(10);
	 toolbar->AddTool(ID_TOOL_STOP         , wxT("STOP")        , wxBitmapPNG(L"/img/stop_b.png"));
	 toolbar->AddSpacer(5);
	 toolbar->AddTool(ID_TOOL_DELETE       , wxT("DELETE")      , wxBitmapPNG(L"/img/delete_b.png"));
	 toolbar->AddSpacer(10);
	 toolbar->AddSeparator();
	 toolbar->AddSpacer(10);
	 toolbar->AddTool(ID_TOOL_INBOX        , wxT("INBOX")       , wxBitmapPNG(L"/img/inbox_b.png"));		
	 toolbar->AddTool(ID_TOOL_OUTBOX       , wxT("OUTBOX")      , wxBitmapPNG(L"/img/outbox_b.png"));
	 toolbar->AddTool(ID_TOOL_WATCHBOX     , wxT("WATCHBOX")    , wxBitmapPNG(L"/img/watchbox_b.png"));
	 toolbar->AddSeparator();		
	 toolbar->AddTool(ID_TOOL_SPEED_RESET  , wxT("SPEED RESET") , wxBitmapPNG(L"/img/reset_b.png"));			
	 toolbar->AddTool(ID_TOOL_SPEED_UP     , wxT("SPEED UP"  )  , wxBitmapPNG(L"/img/up_b.png"));		
	 toolbar->AddTool(ID_TOOL_SPEED_DOWN   , wxT("SPEED DOWN")  , wxBitmapPNG(L"/img/down_b.png"));

And here is all PNG files used

https://www.dropbox.com/s/41vc75bwqlhkbst/PNG.zip


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547035444@github.com>

Mark Yang

unread,
May 15, 2023, 12:17:46 AM5/15/23
to wx-...@googlegroups.com, Subscribed

Closed #23547 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23547/issue_event/9241885191@github.com>

Mark Yang

unread,
May 15, 2023, 12:17:46 AM5/15/23
to wx-...@googlegroups.com, Subscribed

I found the problem.
When creating wxBitmap add a button for wxAuiToolBar.
wxBitmap object should be in the same scope as the toolbar.
If the bitmap object is deleted before toolbar creation is finished.
Memory will be corrupted.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547170418@github.com>

VZ

unread,
May 15, 2023, 8:51:41 AM5/15/23
to wx-...@googlegroups.com, Subscribed

I found the problem. When creating wxBitmap add a button for wxAuiToolBar. wxBitmap object should be in the same scope as the toolbar. If the bitmap object is deleted before toolbar creation is finished. Memory will be corrupted.

No, this shouldn't happen. Please try reproducing the problem with a minimal patch to the aui sample and attach this patch here and reopen if you can do it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547802532@github.com>

Mark Yang

unread,
May 15, 2023, 9:45:32 AM5/15/23
to wx-...@googlegroups.com, Subscribed

Sorry. The same error occurred after some running time.
It's very hard to reproduce this error.
It happens from time to time and even worse. it took time to happen.
How can I catch it ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547887725@github.com>

Mark Yang

unread,
May 15, 2023, 9:45:32 AM5/15/23
to wx-...@googlegroups.com, Subscribed

Reopened #23547.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23547/issue_event/9246908035@github.com>

VZ

unread,
May 15, 2023, 9:52:30 AM5/15/23
to wx-...@googlegroups.com, Subscribed

The usual first step: build with ASAN and/or run under Valgrind.

Unless you can reproduce the problem in the sample, is also very likely due to some unrelated bug in your application and not wx itself.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547898496@github.com>

Mark Yang

unread,
May 15, 2023, 10:38:48 AM5/15/23
to wx-...@googlegroups.com, Subscribed

this sympom appered only after upgrade wx to latest version.
It seems related with Cursor change..


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1547997866@github.com>

VZ

unread,
May 15, 2023, 11:33:31 AM5/15/23
to wx-...@googlegroups.com, Subscribed

Sorry, which cursor change? Also, what was the last version with which it worked and the current one, with which it doesn't? Could you be running into #23545 (which I'll try to fix soon)?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548090070@github.com>

Mark Yang

unread,
May 15, 2023, 5:31:45 PM5/15/23
to wx-...@googlegroups.com, Subscribed

In my posted log. The system (not my app) trying to change the cursor which seems depends on some PNG image.
and a crash happens there.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548615996@github.com>

Mark Yang

unread,
May 15, 2023, 5:41:03 PM5/15/23
to wx-...@googlegroups.com, Subscribed

The most suspicious part is wxAuiToolBar creation with a PNG file

toolbar = new wxAuiToolBar(this,ID_TOOL_1,wxDefaultPosition,wxDefaultSize,
		wxAUI_TB_DEFAULT_STYLE|wxAUI_TB_TEXT|wxAUI_TB_PLAIN_BACKGROUND);
toolbar->SetToolBitmapSize(wxSize(28,28));
toolbar->AddTool(ID_TOOL_CONNECT , wxT("CONNECT") , wxBitmap("img/connect_b.png",wxBITMAP_TYPE_PNG));

with the above code, the error happens after some time.
with the below alternative code. the error seems disappeared (with poor image quality)

toolbar->AddTool(ID_TOOL_CONNECT , wxT("CONNECT") , wxBitmap(xpm_connect));

connect_b
Here is used PNG file


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548630137@github.com>

Mark Yang

unread,
May 15, 2023, 5:43:14 PM5/15/23
to wx-...@googlegroups.com, Subscribed

My app was ok with wxWidget 3.1.8
and
the problem happens with the latest wxWidget 3.2.2


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548633750@github.com>

Mark Yang

unread,
May 15, 2023, 5:50:15 PM5/15/23
to wx-...@googlegroups.com, Subscribed

My problem seems to stem from #23514.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548641732@github.com>

VZ

unread,
May 15, 2023, 6:23:18 PM5/15/23
to wx-...@googlegroups.com, Subscribed

My app was ok with wxWidget 3.2.1 the problem happens with the latest wxWidget 3.2.2 and My problem seems to stem from #23514.

This can't be the case because #23514 only affects master (pre-3.3.0). If you're using master, please retest when this is fixed. If you really use 3.2.2, please consider running git-bisect to find the exact commit which broke it for you, there are not that many of them between 3.2.1 and .2.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548694771@github.com>

Mark Yang

unread,
May 15, 2023, 6:32:19 PM5/15/23
to wx-...@googlegroups.com, Subscribed

Sorry.
I got the source from git directly and compiled it (hoping to any bug fix applied)

git clone https://github.com/wxWidgets/wxWidgets.git --recurse-submodules


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548702599@github.com>

VZ

unread,
May 15, 2023, 7:26:30 PM5/15/23
to wx-...@googlegroups.com, Subscribed

Please retry with the latest master (you need to run git pull) and check if 563cc11 in it helps.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1548743762@github.com>

Mark Yang

unread,
May 16, 2023, 4:26:28 AM5/16/23
to wx-...@googlegroups.com, Subscribed

Dear.
I downloaded it with git and compiled it.
More than 5 hours. My App runs well!
It seems your work fixed this error.
Thank you very much!
I will test my app until tomorrow and
if it runs well I will close this issue


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1549214994@github.com>

Mark Yang

unread,
May 16, 2023, 5:22:04 PM5/16/23
to wx-...@googlegroups.com, Subscribed

This is fixed with 563cc11
Thank you!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1550370364@github.com>

Mark Yang

unread,
May 16, 2023, 5:22:05 PM5/16/23
to wx-...@googlegroups.com, Subscribed

Closed #23547 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23547/issue_event/9262559054@github.com>

Mark Yang

unread,
May 16, 2023, 5:58:29 PM5/16/23
to wx-...@googlegroups.com, Subscribed

Reopened #23547.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23547/issue_event/9262796083@github.com>

Mark Yang

unread,
May 16, 2023, 5:59:35 PM5/16/23
to wx-...@googlegroups.com, Subscribed

Error happened again :(
Still, same error message related with PNGReadPlugin


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1550408539@github.com>

VZ

unread,
May 16, 2023, 6:21:19 PM5/16/23
to wx-...@googlegroups.com, Subscribed

Sorry, if it's not due to this, you will have to give us something to work with as otherwise I just have no idea.

As I said, you have several possibilities:

  1. Use ASAN/valgrind to try to find the actual bug.
  2. Modify the aui (or another) sample to reproduce the problem.
  3. Run git bisect to find the exact commit which broke it.

I'd definitely start with (1) as this should be pretty useful in any case, but I could try to do something if you do (2) or (3).

But without any more information it's just not going to be possible to do anything about this, sorry.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1550426376@github.com>

Mark Yang

unread,
May 17, 2023, 7:16:59 PM5/17/23
to wx-...@googlegroups.com, Subscribed

I can fix this crash with a code change
Previous with error:

 toolbar->AddTool(ID_TOOL_CONNECT      , wxT("CONNECT")     , wxBitmap("img/connect_b.png"	,wxBITMAP_TYPE_PNG));

Error fixed with this change

bmp_connect	= new wxBitmap("img/connect_b.png"  ,wxBITMAP_TYPE_PNG);
toolbar->AddTool(ID_TOOL_CONNECT     , wxT("CONNECT")    , *bmp_connect);

Using local wxBitmap seems to cause this error.
Allocate wxBitmap in a heap. fixed this.
I hope this can be a hint for fix error.
Thank you very much..


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1552203471@github.com>

Mark Yang

unread,
May 17, 2023, 7:17:04 PM5/17/23
to wx-...@googlegroups.com, Subscribed

Closed #23547 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23547/issue_event/9274355850@github.com>

VZ

unread,
May 17, 2023, 7:19:33 PM5/17/23
to wx-...@googlegroups.com, Subscribed

No, this is definitely wrong, you're leaking a wxBitmap here. Moreover, I'm pretty sure this doesn't fix anything and you will see the problem again in the future. You must be corrupting the heap elsewhere in your program, but I'm not a magician and can't tell you more. Why you don't use ASAN to find it out remains a mystery to me, however.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/1552204859@github.com>

PythonCoderAS

unread,
May 31, 2024, 4:57:00 PM5/31/24
to wx-...@googlegroups.com, Subscribed

I found this while Googling part of my stack trace, it seems to be a known problem, narrowed down to having libpng installed to /opt/homebrew/lib and having /opt/homebrew/lib in env var DYLD_LIBRARY_PATH. https://github.com/orgs/Homebrew/discussions/5420


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2142966985@github.com>

Mark Yang

unread,
May 31, 2024, 7:17:00 PM5/31/24
to wx-...@googlegroups.com, Subscribed

Thank you !
This helps a lot !


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2143097200@github.com>

Mikkel Kruse Johnsen

unread,
Oct 23, 2024, 6:50:26 AM10/23/24
to wx-...@googlegroups.com, Subscribed

How can you have "libpng" installed without this crash happening ?

Why is the crash happening in the first place (having libpng installed) ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2431716670@github.com>

VZ

unread,
Oct 23, 2024, 7:57:38 AM10/23/24
to wx-...@googlegroups.com, Subscribed

I guess the crash happens because of some ABI mismatch between the different libpng versions (maybe due to version mismatch).

Having libpng installed shouldn't be a problem, it's just loading it which is problematic, so don't do this.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2431887791@github.com>

Mikkel Kruse Johnsen

unread,
Oct 23, 2024, 8:04:10 AM10/23/24
to wx-...@googlegroups.com, Subscribed

But I have Gtk installed and that needs "libpng" to work (else I have to change my entire icon set).

But what is the other version, that is installed. I do not have any other "libpng" installed. ?

I can't find "libpng" in the system either. So where is the mismatch ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2431902349@github.com>

VZ

unread,
Oct 23, 2024, 8:20:23 AM10/23/24
to wx-...@googlegroups.com, Subscribed

I don't know, sorry. If you use this libpng for building wxWidgets, there shouldn't be any problem.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2431942984@github.com>

Mikkel Kruse Johnsen

unread,
Oct 23, 2024, 8:24:21 AM10/23/24
to wx-...@googlegroups.com, Subscribed

What do you mean by "this" libpng ?

Is there a special version for wxWidgets ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2431962431@github.com>

VZ

unread,
Oct 23, 2024, 8:48:28 AM10/23/24
to wx-...@googlegroups.com, Subscribed

When you build wxWidgets you can use either the libpng bundled with it or one already installed on the system. You need to do the latter if you have to use that one in your application.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2432046029@github.com>

Mark Yang

unread,
Oct 23, 2024, 10:14:45 AM10/23/24
to wx-...@googlegroups.com, Subscribed

Thank you for solving long lasting problem.
I have fixed this problem with

--with-libpng=sys

option when make configuration


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2432352043@github.com>

Mikkel Kruse Johnsen

unread,
Oct 30, 2024, 5:40:50 AM10/30/24
to wx-...@googlegroups.com, Subscribed

So the problem is that "dotnet" links to "CoreServices" that uses "ImageIO" framework. The ImageIO framework is using a "libPng.dylib" (I assume is very old). But if another "libpng" is installed from Homebrew or any other. Then normally you would have this:

libpng16.16.dylib
libpng.dylib -> libpng16.16.dylib
libpng16.dylib -> libpng16.16.dylib

The crash is because the "libpng.dylib" symbolic link is present, then the ImageIO framework tries to load that "libpng" and it do not match the API it expected.

So the simple solution is to delete the "libpng.dylib" symbolic link.

I would think the same solution could be used here. But not sure.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2446347038@github.com>

VZ

unread,
Oct 30, 2024, 10:03:39 AM10/30/24
to wx-...@googlegroups.com, Subscribed

Wait, where does dotnet come from here?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2447276472@github.com>

Mikkel Kruse Johnsen

unread,
Oct 31, 2024, 2:23:04 AM10/31/24
to wx-...@googlegroups.com, Subscribed

The dotnet is just what caused my problem. But I wrote it here, because it could be the same solution for this bug.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/2449082643@github.com>

Brendan Shanks

unread,
Jul 25, 2025, 12:19:28 PMJul 25
to wx-...@googlegroups.com, Subscribed
mrpippy left a comment (wxWidgets/wxWidgets#23547)

The correct solution here is to set DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH, so that ImageIO loads its own libPng rather than the Homebrew one.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23547/3119132411@github.com>

Reply all
Reply to author
Forward
0 new messages