#35244 closed defect (fixed)
hexfiend 2.1.2 fails to compile XIB: The value for Key (NSTag) is too large to fit into a 32 bit integer.
Reported by: | 200309@… | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.1 |
Keywords: | snowleopard | Cc: | dweber@… |
Port: | hexfiend |
Description
hexfiend 2.1.2 BUILD FAILED 10.6.8
Attachments (1)
Change History (13)
Changed 12 years ago by 200309@…
Attachment: | hexfiend-build-fail.txt added |
---|
comment:1 Changed 12 years ago by mf2k (Frank Schima)
Cc: | dweber@… added |
---|---|
Keywords: | snowleopard added; snow leopard 10.6.8 removed |
Owner: | changed from macports-tickets@… to cal@… |
Summary: | hexfiend 2.1.2 ** BUILD FAILED ** 10.6.8 → hexfiend 2.1.2 build failed 10.6.8 |
comment:2 Changed 12 years ago by neverpanic (Clemens Lang)
Status: | new → assigned |
---|---|
Summary: | hexfiend 2.1.2 build failed 10.6.8 → hexfiend 2.1.2 fails to compile XIB: The value for Key (NSTag) is too large to fit into a 32 bit integer. |
comment:3 follow-up: 4 Changed 12 years ago by neverpanic (Clemens Lang)
I fear there might be no easy fix.
The problem is caused by the tag values used for two menu entries in the menu bar switching the text encoding to UTF-16 (little and big endian). Since NSStringEncoding
is an integer the tag value of these menu entries directly represents the encoding to be used (NSUTF16BigEndianStringEncoding = 0x90000100 = 2415919360
and NSUTF16LittleEndianStringEncoding = 0x94000100 = 2483028224
). Both of these values fit into 32 bit, but both have the MSB set (which means they would be negative if interpreted in a signed fashion).
Could you try editing MainMenu.xib and replacing those numbers with their signed interpretations in decimal representation, i.e.
sudo port clean HexFiend sudo port patch HexFiend cd $(port work HexFiend)/HexFiend-2.1.2/English.lproj sudo -u macports sed -E -e 's/2415919360/-1879047936/g' -e 's/2483028224/-1811939072/g' -i '' MainMenu.xib sudo port build HexFiend
and see if it still breaks?
comment:4 Changed 12 years ago by 200309@…
Replying to cal@…:
Could you try editing MainMenu.xib and replacing those numbers with their signed interpretations in decimal representation, i.e.
...
and see if it still breaks?
ok... no error messages.
What is the next step to getting it to install?
112456 sudo port clean --all hexfiend Password: ---> Cleaning HexFiend 112514 sudo port install hexfiend ---> Fetching archive for HexFiend ---> Attempting to fetch HexFiend-2.1.2_1.darwin_10.i386.tbz2 from http://packages.macports.org/HexFiend ---> Fetching distfiles for HexFiend ---> Attempting to fetch HexFiend-2.1.2.tar.gz from http://distfiles.macports.org/HexFiend/2.1.2_1 ---> Verifying checksum(s) for HexFiend ---> Extracting HexFiend ---> Applying patches to HexFiend ---> Configuring HexFiend ---> Building HexFiend Error: org.macports.build for port HexFiend returned: command execution failed Please see the log file for port HexFiend for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_hexfiend/HexFiend/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port hexfiend failed 112703 sudo port clean HexFiend \ > && sudo port patch HexFiend \ > && cd $(port work HexFiend)/HexFiend-2.1.2/English.lproj \ > && sudo -u macports sed -E -e 's/2415919360/-1879047936/g' -e 's/2483028224/-1811939072/g' -i '' MainMenu.xib \ > && sudo port build HexFiend Password: ---> Cleaning HexFiend ---> Fetching distfiles for HexFiend ---> Verifying checksum(s) for HexFiend ---> Extracting HexFiend ---> Applying patches to HexFiend ---> Configuring HexFiend ---> Building HexFiend 113540
comment:5 follow-up: 6 Changed 12 years ago by neverpanic (Clemens Lang)
Just run port install HexFiend like you usually do; it should pick up where you left it and continue.
I can turn this into a patch, but I still have to test whether this will still work correctly on 64 bit systems, where using -1879047936 will turn into 0xFFFFFFFF90000100. If this gets casted to drop the leading 4 bytes, this can safely be applied on 64 bit, too, otherwise I'll have to find a way to apply the patch depending on the build architecture.
comment:6 Changed 12 years ago by 200309@…
Replying to cal@…:
Just run port install HexFiend like you usually do; it should pick up where you left it and continue.
I can turn this into a patch, but I still have to test whether this will still work correctly on 64 bit systems, where using -1879047936 will turn into 0xFFFFFFFF90000100. If this gets casted to drop the leading 4 bytes, this can safely be applied on 64 bit, too, otherwise I'll have to find a way to apply the patch depending on the build architecture.
HexFiend did install, and seems to work well.
So far the only thing that did not work is command+E (Use Selection for Find).
152400 sudo port install hexfiend Password: ---> Fetching archive for HexFiend ---> Attempting to fetch HexFiend-2.1.2_1.darwin_10.i386.tbz2 from http://packages.macports.org/HexFiend ---> Staging HexFiend into destroot ---> Installing HexFiend @2.1.2_1 ---> Activating HexFiend @2.1.2_1 ---> Cleaning HexFiend ---> Updating database of binaries: 100.0% ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. 152612 which hexfiend 155751 open -a hex\ fiend .vimrc 155808
comment:7 follow-up: 9 Changed 12 years ago by neverpanic (Clemens Lang)
Can you confirm "UTF-16 Little" and "UTF-16 Big" from the "Text Encoding" menu work as expected, since that's what we've been patching?
comment:8 follow-up: 10 Changed 12 years ago by neverpanic (Clemens Lang)
Cmd+E doesn't work for me on the 64 bit build either, btw. Does this work with the DMG offered by the HexFiend project? If not, you should take the bug report there.
comment:9 Changed 12 years ago by 200309@…
Replying to cal@…:
Can you confirm "UTF-16 Little" and "UTF-16 Big" from the "Text Encoding" menu work as expected, since that's what we've been patching?
Well. I can only tell you it looks like Chinese to me, and "UTF-16 Little" is different from "UTF-16 Big".
comment:10 Changed 12 years ago by 200309@…
Replying to cal@…:
Cmd+E doesn't work for me on the 64 bit build either, btw. Does this work with the DMG offered by the HexFiend project? If not, you should take the bug report there.
In the dmg version 2.0.0 Cmd+E also does NOT work.
And the zip version 2.1.2 crashes on:
Processor Name: Intel Core Duo
Processor Speed: 2 GHz
even though it seems to be compiled both 32 and 64 bit:
220256 file Hex\ Fiend Hex Fiend: Mach-O universal binary with 2 architectures Hex Fiend (for architecture x86_64): Mach-O 64-bit executable x86_64 Hex Fiend (for architecture i386): Mach-O executable i386 220259
This is the first part of the crash log:
Process: Hex Fiend [403] Path: /Users/tech/Downloads/Hex Fiend.app/Contents/MacOS/Hex Fiend Identifier: com.ridiculousfish.HexFiend Version: 2.1.2 (200) Code Type: X86 (Native) Parent Process: launchd [92] Date/Time: 2012-07-19 21:45:54.734 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSKeyedUnarchiver decodeInt32ForKey:]: value (2483028224) for key (NSTag) too large to fit in 32-bit integer'
comment:11 Changed 12 years ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
64 bit systems just drop the leading 4 bytes of the integer before using it as value for NSStringEncoding
, which means we can safely apply this on both 32 and 64 bit systems.
I've done this in r95739. I will also report this upstream.
comment:12 Changed 12 years ago by neverpanic (Clemens Lang)
Reported upstream via GitHub: https://github.com/ridiculousfish/HexFiend/pull/12
Do you have a 32-bit system? The log shows you're trying to build HexFiend in i386. Did you set
build_arch
in macports.conf?The problem is: