This will happen when attempting to open old 68k libraries with no separate interface file, but may also occur when the interface name or version doesn't exist (although the library version number _should_ prevent that)
I've never been entirely clear on what the correct approach here is, but OS4 has a feature where it will auto open/close a public screen for you. In this case, in the microseconds between unlocking that screen and attempting to close it, OS4 has already disposed of the screen and NetSurf has crashed, so we assume the owner will handle the closing instead.
Previously the expected behaviour for front ends using the correct
API for hotlist, global history, cookie manager, and ssl cert
viewer was that the front end would initialise the treeview module
on startup and finalise it on application exit.
However, this meant that the front ends had to include the core
treeview header, which they didn't otherwise need.
Since the tree module provided access to the new treeview utilities
through the old tree API, and was used by front ends with no changes
for the new treeview API, the tree layer refcounted initialisations
of treeview-based widgets, and only called the underlying treeview
init/fini functions when needed.
This change moves that refcounting into the treeview module. Now
the hotlist, global history, cookie manager, and ssl cert viewer
widgets call call treeview init/fini as part of their own
initialisation and finalisation. This means that front ends
using the correct APIs for treeview-based widgets don't need to
know anything about the underlying treeview, and the tree module
compatibility layer has had its treeview refcounting removed.
Finally, the treeview_init function took a font size parameter.
Now it does not and lit gets font size from config. We probably
want to add a new `treeview_font_size` option to nsoptions, and
have differnent defaults on different platforms. 12pt on RISC OS,
and 11pt elsewhere, most likely.
Add some more debug:
It appears that some timer events are not being picked up, I can see in the log that something which should have been signalled is not being run.
Enabling the log appears to make the situation worse.
This is a hang-over from the old polling scheduler. I've modified it to use relative times and pass the callback along with the TimeRequest so events get executed in the order they arrive.
The list of events is still in a heap sorted by expected execution time, but this may need to change to something more efficient for random lookups.
TimerRequests are removed from the message queue by WaitIO() which is ultimately called when the event is taken off the heap.
The event on the top of the heap is _not necessarily_ the one which signalled us, though, and we should probably be handling this better.
This removes the toskip parameter, which was only used by the RISC OS
front end. The toskip param was used to skip 8 characters which did
not need to be escaped from the start of the URL. The RISC OS front
end now orders the steps of its URL construction to avoid the need
for this.
The avoids situations were we threw away the length, only for
the caller to have to strlen the returned string.
Note, there seems to be a case of the amiga front end writing
beyond end of allocation. Added a TODO for now.