We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!
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.
@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
Indeed I can, and I think I've done so now. (The attachment.)
@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
I think I've done so now, though the logger's results look similar to the previous one from what little I can tell.
@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++
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
fyi: you can add "-preservecfg" to the sdio.cfg file to prevent it from rewriting the cfg file when it closes.
Anyone????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
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:
Thanks for that. I'll have to study this. On the face of it, it makes no sense.
Just tested on new installs of 22H2 and 23H2 and it worked perfectly. Maybe it has something to do with the specific network driver?