IOS warnings, Multiple Unsequenced Modificaitons to SP

48 views
Skip to first unread message

Dave Dyer

unread,
Oct 10, 2016, 4:38:19 PM10/10/16
to CodenameOne Discussions

compiling my main IOS project, I get thousands of warnings of this type.  This is not a bullshit
warning, the order of argument processing in C++ is undefined.  You ought to produce code that
does not produce this warning.

I'm tracking an unexplained hard crash, this is exactly the kind of warning that may be
relevant if the compiler finds something it thinks it can optimize within the rules.

Here's a sample sequence that generates the warning.

    SP++;

    PUSH_OBJ(alloc2DArray(threadStateData, (*(--SP)).data.i, (*(--SP)).data.i, &class_array2__com_codename1_ui_geom_Rectangle, &class_array1__com_codename1_ui_geom_Rectangle, sizeof(JAVA_OBJECT))); /* MULTIANEWARRAY */





Shai Almog

unread,
Oct 10, 2016, 10:54:19 PM10/10/16
to CodenameOne Discussions
Please file an issue.
I'm guessing we never see this since we hardly every use 2D arrays as they are slower

Dave Dyer

unread,
Oct 11, 2016, 1:15:12 AM10/11/16
to CodenameOne Discussions
There are other warnings, from the VM code, that look like they ought to
be important, for example


- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
  return [self application:application openURL:url sourceApplication:nil annotation:nil];
}

/code/ios/boardspace-2.74-sources/dist/Develop-src/CodenameOne_GLAppDelegate.m:243:16: Null passed to a callee that requires a non-null argument

Jérémy MARQUER

unread,
Oct 11, 2016, 10:01:15 AM10/11/16
to CodenameOne Discussions
Hi,

I also have thousand of warnings in xcode ! 

I had also an unexplained hard crash... It's cause by adding a ArcProgress component in my form.(https://github.com/chen-fishbein/CN1CircleProgress/blob/master/CN1CircleProgress/src/com/codename1/progress/ArcProgress.java).

The crash happened when invoking drawShape in the paint method of the component.

I don't know if it will help but I think there might be a problem with last friday update...

Dave Dyer

unread,
Oct 11, 2016, 1:36:06 PM10/11/16
to CodenameOne Discussions
I've been tracking down a hard crash, which apparently is unrelated to the unsequenced modification warnings.
https://github.com/codenameone/CodenameOne/issues/1911

It's unclear exactly what the doomsday code is, but at least my test case is simple

My eye is drawn to this bit
    PUSH_INT(11);
    SP-=2; if((*SP).data.i >= SP[1].data.i) /* IF_ICMPGE */ goto label_L1821402884;
    PUSH_POINTER(get_field_euphoria_EuphoriaBoard_allegiance(__cn1ThisObject));
    (*SP).type = CN1_TYPE_INT; /* ILOAD */
    (*SP).data.i = ilocals_3_;
    SP++;
 
Decrementing SP and then using SP[1] looks like a violation of good practice, even if
it's supposed to be OK "in this case" because there's no possible interruption.

Shai Almog

unread,
Oct 11, 2016, 9:22:14 PM10/11/16
to CodenameOne Discussions
Jeremy, I don't think that's related.

I've assigned both issues but as we previously announced there is literally no one in the office this October due to local holidays, vacations & trips.

Dave Dyer

unread,
Oct 12, 2016, 12:25:02 AM10/12/16
to CodenameOne Discussions

Just add this to the things you're atoning for.

Shai Almog

unread,
Oct 12, 2016, 9:27:36 PM10/12/16
to CodenameOne Discussions
I'm an atheist and I'm in India right now...
Reply all
Reply to author
Forward
0 new messages