vishnu wrote:
What's it do when you try to launch it, hanging or segfaulting? Because if it's hanging strace should show you where and if it's segfaulting the debugger should do likewise (provided you compiled it with -g passed to the compiler).
It's hanging, quite a ways into the initialization process. Running netsurf with it's '-v' option logs a lot of helpful messages to the terminal. Even without '-v' GTK/GLib are dumping some harmless warnings and a couple of "critical" errors to the terminal, but much earlier than the hang. From running 'netsurf -v':
Code:
Select all
(1.943253) gtk/tabs.c nsgtk_tab_switch_page_after 160: sel 0
(netsurf:7988): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
(netsurf:7988): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(2.062671) content/fetchers/curl.c fetch_curl_setup 382: fetch 10431eb0, url 'http://www.google.com/favicon.ico'
(2.294803) gtk/scaffolding.c nsgtk_new_scaffolding 2108: creation complete
(2.310819) gtk/tabs.c nsgtk_tab_switch_page_after 160: sel 0
(netsurf:7988): GLib-GObject-WARNING **: invalid cast from `(null)' to `GObject'
(netsurf:7988): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(2.312713) desktop/browser.c browser_window_navigate 1810: bw 10404b30, url about:welcome
And much later it hangs with these:
Code:
Select all
(6.352875) content/content.c content_convert 283: content file:///usr/people/jps/netsurf-all-3.1.gcc/workspace/inst/share/netsurf/favicon.png (1056b060)
(6.357992) image/image_cache.c image_cache_add 479: centry 10647dd8, content 1056b060, bitmap 10400740
(6.363513) gtk/window.c gui_window_set_icon 935: Using 10400740 bitmap
However my current hypothesis is that those earlier GTK/GLib messages are the root cause. I
think
it's failing to properly setup the tabs and then later hanging when trying to access that tab. I've tracked that problem to what appears to be a bad pointer in netsurf/gtk/tabs.c, line 162 where NetSurf's nsgtk_tab_switch_page_after callback function calls into GLib's g_object_get_data. Whether or not that's the
actual
cause of the problem remains to be seen. But there's definitely something wrong with the pointers going around there, and that's today's working theory. (But I've had a lot of other false leads.

)
vishnu wrote:
Hmmmm, I just checked and neither strace or gdb are in nekoware! I'm sure Prodev Workshop has a tracer but I have extreme doubt about whether it will understand crap about gcc compiled code.
Well, there are ancient versions of both strace and gdb in SGI's freeware if I get really desperate. (There's also /usr/sbin/strace but that's not the same strace!) Prodev Workshop has been on my "must learn" list for a while, but so far I have zero experience with it.
But the
real
problem is that I tend to get frustrated and angry when debugging other people's code. Screaming "why doesn't it work?" isn't exactly the best debugging process, but one that I employ a lot.

That, and the fact that I can only work on it during evenings and weekends are slowing things down a bit.
BTW, for anyone interested: I did manage to remove the GCC-specific flags from the Makefiles and compile NetSurf with MIPSpro. That one fails even earlier in the launch process (no window ever appears, it just prints an error message and exits). Oh well.