gemot encubed  

Go Back   gemot encubed > Gemot > Technical Issues

Technical Issues For bug reports, problem solving, and help running Japanese software.

Reply
 
Thread Tools Display Modes
  #1  
Old 2009-10-22, 04:06
Unregistered
Guest
 
Posts: n/a
Default ONScripter-en-20091010 - Fails to compile with -DBPP16

I get this error when trying to compile onscripter-en with -DBPP16 defined:
Code:
ONScripterLabel_animation.cpp: In member function ‘int ONScripterLabel::estimateNextDuration(AnimationInfo*, SDL_Rect&, int)’:
ONScripterLabel_animation.cpp:93: error: ‘TRANS_LAYER’ is not a member of ‘AnimationInfo’
ONScripterLabel_animation.cpp: In member function ‘void ONScripterLabel::setupAnimationInfo(AnimationInfo*, Fontinfo*)’:
ONScripterLabel_animation.cpp:238: error: ‘TRANS_LAYER’ is not a member of ‘AnimationInfo’
ONScripterLabel_animation.cpp: In member function ‘void ONScripterLabel::parseTaggedString(AnimationInfo*)’:
ONScripterLabel_animation.cpp:272: error: ‘TRANS_LAYER’ is not a member of ‘AnimationInfo’
ONScripterLabel_animation.cpp: In member function ‘void ONScripterLabel::drawTaggedSurface(SDL_Surface*, AnimationInfo*, SDL_Rect&)’:
ONScripterLabel_animation.cpp:416: error: ‘TRANS_LAYER’ is not a member of ‘AnimationInfo’
make: *** [ONScripterLabel_animation.o] Error 1
I'm pretty sure that the Dingoo A320 requires this to be enabled, as it segfaults when I run a version without it.The original version with 1byte support works fine with Tsukihime and Narcissu, but the Higurashi translation does not, so I assume it requires onscripter-en.

Thanks
Reply With Quote
  #2  
Old 2009-10-22, 04:15
Unregistered
Guest
 
Posts: n/a
Default

Okay, I compiled the original onscripter without -DBPP16 and it runs without segfaulting, but the colours are messed up.So it does require -DBPP16, but it's not the cause of the segfault.
Reply With Quote
  #3  
Old 2009-10-22, 09:33
Roto
Guest
 
Posts: n/a
Default

I put together a quick patch over my morning coffee before heading into work, so I'm not going to guarantee that this won't break things, but give it a try and see if it works.

Check out the most recent (as of this morning) version from svn:

Code:
svn co -r 284 svn://svn.denpa.mobi/onscripter/trunk onscripter-svn
Then, grab this patch and stick it in the onscripter-svn directory you just checked out:

http://roto1.net/misc/BPP16_experimental.patch

cd into that directory, and apply the patch:

Code:
patch -p0 < BPP16_experimental.patch
and try compiling. You will also have to add -DNO_LAYER_EFFECTS to the compilation flags, in addition to -DBPP16.

Let me know how that works. I gave it a try with Higurashi and it looks like the colors are in 16 bits without anything breaking, but I didn't try for very long.

Mion's really the one who would know the proper fix to this, as she's the one who implemented the layer effects. I'll ask next time I see her.
Reply With Quote
  #4  
Old 2009-10-23, 00:30
Unregistered
Guest
 
Posts: n/a
Default

I tried the patch and it compiled and ran, but still segfaults as before, so I can't be sure if the patch actually helps :)

Anyway, so I tried debugging it with gdb, and this was the result:
Quote:
dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mipsel-linux-uclibc"...
(gdb) run
Starting program: /boot/local/emulators/onscripter/onscripter
setkinsoku: "�v�x�j�n�p�A�B�C�D�E�H�I�R�S�T�U�X�[","�u�w�i�m�o"
Adding: .
Adding: ..
Adding: /root/.ONScripter-905ab/
Adding: ./:../

Program received signal SIG32, Real-time event 32.
0x2ae6a188 in sigsuspend () from /lib/libc.so.0
(gdb) backtrace
#0 0x2ae6a188 in sigsuspend () from /lib/libc.so.0
#1 0x2ac74f9c in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
#2 0x2ac75cb8 in pthread_create () from /lib/libpthread.so.0
#3 0x2ac2a5ec in ?? () from /usr/lib/libSDL-1.2.so.0
warning: GDB can't find the start of the function at 0x2ac2a5eb.

GDB is unable to find the start of the function at 0x2ac2a5eb
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x2ac2a5eb for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Does this give any clues? I'm quite new to this, so any advice is greatly appreciated (maybe it needs libthread_db.so.1 for it to work properly?)

Perhaps it might be issues with uclibc, as this is what dingux (dingoo for linux) uses?
Reply With Quote
  #5  
Old 2009-10-29, 02:55
Sonozaki Futago-tachi
Guest
 
Posts: n/a
Default

Well, I couldn't say for sure what the problem is, but I did find a thread about a project porting to dingux that was running into the same "GDB can't find the start of the function" problem with SDL: http://www.bennugd.co.uk/viewtopic.php?id=44

Based on what the programmer is describing there, it does seem to be a toolchain issue, especially with uclibc.

Anyway, it sounds like you'd do well to ask around dingux forums about how to build SDL-based applications, as they'd know more than us.

But certainly let us know what you get worked out - it'd be cool to add a configuration for building for dingux :)

Mion
Reply With Quote
  #6  
Old 2009-10-29, 06:26
Sonozaki Futago-tachi
Guest
 
Posts: n/a
Default

By the way, I just made an update to the onscripter-en repo that fixes the compilation for when you set -DBPP16 (you don't need to specify -DNO_LAYER_EFFECTS) and corrects the messed-up colors.

Mion
Reply With Quote
  #7  
Old 2009-10-29, 09:11
zalas zalas is offline
 
 
Join Date: Feb 2004
Location: fushigi misuterii
Posts: 1,831
Send a message via ICQ to zalas
Default

I think it would be useful to track down what part of ONScripter precedes the crash. It looks like something clobbered the stack or the heap to me. Perhaps extra printf statements in the code could narrow this down. I'm wondering if there's some issue with assumptions about bit-widths of data types.
__________________
~Yoda is waiting in the air~ | HAVEN
Reply With Quote
  #8  
Old 2009-11-05, 18:03
Unregistered
Guest
 
Posts: n/a
Default

I did run strace on it, but it didn't seem to crash anywhere specific (or nowhere that was visible from strace).As for adding printf statements, I guess you just mean inserting these after certain parts of the code to see where it is crashing? I might need to do my research on this one, I have little experience with C and programming in general, other then some basic bash scripting.

I'll post something on dingooinity, maybe there will be more insight there.And yeah, the Dingoo is really a cool little handheld, it's amazing what you can do with something so small and cheap :)

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Problem RLDEV SVN VERSION Ayane Technical Issues 0 2007-05-18 06:00


All times are GMT -8. The time now is 19:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2023, vBulletin Solutions, Inc.