2019-09-21 15:02 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002670NetSurfABENDpublic2019-07-19 09:26
ReporterVincent Sanders 
Assigned To 
SeveritycrashReproducibilityhave not tried 
StatusclosedResolutionfixed 
Product Version3.9 
Target Version3.9Fixed in Version3.9 
Summary0002670: visiting site causes assert
Descriptionvisit site and get an assert

nsgtk: desktop/browser.c:3461: browser_window_console_log: Assertion `msglen > 0' failed.
Additional InformationThread 1 "nsgtk" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff33c242a in __GI_abort () at abort.c:89
0000002 0x00007ffff33b9e67 in __assert_fail_base (fmt=<optimized out>,
    assertion=assertion@entry=0x5555558070cb "msglen > 0",
    file=file@entry=0x555555806f21 "desktop/browser.c", line=line@entry=3461,
    function=function@entry=0x555555807510 <__PRETTY_FUNCTION__.10255> "browser_window_console_log")
    at assert.c:92
#3 0x00007ffff33b9f12 in __GI___assert_fail (assertion=assertion@entry=0x5555558070cb "msglen > 0",
    file=file@entry=0x555555806f21 "desktop/browser.c", line=line@entry=3461,
    function=function@entry=0x555555807510 <__PRETTY_FUNCTION__.10255> "browser_window_console_log")
    at assert.c:101
#4 0x00005555556f673f in browser_window_console_log (bw=<optimized out>,
    src=src@entry=BW_CS_SCRIPT_CONSOLE, msg=0x555555eb8780 "", msglen=0,
    flags=flags@entry=BW_CS_FLAG_LEVEL_LOG) at desktop/browser.c:3461
#5 0x00005555555f0130 in write_log_entry (ctx=ctx@entry=0x5555560ad410, group=0,
    flags=flags@entry=BW_CS_FLAG_LEVEL_LOG) at build/Linux-gtk/duktape/console.c:82
#6 0x00005555555f023f in dukky_console_log (ctx=0x5555560ad410) at Console.bnd:110
#7 0x00005555556b2343 in duk__handle_call_raw (thr=thr@entry=0x5555560ad410,
    idx_func=idx_func@entry=3, call_flags=call_flags@entry=8)
    at content/handlers/javascript/duktape/duktape.c:64268
#8 0x00005555555dde58 in duk_handle_call_unprotected (call_flags=8, idx_func=3, thr=0x5555560ad410)
    at content/handlers/javascript/duktape/duktape.c:64422
#9 duk__executor_handle_call (call_flags=<optimized out>, nargs=0, idx=3, thr=0x5555560ad410)
    at content/handlers/javascript/duktape/duktape.c:10148
#10 duk__js_execute_bytecode_inner (entry_act=entry_act@entry=0x5555567c7aa0,
    entry_thread=<optimized out>) at content/handlers/javascript/duktape/duktape.c:12222
#11 0x00005555556b1796 in duk_js_execute_bytecode (exec_thr=exec_thr@entry=0x5555560ad410)
    at content/handlers/javascript/duktape/duktape.c:75946
#12 0x00005555556b25b4 in duk__handle_call_raw (thr=thr@entry=0x5555560ad410,
    idx_func=idx_func@entry=0, call_flags=0) at content/handlers/javascript/duktape/duktape.c:64240
#13 0x00005555556d7381 in duk_handle_call_unprotected (call_flags=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    idx_func=<optimized out>, thr=0x5555560ad410) at content/handlers/javascript/duktape/duktape.c:64422
#14 duk__pcall_raw (thr=thr@entry=0x5555560ad410, udata=udata@entry=0x7fffffffbb68)
    at content/handlers/javascript/duktape/duktape.c:14323
#15 0x00005555556b9af0 in duk__handle_safe_call_inner (num_stack_rets=1, idx_retbase=0,
    entry_thread_state=1 '\001', entry_curr_thread=0x0, udata=0x7fffffffbb68,
    func=0x5555556d7340 <duk__pcall_raw>, thr=0x5555560ad410)
    at content/handlers/javascript/duktape/duktape.c:64475
#16 duk_handle_safe_call (thr=0x5555560ad410, func=0x5555556d7340 <duk__pcall_raw>,
    udata=0x7fffffffbb68, num_stack_args=<optimized out>, num_stack_rets=1)
    at content/handlers/javascript/duktape/duktape.c:64720
#17 0x00005555556c8f6e in duk_pcall (thr=<optimized out>, nargs=nargs@entry=0)
    at content/handlers/javascript/duktape/duktape.c:14342
#18 0x00005555556a9f8d in js_exec (ctx=0x555555eb3e60,
    txt=txt@entry=0x7fffe5712010 "function be_responsive(e){log(\"Breakpoint hit: \"+e),page_setup_ongoing()}function width_to_respond_size(e){return 480>e?320:768>e?480:992>e?768:992}function hide_sticky_nav(e){e=\"undefined\"!=typeof e?"..., txtlen=158586,
    name=0x555556676ce8 "https://gmg.futurecdn.net/gizmodo/media/scripts/master.js")
    at content/handlers/javascript/duktape/dukky.c:816
#19 0x0000555555695943 in convert_script_sync_cb (script=<optimized out>, event=<optimized out>,
    pw=0x555556183240) at content/handlers/html/html_script.c:316
#20 0x00005555556e52e9 in hlcache_content_callback (c=<optimized out>, msg=<optimized out>,
    data=<optimized out>, pw=<optimized out>) at content/hlcache.c:195
#21 0x00005555556662ac in content_broadcast (c=0x555556366490, msg=CONTENT_MSG_DONE, data=0x0)
    at content/content.c:800
#22 0x000055555566636d in content_set_done (c=c@entry=0x555556366490) at content/content.c:321
#23 0x00005555556a8811 in javascript_convert (c=0x555556366490)
    at content/handlers/javascript/content.c:67
#24 0x0000555555666452 in content_convert (c=0x555556366490) at content/content.c:282
#25 content_llcache_callback (llcache=<optimized out>, event=<optimized out>, pw=0x555556366490)
    at content/content.c:170
#26 0x00005555556e7597 in llcache_object_notify_users (object=object@entry=0x555556180dc0)
---Type <return> to continue, or q <return> to quit---
    at content/llcache.c:3191
#27 0x00005555556e7650 in llcache_catch_up_all_users (ignored=<optimized out>) at content/llcache.c:3617
#28 0x000055555572746a in schedule_run () at frontends/gtk/schedule.c:132
#29 0x00005555557199d2 in nsgtk_main () at frontends/gtk/gui.c:429
#30 0x00005555555dd493 in main (argc=<optimized out>, argv=<optimized out>) at frontends/gtk/gui.c:1206
(gdb) up 4
#4 0x00005555556f673f in browser_window_console_log (bw=<optimized out>,
    src=src@entry=BW_CS_SCRIPT_CONSOLE, msg=0x555555eb8780 "", msglen=0,
    flags=flags@entry=BW_CS_FLAG_LEVEL_LOG) at desktop/browser.c:3461
3461 assert(msglen > 0);
(gdb) list
3456 {
3457 browser_window_console_flags log_level = flags & BW_CS_FLAG_LEVEL_MASK;
3458 struct browser_window *root = browser_window_get_root(bw);
3459
3460 assert(msg != NULL);
3461 assert(msglen > 0);
3462
3463 /* bw is the target of the log, but root is where we log it */
3464
3465 NSLOG(netsurf, DEEPDEBUG, "Logging message in %p targetted at %p", root, bw);
(gdb) up
#5 0x00005555555f0130 in write_log_entry (ctx=ctx@entry=0x5555560ad410, group=0,
    flags=flags@entry=BW_CS_FLAG_LEVEL_LOG) at build/Linux-gtk/duktape/console.c:82
82 if (browser_window_console_log(priv_win->win, BW_CS_SCRIPT_CONSOLE,
(gdb) list
77 duk_pop(ctx);
78
79 duk_size_t msglen;
80 const char *msg = duk_safe_to_lstring(ctx, 0, &msglen);
81
82 if (browser_window_console_log(priv_win->win, BW_CS_SCRIPT_CONSOLE,
83 msg, msglen,
84 flags) != NSERROR_OK) {
85 NSLOG(netsurf, DEBUG, "Unable to log: %s", duk_safe_to_string(ctx, 0));
86 }
(gdb) p msg
$1 = <optimized out>
(gdb) p msglen
$2 = 0
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
URL of problem pagehttps://gizmodo.com/
Attached Files

-Relationships
+Relationships

-Notes
Vincent Sanders

~0001962

Vincent Sanders (administrator)

kinnison fixed logging of zero length
Vincent Sanders

~0002000

Vincent Sanders (administrator)

we believe this issue has been resolved in NetSurf 3.9
+Notes

-Issue History
Date Modified Username Field Change
2019-06-07 21:12 Vincent Sanders New Issue
2019-06-13 10:23 Vincent Sanders Status new => resolved
2019-06-13 10:23 Vincent Sanders Resolution open => fixed
2019-06-13 10:23 Vincent Sanders Fixed in Version => 3.9
2019-06-13 10:23 Vincent Sanders Note Added: 0001962
2019-07-19 09:26 Vincent Sanders Status resolved => closed
2019-07-19 09:26 Vincent Sanders Note Added: 0002000
+Issue History