jiayouxjh / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Crash with empty command-line arguments #406

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
grafx2 crashes on startup when you pass empty arguments, for example
grafx2 ""
This is especially a problem when you want to make a Windows shortcut with 
specific command-line arguments, because you'd want to write :
<path\>grafx2.exe -double "%1"
This line would make the shortcut accept drag-and-dropping a file into the 
icon, even if the file names has spaces somewhere. But when you pass no file, 
it's interpreted as grafx2 -double "" and it crashes instantly.

Tested on XP, probably affects all versions of Grafx2.

Original issue reported on code.google.com by yrizoud on 26 Nov 2010 at 3:03

GoogleCodeExporter commented 9 years ago
Incredibly, it's an SDL bug. I reported it here: as 
http://bugzilla.libsdl.org/show_bug.cgi?id=1082
I tried upgrading from SDL 1.2.13 to 1.2.14 (and also completely recompiled 
it), but it doesn't fix it, and this version brings two very problematic bugs : 
you can no longer type accented characters (^+i=î, `+e=è, etc.) and you get a 
beep when typing any Alt+something key combination.

For the time being, avoid 'latest SDL' like plague.

Original comment by yrizoud on 1 Dec 2010 at 7:59

GoogleCodeExporter commented 9 years ago
Seems SDL 1.2.15 fixes this one. Did you have a look ?

Original comment by pulkoma...@gmail.com on 12 May 2012 at 2:36

GoogleCodeExporter commented 9 years ago
I've re-tested, and don't really understand what happens.
The crash happens only when debugging, with both SDL 1.2.13 and 1.2.15 (binary 
or compiled from source). The relevant code is specific to Windows, by the way.
Anyway, the issue is meaningless : Shortcut for Grafx2 with specific arguments 
don't need %1 etc, the OS will add the quoted filename as necessary. And if I 
debug, there's no point in running with explicit emtpy argument ""

At least I could check that SDL 1.2.15 no longer crashes Win98 on accented keys 
(issue 167), and no longer has the problems I saw on c1, so I can ship the 
official 1.2.15 DLL instead of the 1.2.13 that I recompiled years ago.

Original comment by yrizoud on 13 May 2012 at 1:08