Supermodel crashes after quit

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: Supermodel crashes after quit

Postby rokfpoewrkcpoqwkcp » Sun Mar 12, 2023 2:43 pm

Not sure if you got this fixed but...

You have some overlapping /contradictory ini settings.(Looks like you're using Sega Model 3 UI.)
Code: Select all
[Info]    New3DEngine=1
[Info]    QuadRendering=1

Code: Select all
[Info]    WideScreen=0
[Info]    Stretch=1

Code: Select all
[Info]    Network=0
[Info]    SimulateNet=0
[Info]    PortIn=1970
[Info]    PortOut=1971
[Info]    AddressOut=127.0.0.1

[Info]    port_in=1970
[Info]    port_out=1971
[Info]    addr_out=127.0.0.1
[Info]    EmulateNet=0


To work out if your install is borked I would try the following:
Try using a fresh 'official' release in a different directory to your current install.
Do not copy any settings from your old install, use the new Supermodel.exe, Supermodel.ini and Games.xml
Launch using the command line, not a GUI.

If Supermodel does crash on exit, it may be invisible to you, but your NVRAMs probably aren't being saved?
rokfpoewrkcpoqwkcp
 
Posts: 119
Joined: Mon Nov 18, 2019 3:40 pm

Re: Supermodel crashes after quit

Postby Juttar » Mon Mar 13, 2023 6:48 am

Ian wrote:My best guess is the destructor for the netboard is doing something bad. Freeing memory that's already gone or possibly heap corruption.

Um ... err ... I'm afraid you're right. :?
User avatar
Juttar
 
Posts: 17
Joined: Fri Nov 08, 2019 2:11 pm

Re: Supermodel crashes after quit

Postby Bart » Tue Mar 14, 2023 11:38 am

Ian was correct. There were two things, and one of them was a compiler warning that was being overlooked. First, there was a memory buffer being deallocated that was never allocated in the first place (it was commented out -- a reminder that leaving commented out code checked in is a really bad idea) and the second, which actually caused the crash, was that an invalid destructor was being called. INetBoard needed a virtual destructor.

NetBoard.cpp is in dire need of a clean up and re-formatting. We probably should adopt a coding style and start slowly converting everything to adhere to it. Commented out code in Supermodel usually represents some lost knowledge -- it was there because of a hypothesis about how something worked and then removed temporarily and forgotten. Probably best to type up long-form notes at the top of the file about how things work and what was tried, and then delete stale code altogether.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Supermodel crashes after quit

Postby Ian » Tue Mar 14, 2023 2:13 pm

It's safe to delete a null pointer. You don't need additional checks since delete already checks.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Supermodel crashes after quit

Postby Bart » Tue Mar 14, 2023 5:22 pm

Ian wrote:It's safe to delete a null pointer. You don't need additional checks since delete already checks.


Did not know that! That explains why that alone didn't cause a crash. And it makes sense.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Supermodel crashes after quit

Postby Juttar » Tue Mar 14, 2023 5:34 pm

I'm glad. :)
User avatar
Juttar
 
Posts: 17
Joined: Fri Nov 08, 2019 2:11 pm

Previous

Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 1 guest