06 July 2010, 19:23 | #1 |
Competition Moderator
Join Date: Feb 2008
Location: Germany
Posts: 4,756
|
savestate.cpp => segmentation fault
Tried to create a savestate with UAE4All using your savestate.cpp-source, Toni.
But it always crashes in the function save_state(...) with a "segmentation fault". The first call to save_chunk(...) from inside save_state(...) works: save_chunk(f, header, dst-header, "ASF "); doesn't crash. But then, after "dst = save_cpu(&len);" the next call to save_chunk() crashes: save_chunk(f, dst, len, "CPU "); The segmentation fault exactly happens when save_chunk(...) now tries to write the "chunk data": fwrite(chunk, 1, len, f); => CRASH In the first call to save_chunk(..."ASF ") which works the values for chunk and len were: chunk: 0 len: 28 In the call to save_chunk(..."CPU ") which crashes the values for chunk and len were: chunk: 172 len: 239020 Do you have any idea what could be the reason for this segmentation fault? Last edited by john4p; 06 July 2010 at 19:31. |
07 July 2010, 08:11 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
|
I don't know, I don't want to do that kind of debugging (without source level debugger)
But you can't simply use statestate.cpp and expect it to work without all other related routines. |
07 July 2010, 08:55 | #3 |
Competition Moderator
Join Date: Feb 2008
Location: Germany
Posts: 4,756
|
Thanks for the reply.
Just took all the savestate-related stuff from the Nokia N900-port with Cyclone and put it into the Pandora-port of UAE4All. Everything built correct (after fiddling here and there) but resulted in the segmentation fault when trying to create a savestate. Now I just built the N900-port itself on Pandora and tried to create a savestate => also segmentation fault. Found out the "implementation" of save_cpu() for Cyclone doesn't seem to save all that much: Code:
static __inline__ uae_u8 *save_cpu (int *len) { return (uae_u8 *)len; } So for Cyclone the possibility to save the CPU's state just hasn't been implemented. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to start FS-UAE because of segmentation fault [Solved] | v3gard | support.FS-UAE | 2 | 18 March 2013 18:32 |
Regarding savestate | torbenb | support.WinUAE | 2 | 24 January 2012 19:33 |
chip label to add in rommgr.cpp | pucci | support.WinUAE | 0 | 09 October 2011 11:56 |
some doubts on the rom (kickstart) management in rommgr.cpp | pucci | support.WinUAE | 2 | 11 September 2011 14:42 |
Help Need a Coder for some CPP | cosmicfrog | support.Other | 0 | 29 April 2010 07:08 |
|
|