Error when adding music files

Average rating
(0 votes)

Help please...I get this error with every file I try to add. Also, will the software read from folders, or only audio files? For instance, can I point it to my AC/DC folder, or do I need to point it at the actual audio files? Neither is working for me.

Adding file C:\Documents and Settings\ideagirl\Desktop\Long Way To The Top.mp3
Object reference not set to an instance of an object.
at AudioPlayers.ID3v2.xecdf92ba7a35d81a()
at AudioPlayers.ID3v2.Read()
at AudioPlayers.mp3info.ReadID3v2(String file)
at AudioPlayers.mp3info.ReadAll(String file)
at AudioPlayers.mp3info.ReadAll()
at Izeaa.WinUI.ctlMedia.xb950073c1ea81ab8(String xb44380e048627945, Int32 x9c1b9627c9a8cad5, Boolean& x9c122246ff72fd3c)
at Izeaa.WinUI.ctlMedia.x60abf4eb0776f9bb(String xb44380e048627945, Int32 x9c1b9627c9a8cad5, Boolean& x9c122246ff72fd3c)

When I try to manually input files, I get the error "Input string was not in a correct format"

I have tried modifying my input, and also checked to data types in the Media table to make sure I wasn't entering a bad value. I am sure this is a simple sql fix, but I just can't figure it out.

update

I can now get it to manually add files by clicking the "new" icon prior to entry. I am still getting the above sql error when trying to drag and drop though. It does open the box that asks me to choose the file type, the error is displayed in the next box that shows the updating activity.

ID3 v2 error when dropping files on media editor

This error should occur when the ID3 tag is wrong or not compliant.
I have seen it occur with audio files that have ID3 tags that contain some weird unicode characters.
Try another file or try to change the ID3 tag of the file and then try dragging it again to see what happens.

I will try to change my code to capture this condition and ignore any value it might contain, returning an empty string instead for that tag value.

think it's fixed

After messing around with the tags quite a bit, I finally deleted then recreated the db, and now the drag and drop seems to be working fine. Thanks for your help!

New error

Using a new file, I first tried to drag and drop and got the error I mentioned earlier. Then I checked the ID3 tags, I didn't see anything odd or wrong, but I did change the file from read-only just in case. When I did a drag and drop on it next, I received a new error:

Adding file C:\Documents and Settings\ideagirl\Desktop\09 The Party Song.mp3
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Media_Producer". The conflict occurred in database "bp2x", table "dbo.Producer", column 'ProducerId'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at BroadcastPower.Enterprise.Sprocs.esp_CreateMediaSong(String name, Double duration, Boolean static, Object offlineLocation, Object autoLocation, Object serial, Int32 mediaTypeId, Boolean tagNew, Boolean tagExclusive, Object notes, Object filename, Int32 languageId, Int32 mediaThemeId, Object productionDate, Object producerId, Object distributorId, Object lastPlayDate, Int32 audioVersionId, Int32 audioVoiceId, Int32 defaultSpotPos, Object playbackCriteriaId, Int32 audioStyleId1, Int32 audioStyleId2, Object albumName, Object performerId, Object composerId, Object lyricistId, Double intro, Object bPM, Int32 ending, Int32 trackNumber)
at BroadcastPower.Enterprise.MediaService.InsertSong(String name, Double duration, Boolean static, Object offlineLocation, Object autoLocation, Object serial, Int32 mediaTypeId, Boolean tagNew, Boolean tagExclusive, Object notes, Object filename, Int32 languageId, Int32 mediaThemeId, Object productionDate, Object producerId, Object distributorId, Object lastPlayDate, Int32 audioVersionId, Int32 audioVoiceId, Int32 defaultSpotPos, Object playbackCriteriaId, Int32 audioStyleId1, Int32 audioStyleId2, Object albumName, Object performerId, Object composerId, Object lyricistId, Double intro, Object bPM, Int32 ending, Int32 trackNumber)
at BroadcastPower.Enterprise.Media.InsretSong(String name, Double duration, Boolean static, Object offlineLocation, Object autoLocation, Object serial, Int32 mediaTypeId, Boolean tagNew, Boolean tagExclusive, Object notes, Object filename, Int32 languageId, Int32 mediaThemeId, Object productionDate, Object producerId, Object distributorId, Object lastPlayDate, Int32 audioVersionId, Int32 audioVoiceId, Int32 defaultSpotPos, Object playbackCriteriaId, Int32 audioStyleId1, Int32 audioStyleId2, Object albumName, Object performerId, Object composerId, Object lyricistId, Double intro, Object bPM, Int32 ending, Int32 trackNumber)
at Izeaa.WinUI.ctlMedia.xb950073c1ea81ab8(String xb44380e048627945, Int32 x9c1b9627c9a8cad5, Boolean& x9c122246ff72fd3c)
at Izeaa.WinUI.ctlMedia.x60abf4eb0776f9bb(String xb44380e048627945, Int32 x9c1b9627c9a8cad5, Boolean& x9c122246ff72fd3c)

0 files added.

I don't know of this makes a difference, I use Itunes to manage my mp3 files, is Itunes known to muck up the tags? I did a quick google on this and didn't find anything; it is just a thought.

Thanks for your help.

RE: New Error

The system is pointing to the creation of Media files as the source of errors.
This is not necessarily an issue with the application.
It seems the application is trying to create a Media record for the file you are dropping and associating it to a producer record which doesn't exist. The database is then throwing the error becuase the foreign constraint is broken.

Please check the producer tag on the file and see if it exists in the producer table.

By default, there should be a record with the value "N/A" and an id of "1".

Does this record exist and what is the producer name on the tag?

Does the producer name on the tag exist in the database and what is its ID value?

If the answer to all the above is "they exist", then there should be no reason to get this error, unless there is a bug in the application.

I see you are also a bit technical with your investigation methods, so I'm going to show you some code from the application where the error is coming from.

The code that creates the Media records where the error occurred starts by decomposing the ID3 tag and extracting the different values from it.

It then tries to see if we have those ID3 entries in our DB and retrieves their ID.
If not, it creates them.
Example below is for the Artist (Performer in BP2X) tag.

if (id3.Artist.Length > 0)
{
Performer performer = Performer.GetByName(id3.Artist);
if (performer!=null)
performerId = performer.Id;
else
{
performer = Performer.Insert(id3.Artist);
performerId = performer.Id;
}
}

Then BP2X will attempt to create the media record with the values returned.
case Media.MEDIA_TYPE_SONG:
Media.InsretSong(name, duration, false, "N/A", "N/A", "generated", mediaType,
false, false, notes, file, languageId, 1, productionDate, producerId,
distributorId, null, audioVersionId, audioVoiceId, 1, 1,
audioStyleId1, audioStyleId2, albumName, performerId, composerId,
lyricistId, 0d, 0, 0, trackNumber);
break;

The InsertSong function calls the stored procedure "esp_CreateMediaSong".

To better help you with your issue, would it be possible to send me the mp3 file in question to test with?

Please send it to my email "admin" @ my website's domain name.

RE: New Error

Now fixed in 2.5.5.2, released on Feb 25, 2008.