libtinysmb unstable/unusable
Posted: Sat Aug 23, 2008 3:12 am
Hi all.
I've made a small app (with source) that demonstates some problems with libtinysmb.
You will need to create a smb.conf file on your SD card (an example is included in the zip file) and have a file of suitable size on your smb share to test with.
There are two #defines in the source to adjust, SMB_READSIZE and SMB_READBYTES, see the comments in the source for more info.
Unless I'm making a mistake in my use of libtinysmb, here's what I found:
* libtinysmb cannot read more than approx 132096 bytes from a single file (could be slightly more, always crashes before I can see)
* Reading more than 4096 bytes at a time is unstable as SMB_ReadFile will return bogus read values even though smb.c indicates a maximum read size of 63488 bytes
* Calling SMB_ReadFile more than 60 times for a single file is prone to crashing the Wii
Here's the test app: http://users.tpg.com.au/drtwox/tinysmbtest.zip
Note: The pre-compiled .dol file contains "safe" values which will not crash. It *should* successfully read the file and exit back to the loader cleanly.
I've made a small app (with source) that demonstates some problems with libtinysmb.
You will need to create a smb.conf file on your SD card (an example is included in the zip file) and have a file of suitable size on your smb share to test with.
There are two #defines in the source to adjust, SMB_READSIZE and SMB_READBYTES, see the comments in the source for more info.
Unless I'm making a mistake in my use of libtinysmb, here's what I found:
* libtinysmb cannot read more than approx 132096 bytes from a single file (could be slightly more, always crashes before I can see)
* Reading more than 4096 bytes at a time is unstable as SMB_ReadFile will return bogus read values even though smb.c indicates a maximum read size of 63488 bytes
* Calling SMB_ReadFile more than 60 times for a single file is prone to crashing the Wii
Here's the test app: http://users.tpg.com.au/drtwox/tinysmbtest.zip
Note: The pre-compiled .dol file contains "safe" values which will not crash. It *should* successfully read the file and exit back to the loader cleanly.