SDIO cannot use on ...
 
Notifications
Clear all

We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

[Closed] SDIO cannot use on Windows 11 23H2 because "Exception: std::bad_cast" error

57 Posts
12 Users
8 Reactions
45.7 K Views
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

@dandelionsprout It appears to have survived downloading the .torrent file and successfully read it. It looks like it's crashing on the 'while' loop downloading the torrent contents and not at the explicit cast I was expecting. Is the while loop actually an implicit cast?

while(downloadmangar_exitflag==DOWNLOAD_STATUS_DOWLOADING_DATA&&hSession)

I've put debug immediately before and immediately after this line to confirm.  Can you try the new build please.

https://www.glenn.delahoy.com/downloads/sdio/DEBUG_1152813_2.zip


   
(@dandelionsprout)
Eminent Member Registered
Joined: 1 year ago
Posts: 20
 

Indeed I can, and I think I've done so now. (The attachment.)


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

@dandelionsprout Thanks. The while statement isn't the problem evidently. There's only two (or more) other possibilities. Can you run number 3 please.

https://www.glenn.delahoy.com/downloads/sdio/DEBUG_1152813_3.zip


   
(@dandelionsprout)
Eminent Member Registered
Joined: 1 year ago
Posts: 20
 

I think I've done so now, though the logger's results look similar to the previous one from what little I can tell.


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

@dandelionsprout Thanks for that.

So here's what we have

        Log.print_debug("\n  while(downloadmangar_exitflag==DOWNLOAD_STATUS_DOWLOADING_DATA&&hSession)  \n");

        while(downloadmangar_exitflag==DOWNLOAD_STATUS_DOWLOADING_DATA&&hSession)
        {
        Log.print_debug("  inside the while loop  \n");
            Sleep(500);
        Log.print_debug("  short snooze  \n");

the log shows the first two debug lines and not the third.

This is the end of the log file:

{torrent_start

  while(downloadmangar_exitflag==DOWNLOAD_STATUS_DOWLOADING_DATA&&hSession)  
  inside the while loop  
ERROR: Exception: std::bad_cast

}stop logging

 

It would seem as though it's crashing on the Sleep(500) command. I would say that's probably the most innocuous line of code in the whole project.

Right now I'm open to any ideas from anyone that understands C++

 


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

This afternoon I read this:

https://learn.microsoft.com/en-us/cpp/cpp/bad-cast-exception?view=msvc-170

So I did a big search for "dynamic_cast" and put a debug log entry before each one. Here's number 4!

https://www.glenn.delahoy.com/downloads/sdio/DEBUG_1152813_4.zip


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

fyi: you can add "-preservecfg"  to the sdio.cfg file to prevent it from rewriting the cfg file when it closes.


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

Posted by: @glenn

This afternoon I read this:

https://learn.microsoft.com/en-us/cpp/cpp/bad-cast-exception?view=msvc-170

So I did a big search for "dynamic_cast" and put a debug log entry before each one. Here's number 4!

https://www.glenn.delahoy.com/downloads/sdio/DEBUG_1152813_4.zip

Anyone????

 


   
(@nikitavoz)
New Member Registered
Joined: 2 years ago
Posts: 3
 

Posted by: @glenn

https://www.glenn.delahoy.com/downloads/sdio/DEBUG_1152813_4.zip

That archive was not easy to unpack, Windows 10 Explorer and WinRAR 7.10 failed. 7-Zip succeeded.

Here's the logs after error:

 


   
Glenn reacted
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

Thanks for that. I'll have to study this. On the face of it, it makes no sense.


   
(@nikitavoz)
New Member Registered
Joined: 2 years ago
Posts: 3
 

By the way, SDI 1.25.3 (R2503) have the same issue.


   
Glenn reacted
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2029
 

Just tested on new installs of 22H2 and 23H2 and it worked perfectly. Maybe it has something to do with the specific network driver?


   
Page 4 / 4
Glenn's Page