gemot encubed  

Go Back   gemot encubed > Gemot > Technical Issues

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

Thread Tools Display Modes
Old 2009-10-22, 04:06
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:
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.

Reply With Quote
Old 2009-10-22, 04:15
Posts: n/a

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
Old 2009-10-22, 09:33
Posts: n/a

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:

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

cd into that directory, and apply the patch:

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
Old 2009-10-23, 00:30
Posts: n/a

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:
dlopen failed on '' - 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 <>
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/
(gdb) backtrace
#0 0x2ae6a188 in sigsuspend () from /lib/
#1 0x2ac74f9c in __pthread_wait_for_restart_signal () from /lib/
#2 0x2ac75cb8 in pthread_create () from /lib/
#3 0x2ac2a5ec in ?? () from /usr/lib/
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 for it to work properly?)

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

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:

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 :)

Reply With Quote
Old 2009-10-29, 06:26
Sonozaki Futago-tachi
Posts: n/a

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.

Reply With Quote
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

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
Old 2009-11-05, 18:03
Posts: n/a

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 :)

Reply With Quote

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.