SkotOS icon indicating copy to clipboard operation
SkotOS copied to clipboard

BUG: too small string size

Open shentino opened this issue 3 years ago • 5 comments

May 4 17:15:55 ** error:String too long [caught] error: /usr/System/sys/tool/vault error: 732 - work error: 202 - spawn_object_from_state error:1115 /kernel/lib/auto read_file May 4 17:15:55 ** Error spawning Bodies:UrMainbody May 4 17:15:56 ** error:String too long [caught] error: /usr/System/sys/tool/vault error: 732 - work error: 202 - spawn_object_from_state error:1115 /kernel/lib/auto read_file May 4 17:15:56 ** Error spawning Data:DB:mhelp May 4 17:15:56 ** error:String too long [caught] error: /usr/System/sys/tool/vault error: 732 - work error: 202 - spawn_object_from_state error:1115 /kernel/lib/auto read_file

I'm almost certain this is due to failure to use a sufficiently large maximum string size in the DGD binary.

Suggested solution is a subroutine invoked by INITD->create() that will abort the startup process if certain configuration or status() values fail a sanity check.

I suggest checking max array size and max string size for starters.

I can come up with a patch for this myself if needed but atm the priority is to report the issue. I have higher priorities to deal with irl atm so for now a report will have to suffice until I can get more free time unless someone else wants to take care of this first.

shentino avatar May 05 '22 00:05 shentino

That all makes sense. Were you using a DGD that was built in non-SkotOS configuration (since SkotOS needs a bigger-than-default string size), or did mHelp and/or Mainbody wind up needing more space with something you had changed?

Your solution seems reasonable regardless, I'm just trying to figure out when the problem happens so I can prioritise it :-)

noahgibbs avatar May 05 '22 08:05 noahgibbs

I don't know, and my opinion 8s that 2hat matters more is when the setting can be detected

Imo tripping a sanity check early in the startup process is more productive than wasting effort on a bootup that a preventable error may well have contaminated

I'll come up with a patch, give me 48 hours

shentino avatar May 05 '22 15:05 shentino

If you want to beat me to it, either check the stderr during cold boot out of the box with 16 bit ssize or focus on INITD::create()

shentino avatar May 05 '22 18:05 shentino

I'm not likely to beat you to it this week.

noahgibbs avatar May 05 '22 18:05 noahgibbs

See PR 114

shentino avatar May 05 '22 22:05 shentino