On Mon, 2013-05-13 at 09:08 +0200, Éloi Rivard wrote: > That makes sense. I didn't event understand why it compiled at all :)
It is very common for it not to matter, and not uncommon for it to fail consistently, but I am surprised at seeing apparently random crashes - on one run the label of one menu item was a string that belonged somewhere else altogether. I still haven't seen any crashes since, but I haven't done any serious music typesetting. In this case, if you don't give the prototype for a function it assumes the function returns an int. This only matters if it actually returns something larger - I am guessing that a pointer on a 64-bit architecture might have its top bits corrupted by the optimizer squeezing something else into what it thinks are unused bits in a register. > > I can work on warning suppression, that would maybe make the code > safer. There are one or two cases which I didn't get to the bottom of - type conflicts with built-in functions. And a bunch of warnings that arise from code inside macros that I couldn't quickly fix. And then, most worryingly there are complaints now about storing pointers in integers which I haven't looked closely into, but I imagine could be tricky to fix. > > > > There is a lot of warnings about gtk. Are you referring to the default warning level or -Wall? Richard > > > > 2013/5/12 Richard Shann <[email protected]> > Eloi, > > I was getting a crash when doing File->New. The crash vanished > when I > turned the optimizer off. I re-compiled and noticed that > keymapio.c had > some warnings about prototypes so I put the headers in > keymapio.h, now > the crash has gone away. Before finding this consistent crash > I was just > getting occasional crashes on startup, never the same twice. > Denemo used to be full of warnings on compile, but I have been > reducing > them whenever I work on a file if I can; I hope this is > another case > where it has paid off and that we don't have some threading > bug lurking > in the code. > Below is the backtrace FWIW. > > Richard > > #2 0x00000000004b842b in add_ui ( > menupath=0xffffffffd802a010 <Address 0xffffffffd802a010 > out of > bounds>, > after=0x0, name=0x0) at ../../denemo/src/keyboard.c:195 > #3 0x00000000004b886c in create_command (is_script=<value > optimized > out>, > name=0x7fffd802a0b0 "ScoreTitle", label=<value optimized > out>, > scheme=0x7fffd8033ae0 ";;;ScoreTitle\n(let ((tag > \"ScoreTitle\") > (title ScoreTitle::params))\n\t(define (blank-title)\n\t\t > \t(if (not > (d-DirectiveGet-header-postfix tag))\n\t\t\t\t(begin \n\t\t\t > \t > \t(d-DirectivePut-header-override tag 0) \n\t\t\t\t"..., > tooltip=<value > optimized out>, hidden=0, after=0x0, > menupath=0x0, > fallback=0xffffffffd802a010 <Address 0xffffffffd802a010 > out of > bounds>, > menupaths=0x0, merge=1) at ../../denemo/src/keyboard.c:279 > #4 0x00000000004d9a2f in parseScripts (filename=<value > optimized out>, > interactive=<value optimized out>) > at ../../denemo/src/keymapio.c:56 > #5 parseCommands (filename=<value optimized out>, > interactive=<value optimized out>) > at ../../denemo/src/keymapio.c:213 > #6 parseKeymap (filename=<value optimized out>, > interactive=<value optimized out>) > at ../../denemo/src/keymapio.c:230 > #7 load_xml_keymap (filename=<value optimized out>, > interactive=<value optimized out>) > at ../../denemo/src/keymapio.c:294 > #8 0x000000000046cd86 in instantiate_script (action=0xfd5960) > ---Type <return> to continue, or q <return> to quit--- > at ../../denemo/src/view.c:8003 > #9 0x000000000046d0e5 in activate_script (action=0xfd5960, > param=<value optimized out>) > at ../../denemo/src/view.c:8082 > #10 0x000000000046d248 in scheme_script_callback ( > script=<value optimized out>, params=0x7fffdd149d80) > at ../../denemo/src/view.c:1080 > > > > _______________________________________________ > Denemo-devel mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/denemo-devel > > > > -- > Éloi Rivard - [email protected] > > « On perd plus à être indécis qu'à se tromper. » > _______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
