Rocket Division Software
http://www.starburnsoftware.com/forum/

Debug Assertion failed Problem occured on StarBurnX.Refresh
http://www.starburnsoftware.com/forum/starburn-sdk-f3/debug-assertion-failed-problem-occured-starburnx-refresh-t2047.html
Page 1 of 1

Author:  deepakp [ Fri Mar 05, 2010 9:37 am ]
Post subject:  Debug Assertion failed Problem occured on StarBurnX.Refresh

Hello Dima Sir,

I am getting following Debug Assertion failed problem on almost every Operating System. This occurs when I call StarBurnX.Refresh() function.

Attachments:
StarBurn Problem.jpg
StarBurn Problem.jpg [ 26.59 KiB | Viewed 14509 times ]

Author:  dima (staff) [ Fri Mar 05, 2010 10:01 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Hello,

1) Do you use the latest update of StarBurnX - #20100224?
2) Do you call the refresh method from main thread?

Regards,

Dmitry

Author:  deepakp [ Fri Mar 05, 2010 10:16 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Hello Sir,
1) Yes, I am using latest dlls.
2) But, Sir I had to call StarBurnX.Refresh on thread. Because it takes a lot of time for this process, so I had to show a progress dialog.
I any thing wrong with that?

Author:  dima (staff) [ Fri Mar 05, 2010 10:37 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Your application is .NET application?

Dmitry

Author:  deepakp [ Fri Mar 05, 2010 11:23 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Yes Sir. My application is .NET application.
I am using StarBurnX & referring VB.NET samples.
Thank you.

Author:  dima (staff) [ Fri Mar 05, 2010 2:14 pm ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Ok, we will check it at weekends!

Regards,

Dmitry

Author:  dima (staff) [ Wed Mar 10, 2010 10:21 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Hello,

We have checked this problem ... it seems that all ok :) This assertion means that collection was modified during the iteration process!

You should wait till the refresh process finished and then iterate through collection of devices!

Regards,

Dmitry

Author:  deepakp [ Thu Mar 11, 2010 4:25 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Thank you Dima Sir,
I will modify my whole refresh logic to avoid this problem (will try to call refresh on main thread).

Author:  dima (staff) [ Thu Mar 11, 2010 6:26 am ]
Post subject:  Re: Debug Assertion failed Problem occured on StarBurnX.Refresh

Hello,

NO NO!! You CAN call the refresh function from user( non main ) thread!!!

You should manually synchronize access to collection of drives!!!

For example:

Private Shared waitHandles() As WaitHandle = {New AutoResetEvent(False)}

' This function will be called from the user thread
Sub DoRefresh(ByVal state As Object)

'.. USER THREAD ...

Dim are As AutoResetEvent = state

m_starBurnX.Refresh()

' Notify about success
are.Set()

End Sub

...
Yourfunction()

'... MAIN THREAD ...
Dim refreshThread As Thread = New Thread(AddressOf Me.DoRefresh)

' Start refreshing
refreshThread.Start(waitHandles(0))

' Wait till the "Refresh" tread notified about success
WaitHandle.WaitAll(waitHandles)

'Get collection of drives and Refresh combobox
...


Regards,

Dmitry

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/