amaneureka/AtomOS

Crashes with C_String and Cairo

Closed this issue · 9 comments

OS crashes for me after loading up and displaying the window. After commenting out lines which call
C_String in DrawWindow and DrawTaskbar it no longer crashes. Although the text obviously is no longer displayed. Testing the C_String function separately seems to work fine and the data is accessible.
However, when combined with Cairo.ShowText or Cairo.SelectFontFace it seems to crash.

EIP is 3222279488
Kernel.txt
kernel_map.txt

Could you include Debug.log file too?

debug.txt
There is some stack tracing in there. Was seeing if it would help narrow down the issue or not.

EIP: 3222279488 -> 0x‭C0101540‬
Function: System_Int32_System_String_get_Length__
CR2: 12
EDX: 12
EAX: 12

which suggests that string which has been passed to this is probably null. Are you passing a null string or something?

I am assuming there must be some type of stack corruption.
try to increase stack size of main thread here: Start-x86.cs

No, unless Marshal.C_String("") is interpreted as null string?

No, unless Marshal.C_String("") is interpreted as null string?

Nope. It isn't.

would you like to join me on IRC? #atomos @ freenode.net

Seems to now be working without the null check which is very strange. I'm guessing increasing the initial stack size to 0x60000 and thread size to 0x4000 worked?
Might re-download source and do a diff. to look for other changes.

I made changes to Atomic Exchange and GC global tracing, That is not related to this. so I guess it won't affect anything.

Seems to now be working without the null check which is very strange

Indeed, could you try to revert back changes and check again?

Problem solved. Did a fresh build and worked first time.