Previous Thread
Next Thread
Print Thread
Segmentation fault with .7z (backtrace included!) #49188 04/09/09 03:40 AM
Joined: Apr 2009
Posts: 11
N
nickelplate Offline OP
Member
OP Offline
Member
N
Joined: Apr 2009
Posts: 11
Howdy Rbelmont, many thanks for porting Nestopia to linux. I've successfully downloaded & compiled it, and after changing the audio device I'm happily running at full speed on my eeePC 901. (Running the latest Eeebuntu)

However, I have a frustrating problem with .7z archives. All of my ROMs are stored as multi-file .7z solid archives with one file for all ROM variants, and GoodNES names. Unfortunately, with most of my archives, nestopia will segfault trying to load a ROM from them. Some archives always work, and others always fail. If I extract the file I want, then nestopia can load it just fine. This also seems to be a linux-only problem; nestopia under win doesn't have any problems browsing .7z archives, but my desktop *does* under ubuntu.

Here's a gdb backtrace; I'm a total noob to using gdb so if yu need more info let me know:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6ff5710 (LWP 15910)]
Nes::Core::Crc32::Compute (data=0xb6816000 <Address 0xb6816000 out of bounds>,
length=8397488, crc=4053540122) at source/core/NstCrc32.cpp:69
69 crc = Iterate( *data, crc );

Thanks, hopefully this is useful. I haven't found a similar topic in the archives, so apologies if this is a repeat.

Re: Segmentation fault with .7z (backtrace included!) [Re: nickelplate] #49212 04/10/09 04:23 AM
Joined: Apr 2009
Posts: 11
N
nickelplate Offline OP
Member
OP Offline
Member
N
Joined: Apr 2009
Posts: 11
I don't want to bug Rbelmont unduly, so maybe I should ask... Anyone else have ideas? Looks like it's crashing trying to calculate a checksum.

Re: Segmentation fault with .7z (backtrace included!) [Re: nickelplate] #49213 04/10/09 04:26 AM
Joined: Mar 2001
Posts: 16,471
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,471
The available SDK source for 7zip on non-Windows isn't fully compatible with all archives. I keep up with the progress on it, but there's not a lot I can do with it as far as the incompatibilities. All I can suggest is to repack the troublesome games in plain zip. (The command line Unix 7zip extractor uses a Windows emulation library similar to a stripped-down WINE, which is not an option I'm interested in).

Re: Segmentation fault with .7z (backtrace included!) [Re: R. Belmont] #49214 04/10/09 04:29 AM
Joined: Apr 2009
Posts: 11
N
nickelplate Offline OP
Member
OP Offline
Member
N
Joined: Apr 2009
Posts: 11
Roger, thanks for the info. Yuck, there's all kinds of ugliness we end users typically don't see, isn't there? smile

Re: Segmentation fault with .7z (backtrace included!) [Re: nickelplate] #72490 08/19/11 10:58 AM
Joined: Aug 2011
Posts: 1
N
NobodyReally Offline
Member
Offline
Member
N
Joined: Aug 2011
Posts: 1
I hope nobody minds me replying to a thread as old as this. In any case, I think I fixed this problem. Here's the patch:
Code:
--- auxio.cpp.old	2011-08-19 12:12:42.000000000 +0200
+++ auxio.cpp	2011-08-19 12:12:45.000000000 +0200
@@ -566,5 +566,5 @@
 								fclose(archiveStream.File);
 
-								*datasize = (int)outBufferSize;
+								*datasize = (int)outSizeProcessed;
 								*dataout = (unsigned char *)outBuffer;
 								*dataoffset = (int)offset;


Moderated by  Marty, R. Belmont 

Who's Online Now
5 registered members (MacLover490, Dorando, R. Belmont, AJR, 1 invisible), 176 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,763
Posts115,160
Members4,889
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3