Fossil Forum

Segfault when trying to upload decent sized Javascript for skin
Login

Segfault when trying to upload decent sized Javascript for skin

Segfault when trying to upload decent sized Javascript for skin

(1) By anonymous on 2022-08-23 10:09:05 [source]

I'm trying to add syntax highlighting to my fossil instance using Prism.js (with the linked config). The minified JS really isn't all that big. However, copying and pasting that source into the Script text box causes a segfault on Fossil 2.19.

(2) By Stephan Beal (stephan) on 2022-08-23 10:20:53 in reply to 1 [link] [source]

However, copying and pasting that source into the Script text box causes a segfault on Fossil 2.19.

i'll look into this later today, thank you for the report. By "script text box" you presumably mean in the skin editor?

Which OS/platform are you on?

FWIW, my tip for including JS/CSS into a skin is to instead check the JS/CSS files into the tree and add links to them in the skin header. There's a documented example over at:

http://fossil.wanderinghorse.net/r/cwal/dir/doc/highlightjs

That greatly simplifies skin maintenance and such files can be linked to from within embedded docs as well, as in this example:

http://fossil.wanderinghorse.net/r/cwal/file?name=whcl/manual/api-index.md&ci=a52a55226a0db78d&txt=1

(3) By anonymous on 2022-08-23 10:24:21 in reply to 2 [link] [source]

No worries.

I tested this some more and it looks like adding any JS at all causes a segfault, even a single character.

I'm on Linux/amd64

(4) By Stephan Beal (stephan) on 2022-08-23 11:15:17 in reply to 1 [link] [source]

The minified JS really isn't all that big.

It also crashes with an empty field. That's now fixed in the trunk. Thank you for reporting it.

(5) By anonymous on 2022-08-23 17:49:03 in reply to 4 [link] [source]

Thank you!