Quote: Originally Posted by
mnwcsult 
RMBuilder.exe
just crashes and I get this from Visual Studio debugger:
Unhandled exception at 0x01a92613 in RMBuilder.exe: 0xC0000005: Access violation reading location 0x01e51000.
First-chance exception at 0x01a92613 in RMBuilder.exe: 0xC0000005: Access violation reading location 0x01e51000.
When run as stand alone I get a panel
That starts with Status getting file count: J:\MegaCollection
Next Getting ready for Import, I click Import, at 1% it then pops up the error and my debugger screen.
The RMBuilder.db file is always 27k
Any ideas?
This is from file Builder_Debug.txt
2/8/2009 1:19:00 PM: RRMedia Builder> MediaInfo communitation OK!
2/8/2009 1:19:35 PM: RRMedia Builder> Data_Dump > 'REM - Losing My Religion (Acoustic).mp3','Losing My Religion (Acustico)','REM','xxx','','32','.m','Alternative. Punk\','',0,'','20042103094048','2009/02/08/13:19'
2/8/2009 1:19:35 PM: RRMedia Builder> unrecognized token: "xxx"
I subsituted the NULL character with 'xxx' so that I could cut and paste the text in this message.
On my day job I a Software Engineer and we see this a lot when passing data into SQL Server. In the helper folder there sits Sqlite3.exe and Sqlite3u.dll so my guess is something similar is happening here.
My first hint of what might be happening was a folder name "70's Rock" RMBuilder returned this message RRMedia Builder> unrecognized token: "'" I had to really look at it and noticed the aposthrophe between the quotes. So I changed the folder name to "70s Rock" and reran the builder.
RMBuilder got further next returned RRMedia Builder> unrecognized token: "'" on the next folder "80's Rock". There is a trend forming here. So changed the name to "80s Rock" and started over.
Which got me to the message I began the discussion with the NULL character.
SQL in general is sensitive to apostrophes, quotes and many other characters in text fields.
We filter much more heavily to prevent SQL injection attacks, here is some example code:
'Function IllegalChars to guard against SQL injection
Function IllegalChars(sInput)
'Declare variables
Dim sBadChars, iCounter
'Set IllegalChars to False
IllegalChars=False
'Note vbNullChar is the same as chr$(0)
'Create an array of illegal characters and words
sBadChars=array("select", "drop", ";", "--", "insert", "delete", "xp_", _
"#", "%", "&", "'", "(", ")", "/", "\", ":", ";", "<", ">", "=", _
"[", "]", "?", "`", "|", "declare", "convert", chr$(0))
'Loop through array sBadChars using our counter & UBound function
For iCounter = 0 to uBound(sBadChars)
'Use Function Instr to check presence of illegal character in our variable
If Instr(sInput,sBadChars(iCounter))>0 Then
IllegalChars=True
End If
Next
End function
You could use something similar to this to replace unwanted/illegal characters with "" a NULL string.
I hope this helps as I like to program but outside of work I really just do not have the time. So I greatly appreciate your efforts and the work of all of the others who contribute so much to the rest of us.
-Michael