r2022:all paks:memory corruption September 16, 2008, 09:12:50 pm In schedule_list.cc, there is a static variable named max_id, with an initial value of 0. That variable is used in schedule_list_gui_t::schedule_list_gui_t as a pointer to the also static array static uint8 tabs_to_lineindex[9];. The pointer is not reset and so, the second and after calls to that constructor overflows the array and corrupts memory.The symptoms in my Linux are the following: after opening and closing several times the Lines information window and trying to open and information window of a factory, there is a segmentation fault. But these symptoms may vary from compiler to compiler, and from system to system.Perhaps, a solution is to add this line at schedule_list.cc:105:max_id=0; Quote Selected
Re: r2022:all paks:memory corruption Reply #1 – September 17, 2008, 12:33:49 am Hey, this might be the reason for the problems mentioned in r2000 + pak64 on WinXp, Random Crashes, because the info window for factories is involved there, too. Quote Selected
Re: r2022:all paks:memory corruption Reply #2 – September 17, 2008, 09:39:26 pm It may be. But it seems strange to me that different compilers and OSes corrupts the same zone of the memory. The source of the error would be the same (opening the lines information window several times), but the outcome may or not may be the same, I think... Quote Selected
Re: r2022:all paks:memory corruption Reply #3 – September 19, 2008, 08:30:50 pm Thank you, good catch. Quote Selected
Re: r2022:all paks:memory corruption Reply #4 – September 20, 2008, 01:34:39 am You're welcome.Nice you're back. Quote Selected
Re: r2022:all paks:memory corruption Reply #5 – March 13, 2009, 10:45:50 pm (Closing as solved.) Quote Selected