Search code examples
qtlibiconv

Every single Qt application crashes in one place?


Basically, all of the Qt applications I try to run will crash in one place:

#0  0x0000000000000000 in ?? ()
#1  0x0000000100f4f570 in QIconvCodec::createIconv_t ()
#2  0x0000000100f5043b in QIconvCodec::convertToUnicode ()
#3  0x0000000100032c7e in QString::fromLocal8Bit ()
#4  0x0000000100e7cb89 in QSystemLocale::fallbackLocale ()
#5  0x00000001000161e0 in QLocalePrivate::updateSystemPrivate ()

I suspect it has something to do with iconv as it's not very "stable" on Mac OS X. I have no idea what the issue is, and I've tried to reinstall libiconv from Macports and even built it myself, and I still get the same issue.

Maybe it dlsyms the needed symbol (which might be missing) and then jumps to the address, causing that (hence the 0x0000000000000000 in the backtrace).

What could be the possible issue? (sorry if this is the wrong place to ask it)


Solution

  • I ran into this same issue and ended up building the debug version of the Qt libraries to figure out what was going on. It appears that the Qt library assumes there is a /usr/lib/libconv.dylib on the machine. For my machine the solution was a simple as...

    sudo ln -s /usr/lib/libiconv.2.dylib /usr/lib/libiconv.dylib