#1 Burning Software

It is currently Thu Dec 19, 2024 5:08 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Fri Mar 05, 2010 9:37 am 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
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 15632 times ]
Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Fri Mar 05, 2010 10:01 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

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

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Fri Mar 05, 2010 10:16 am 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
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?


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Fri Mar 05, 2010 10:37 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Your application is .NET application?

Dmitry


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Fri Mar 05, 2010 11:23 am 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
Yes Sir. My application is .NET application.
I am using StarBurnX & referring VB.NET samples.
Thank you.


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Fri Mar 05, 2010 2:14 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Ok, we will check it at weekends!

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Wed Mar 10, 2010 10:21 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
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


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Thu Mar 11, 2010 4:25 am 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
Thank you Dima Sir,
I will modify my whole refresh logic to avoid this problem (will try to call refresh on main thread).


Top
 Profile  
 
 Post subject: Re: Debug Assertion failed Problem occured on StarBurnX.Refresh
PostPosted: Thu Mar 11, 2010 6:26 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 54 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group