Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #35 – March 03, 2009, 10:00:18 pm Update to the bug hunt:I added logging by text file and found out the crash is within...EDIT:void karte_t::sync_step(long delta_t, bool sync, bool display )within the function inside it:intr_refresh_display( false );So I'm stepping through intr_refresh_display now... Fun times. Quote Selected Last Edit: March 03, 2009, 10:26:33 pm by zodttd
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #36 – March 03, 2009, 10:51:39 pm This is the routine that draws everything (we are doing cooperative multitasking). We had some errors with ggc 4.xx which aparently produces some wrong clipping coordinates in the schedule window. Maybe it is related to this.valgrind is probably not an option on a iPhone ...By the way, non-rectangular buttons (19x30) are perfectly possible. Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #37 – March 03, 2009, 10:57:56 pm Ah this would make sense!I traced things further and found:The segfault is further within "display_win" and more specifically at the line:komp->zeichnen(wins[win].pos, gr);The disp_height was clipped to 288 from 320 in win_display_flush.I'm forced to use GCC 4.x in this case. Any workarounds at the moment? Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #38 – March 03, 2009, 11:01:21 pm In the meantime I will try to fix the clipping issue in GCC 4.x. I might know why... Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #39 – March 03, 2009, 11:02:26 pm I am not sure, but maybe the problem is the dirty tile puffer is written into negative values?One workaround would be to have some extra buffer around *textur [pseudocode textur=malloc(width*(height+32)*2)+width*16] Since on Windows debugging GCC ist crap, and GCC 4.0 is not yet stable (sigh) I did not yet dug deeper in it. If that helps, then maybe there is another error in the program. (Btw. you use the code from the svn?) Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #40 – March 03, 2009, 11:10:41 pm Ok, I will look into that. Also yes, I use the code from the SVN. Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #41 – March 04, 2009, 02:58:34 am I isolated the bug, and by removed the following code, the crash no longer occurs. Researching a fix now...In the function: fahrplan_gui_t::fahrplan_gui_tCommenting out this code within that function gets rid of the segfault crash:#if 0 ypos += BUTTON_HEIGHT; scrolly.set_pos( koord( 0, ypos ) ); // scrolly.set_show_scroll_x(false); add_komponente(&scrolly);#endif Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #42 – March 04, 2009, 03:09:18 am More specifically the crash is here:Function: void gui_scrollpane_t::zeichnen(koord pos)Line: if(old_komp_groesse!=komp->get_groesse()) {Im going to look into the get_groesse() function now...So close to a fix! Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #43 – March 04, 2009, 05:00:35 am YAY! I fixed the bug! There was a buffer overflow occuring that threw off everything on the iPhone. It's a simple fix:Inside: void fahrplan_gui_t::gimme_stop_name(cbuffer_t & buf, karte_t *welt, const schedule_t *fpl, int i, int max_chars)Change: char tmp [256];To: char tmp [512];The reason was the max_chars p****ed to the function is 512, the size of 'buf'. But tmp was only 256 chars. Increasing it to the proper 512 fixed this bug! Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #44 – March 04, 2009, 07:15:37 am Quote from: zodttd – on March 04, 2009, 05:00:35 amChange: char tmp [256];To: char tmp [512];Thank you! Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #45 – March 04, 2009, 07:17:08 am No problem. That was a tricky bug to find! Glad it's fixed though, things are going smoothly for this port! I'm seeking out beta testers. Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #46 – July 25, 2009, 02:45:26 pm you really need to update it. we should develop a pak just for it! Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #47 – July 25, 2009, 02:50:00 pm i.Pak? ;-) Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #48 – July 25, 2009, 03:34:09 pm Quote from: jamespetts – on July 25, 2009, 02:50:00 pmi.Pak? ;-)No pak.i32 ^^We must be simutrans conform! Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #49 – July 25, 2009, 04:47:04 pm Pakset name standard:pak<size>.<theme>Examples:pak96.comincpak128.Japanpak128.Britain Quote Selected Last Edit: July 25, 2009, 04:51:42 pm by IgorTekton
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #50 – July 25, 2009, 04:51:30 pm The iPhone port also needs: - a keyboard interface - bigger buttons to close and move windows etc. - a better way to scroll around the mapHaving it's own pak set would help too :-) Quote Selected
Re: Port of Simutrans to the iPhone & iPod Touch (AppStore) Reply #51 – March 25, 2010, 06:54:00 am Hello allSimutrans can be one of the best app of the appstore !There are some problem of ergonomy, id don't know what it is possible and what not.Add some dropdown menus, maybe use multitouch to zoom screen... But... does this project is active, or have you abandoned it ?P.S: Sorry for my poo english, and thanks a lot cause i have discovered this "so nice" game with you Quote Selected