meganz / sdk

MEGA C++ SDK
BSD 2-Clause "Simplified" License
1.33k stars 510 forks source link

Crash when using MegaApi with a null basePath parameter #2643

Open oviradoi opened 1 year ago

oviradoi commented 1 year ago

It seems that when I try to use the MegaApi object with a NULL value for the basePath parameter, the app will crash after loading the filesystem. The crash is caused by an assertion in NodeManager::saveNodeInDb.

You can reproduce this with the testmega example app, since it uses a NULL value for basePath.

If I use a non-null value, everything works fine.

I'm not sure if this behavior is expected or not, since the docs say that if we pass a NULL value, the SDK won't use any local cache. I know passing NULL worked fine in an older build of the SDK.