nomad-software / tkd

GUI toolkit for the D programming language based on Tcl/Tk
MIT License
117 stars 16 forks source link

example fails on osx #33

Closed extrawurst closed 8 years ago

extrawurst commented 8 years ago
$ dub --config=example
Performing "debug" build using dmd for x86_64.
x11 1.0.9: building configuration "library"...
tcltk 8.6.5: building configuration "library"...
tkd ~master: building configuration "example"...
Linking...
Running ./build/example/example
2015-12-20 16:47:32.272 example[14499:450785] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1404.34/AppKit.subproj/NSBitmapImageRep.m:1289
2015-12-20 16:47:32.276 example[14499:450785] An uncaught exception was raised
2015-12-20 16:47:32.276 example[14499:450785] Invalid parameter not satisfying: cgImage != NULL
2015-12-20 16:47:32.276 example[14499:450785] (
    0   CoreFoundation                      0x00007fff92b53ae2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff85b6ff7e objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff92b538ba +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff904c988c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   AppKit                              0x00007fff8c78685f -[NSBitmapImageRep initWithCGImage:] + 149
    5   Tk                                  0x00000001052a35f4 TkPutImage + 1750
    6   Tk                                  0x00000001052a355e TkPutImage + 1600
    7   Tk                                  0x00000001052ab3f5 TkMacOSXClearMenubarActive + 3046
    8   Tk                                  0x0000000105233a11 TkSetWindowMenuBar + 10987
    9   Tk                                  0x0000000105232d00 TkSetWindowMenuBar + 7642
    10  Tk                                  0x0000000105232e53 TkSetWindowMenuBar + 7981
    11  Tk                                  0x0000000105232320 TkSetWindowMenuBar + 5114
    12  Tcl                                 0x000000010511345a Tcl_ListMathFuncs + 1981
    13  Tcl                                 0x0000000105114633 Tcl_EvalEx + 1941
    14  Tcl                                 0x0000000105113eb8 Tcl_EvalEx + 26
    15  example                             0x0000000104c887af D3tkd11interpreter3tcl3Tcl9__T4evalZ4evalMFNbAyaZv + 147
    16  example                             0x0000000104ce2698 D3tkd6widget4menu4menu4Menu41__T8addEntryTC3tkd6widget4menu4menu4MenuZ8addEntryMFC3tkd5image5image5ImageAyaDFS3tkd7element7element11CommandArgsZvAyaAyaZC3tkd6widget4menu4menu4Menu + 412
    17  example                             0x0000000104c63ed3 D4main11Application10createMenuMFZv + 1111
    18  example                             0x0000000104c68d0c D4main11Application13initInterfaceMFZv + 616
    19  example                             0x0000000104c8b56c D3tkd14tkdapplication14TkdApplication6__ctorMFZC3tkd14tkdapplication14TkdApplication + 48
    20  example                             0x0000000104c693b9 D4main11Application6__ctorMFZC4main11Application + 21
    21  example                             0x0000000104c5f6e8 _Dmain + 40
    22  example                             0x0000000104d01718 D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40
    23  example                             0x0000000104d0165d D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 45
    24  example                             0x0000000104d016bd D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv + 45
    25  example                             0x0000000104d0165d D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 45
    26  example                             0x0000000104d015d3 _d_run_main + 499
    27  example                             0x0000000104c5f7b2 main + 34
    28  libdyld.dylib                       0x00007fff8c1f05ad start + 1
)
2015-12-20 16:47:32.277 example[14499:450785] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgImage != NULL'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff92b53ae2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff85b6ff7e objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff92b538ba +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff904c988c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   AppKit                              0x00007fff8c78685f -[NSBitmapImageRep initWithCGImage:] + 149
    5   Tk                                  0x00000001052a35f4 TkPutImage + 1750
    6   Tk                                  0x00000001052a355e TkPutImage + 1600
    7   Tk                                  0x00000001052ab3f5 TkMacOSXClearMenubarActive + 3046
    8   Tk                                  0x0000000105233a11 TkSetWindowMenuBar + 10987
    9   Tk                                  0x0000000105232d00 TkSetWindowMenuBar + 7642
    10  Tk                                  0x0000000105232e53 TkSetWindowMenuBar + 7981
    11  Tk                                  0x0000000105232320 TkSetWindowMenuBar + 5114
    12  Tcl                                 0x000000010511345a Tcl_ListMathFuncs + 1981
    13  Tcl                                 0x0000000105114633 Tcl_EvalEx + 1941
    14  Tcl                                 0x0000000105113eb8 Tcl_EvalEx + 26
    15  example                             0x0000000104c887af D3tkd11interpreter3tcl3Tcl9__T4evalZ4evalMFNbAyaZv + 147
    16  example                             0x0000000104ce2698 D3tkd6widget4menu4menu4Menu41__T8addEntryTC3tkd6widget4menu4menu4MenuZ8addEntryMFC3tkd5image5image5ImageAyaDFS3tkd7element7element11CommandArgsZvAyaAyaZC3tkd6widget4menu4menu4Menu + 412
    17  example                             0x0000000104c63ed3 D4main11Application10createMenuMFZv + 1111
    18  example                             0x0000000104c68d0c D4main11Application13initInterfaceMFZv + 616
    19  example                             0x0000000104c8b56c D3tkd14tkdapplication14TkdApplication6__ctorMFZC3tkd14tkdapplication14TkdApplication + 48
    20  example                             0x0000000104c693b9 D4main11Application6__ctorMFZC4main11Application + 21
    21  example                             0x0000000104c5f6e8 _Dmain + 40
    22  example                             0x0000000104d01718 D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40
    23  example                             0x0000000104d0165d D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 45
    24  example                             0x0000000104d016bd D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv + 45
    25  example                             0x0000000104d0165d D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 45
    26  example                             0x0000000104d015d3 _d_run_main + 499
    27  example                             0x0000000104c5f7b2 main + 34
    28  libdyld.dylib                       0x00007fff8c1f05ad start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Program exited with code -6
nomad-software commented 8 years ago

Do you realise you posted this exact same issue 10 months ago which was answered? https://github.com/nomad-software/tkd/issues/27

extrawurst commented 8 years ago

No I did not realize that, otherwise I wouldn't have posted this. Anyhow I would suggest to add some note in the readme. I may not be the only noob who is not able to figure that out. It is like this: I actually checked the tcl version with brew. It is just that current osx seems to be coming with 8.5 natively and installing brew does not make a difference for what dub uses to link. I still have no idea how to force it to...

nomad-software commented 8 years ago

Please read the other issue. It is in the readme.

extrawurst commented 8 years ago

I guess you again mean: https://github.com/nomad-software/tkd#libraries which says nothing regarding my problem. To be specific: how do I make dub use another library from a specific folder to link ? or do you use dynamic linking ? if so, how can I influence what is used ? the only hint in the readme is: "use package manager to install the current version" but that is actually not the end of the story as stated above.

nomad-software commented 8 years ago

Unfortunately I can't provide everything. I can only tell you what needs to be done to make the library function correctly. I think it's plain to understand from the documentation that Tkd requires Tcl/Tk v8.6 or greater. It's up to you as a developer to make sure you are linking the correct versions of those libraries.