|
From: | Peter Rowat |
Subject: | [XForms] fl_set_gamma halts program! |
Date: | Sat, 4 Nov 2017 08:33:28 -0700 |
I made what seemed like a simple change to my program but got this fatal message: In fl_set_gamma() [flcolor.c:334]: Ignored. Please call fl_set_gamma before fl_initialize() Process 2238 stopped When I call fl_set_gamme before fl_initialize the same message appears, twice! I’ve spent a lot of time trying to fix this, no success so far. I suspect it is related to the fact that I call fl_initialize twice: once to gather some information and exit XForms, then again to run the main display. I’m changing my code to call fl_initialize only once. Is it the case that fl_initialize should never be called twice? Meanwhile, this is the code in flcolor.c that emits the message: fl_set_gamma( double r, double g, double b ) { .... .... if ( fli_imap[ 4 ].grayval ) { /* Too lazy to shuffle colormap around */ M_err( "fl_set_gamma", "Ignored. Please call fl_set_gamma before fl_initialize()" ); return; } ..... } and here is the stack when the process is stopped: Target 0: (modTS) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00000001001ea0d6 libforms.2.dylib`fli_get_cursor_byname + 102 frame #1: 0x0000000100235ae6 libforms.2.dylib`fli_create_window + 166 frame #2: 0x00000001001f6697 libforms.2.dylib`fl_initialize + 5671 frame #3: 0x00000001000023e6 modTS`control_main(argc=1, argv=0x00007fff5fbff7f0) at control.c:212 frame #4: 0x00000001000016ae modTS`main(argc=1, argv=0x00007fff5fbff7f0) at runit1.c:255 frame #5: 0x00007fffea659235 libdyld.dylib`start + 1 Peter |
[Prev in Thread] | Current Thread | [Next in Thread] |