Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

TStream.Write causes kernel oblivion on Cosmos Userkit Body: I asked for a byte. The kernel gave me an existential crisis.

Open jukereise opened this issue 1 year ago • 9 comments

Area of Cosmos - What area of Cosmos are we dealing with?

file i/o

Expected Behaviour - What do you think that should happen

an file read should happen

Actual Behaviour - What unexpectedly happens?

vm crashes

Reproduction - How did you get this error to appear?

do any reading/writing using streams

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

userkit ,newest one

jukereise avatar Jul 21 '25 00:07 jukereise

Got the faulty code we can look at?

LoxyMono avatar Jul 21 '25 00:07 LoxyMono

There is no 2025 userkit, unless you built one yourself. Either way, this repo hasn't been touched in half a year, so I assume latest version.

9xbt avatar Jul 21 '25 00:07 9xbt

Also, explain yourself better.

9xbt avatar Jul 21 '25 00:07 9xbt

var entry = fs.CreateFile(@"0:\logtest.txt"); var stream = entry.GetFileStream(); stream.WriteByte(69); // Just write 'E' stream.Close(); is the faulty code

jukereise avatar Jul 21 '25 10:07 jukereise

was asleep

jukereise avatar Jul 21 '25 10:07 jukereise

I recommend using dev kit if you don't use System.IO but vfs only, this fixed some bugs for me.

Melvovin avatar Sep 18 '25 14:09 Melvovin

Aren't you usually meant to use Dispose on Streams and not Close?

TheVogels avatar Sep 18 '25 15:09 TheVogels

uhh this kernel project was dropped an long time ago, stop talking about it

jukereise avatar Dec 02 '25 13:12 jukereise

You posted this issue on the CosmosOS repository, not on your own, personal one. Were you reporting an issue with your own personal project, or with CosmosOS? If it's the former, then we recommend using either the issue tracker on your own repo, or discussion. If it's the latter, then you should generally avoid closing issues that haven't been formally resolved yet.

ascpixi avatar Dec 03 '25 07:12 ascpixi